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

Unified Diff: include/core/SkCanvas.h

Issue 200923008: Fix cull nesting assertion. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Split validation method. Created 6 years, 9 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 | « no previous file | src/core/SkCanvas.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkCanvas.h
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h
index fa433b38b78c3d76ec9148e565eb99fa8a2f92de..f5d4fe63cf49e307c44bb42b72293383df48cd5a 100644
--- a/include/core/SkCanvas.h
+++ b/include/core/SkCanvas.h
@@ -1063,20 +1063,13 @@ public:
* is not enforced, but the information might be used to quick-reject command blocks,
* so an incorrect bounding box may result in incomplete rendering.
*/
- void pushCull(const SkRect& cullRect) {
- ++fCullCount;
- this->onPushCull(cullRect);
- }
+ void pushCull(const SkRect& cullRect);
/**
* Terminates the current culling block, and restores the previous one (if any).
*/
- void popCull() {
- if (fCullCount > 0) {
- --fCullCount;
- this->onPopCull();
- }
- }
+ void popCull();
+
//////////////////////////////////////////////////////////////////////////
/** Get the current bounder object.
@@ -1394,6 +1387,9 @@ private:
};
#ifdef SK_DEBUG
+ // The cull stack rects are in device-space
+ SkTDArray<SkIRect> fCullStack;
+ void validateCull(const SkIRect&);
void validateClip() const;
#else
void validateClip() const {}
« no previous file with comments | « no previous file | src/core/SkCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698