/* * Copyright 2010 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SkRasterClip_DEFINED #define SkRasterClip_DEFINED #include "include/core/SkRect.h" #include "include/core/SkRefCnt.h" #include "include/core/SkRegion.h" #include "include/core/SkShader.h" #include "include/private/base/SkAssert.h" #include "include/private/base/SkDebug.h" #include "include/private/base/SkNoncopyable.h" #include "src/core/SkAAClip.h" class SkBlitter; class SkMatrix; class SkPath; class SkRRect; enum class SkClipOp; /** * Wraps a SkRegion and SkAAClip, so we have a single object that can represent either our * BW or antialiased clips. */ class SkRasterClip { … }; class SkAutoRasterClipValidate : SkNoncopyable { … }; #ifdef SK_DEBUG #define AUTO_RASTERCLIP_VALIDATE(rc) … #else #define AUTO_RASTERCLIP_VALIDATE … #endif /////////////////////////////////////////////////////////////////////////////// /** * Encapsulates the logic of deciding if we need to change/wrap the blitter * for aaclipping. If so, getRgn and getBlitter return modified values. If * not, they return the raw blitter and (bw) clip region. * * We need to keep the constructor/destructor cost as small as possible, so we * can freely put this on the stack, and not pay too much for the case when * we're really BW anyways. */ class SkAAClipBlitterWrapper { … }; #endif