| Index: skia/ext/skia_utils_mac.h
|
| diff --git a/skia/ext/skia_utils_mac.h b/skia/ext/skia_utils_mac.h
|
| index 6a0efdebfab60b78999e51e845cbf936b49e0e5a..e087867ffb483e4cb3b230d7adf2d9aa59a71a5e 100644
|
| --- a/skia/ext/skia_utils_mac.h
|
| +++ b/skia/ext/skia_utils_mac.h
|
| @@ -109,16 +109,36 @@ SK_API NSImage* SkBitmapToNSImage(const SkBitmap& icon);
|
| class SK_API SkiaBitLocker {
|
| public:
|
| explicit SkiaBitLocker(SkCanvas* canvas);
|
| + SkiaBitLocker(SkCanvas* canvas, const SkIRect& userClipRect);
|
| ~SkiaBitLocker();
|
| CGContextRef cgContext();
|
| + bool hasEmptyClipRegion() const;
|
|
|
| private:
|
| void releaseIfNeeded();
|
| + SkIRect computeDirtyRect();
|
| +
|
| SkCanvas* canvas_;
|
| +
|
| + // If the user specified a clip rect it would draw into then the locker may
|
| + // skip the step of searching for a rect bounding the pixels that the user
|
| + // has drawn into.
|
| + bool userClipRectSpecified_;
|
| +
|
| CGContextRef cgContext_;
|
| SkBitmap bitmap_;
|
| SkIPoint bitmapOffset_;
|
| +
|
| + // True if we are drawing to |canvas_|'s SkBaseDevice's bits directly through
|
| + // |bitmap_|. Otherwise, the bits in |bitmap_| are our allocation and need to
|
| + // be copied over to |canvas_|.
|
| bool useDeviceBits_;
|
| +
|
| + // True if |bitmap_| is a dummy 1x1 bitmap allocated for the sake of creating
|
| + // a non-NULL CGContext (it is invalid to use a NULL CGContext), and will not
|
| + // be copied to |canvas_|. This will happen if |canvas_|'s clip region is
|
| + // empty.
|
| + bool bitmapIsDummy_;
|
| };
|
|
|
|
|
|
|