Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(116)

Unified Diff: src/core/SkBBoxRecord.h

Issue 380373003: Fix for saveLayer() with filters vs. the BBox Hierarchy. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Use SkTDArray::deleteAll() Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gm/resizeimagefilter.cpp ('k') | src/core/SkBBoxRecord.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBBoxRecord.h
diff --git a/src/core/SkBBoxRecord.h b/src/core/SkBBoxRecord.h
index f3d72b044857a2f2810a8adcd13d02f81c7a72d2..a6edc98f13db28f578b16694e7e66f83ba74e7a8 100644
--- a/src/core/SkBBoxRecord.h
+++ b/src/core/SkBBoxRecord.h
@@ -10,6 +10,7 @@
#define SkBBoxRecord_DEFINED
#include "SkPictureRecord.h"
+#include "SkTDArray.h"
/**
* This is an abstract SkPictureRecord subclass that intercepts draw calls and computes an
@@ -22,7 +23,7 @@ public:
SkBBoxRecord(const SkISize& size, uint32_t recordFlags)
: INHERITED(size, recordFlags) {
}
- virtual ~SkBBoxRecord() { }
+ virtual ~SkBBoxRecord();
/**
* This is called each time we get a bounding box, it will be axis-aligned,
@@ -66,6 +67,9 @@ protected:
virtual void onDrawTextOnPath(const void* text, size_t byteLength, const SkPath& path,
const SkMatrix* matrix, const SkPaint&) SK_OVERRIDE;
virtual void onDrawPicture(const SkPicture* picture) SK_OVERRIDE;
+ virtual void willSave() SK_OVERRIDE;
+ virtual SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveFlags) SK_OVERRIDE;
+ virtual void willRestore() SK_OVERRIDE;
private:
/**
@@ -75,6 +79,12 @@ private:
**/
bool transformBounds(const SkRect& bounds, const SkPaint* paint);
+ /**
+ * Paints from currently-active saveLayers that need to be applied to bounding boxes of all
+ * primitives drawn inside them. We own these pointers.
+ **/
+ SkTDArray<const SkPaint*> fSaveStack;
+
typedef SkPictureRecord INHERITED;
};
« no previous file with comments | « gm/resizeimagefilter.cpp ('k') | src/core/SkBBoxRecord.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698