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

Unified Diff: src/core/SkPictureRecord.cpp

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 | « src/core/SkCanvas.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPictureRecord.cpp
diff --git a/src/core/SkPictureRecord.cpp b/src/core/SkPictureRecord.cpp
index 55670baa7341e2d60c2ba29a486c6e2d3b95c24f..ce21d955dda95ffb33ab1b1d2d079f8332cc8bad 100644
--- a/src/core/SkPictureRecord.cpp
+++ b/src/core/SkPictureRecord.cpp
@@ -1559,18 +1559,6 @@ void SkPictureRecord::endCommentGroup() {
// [op/size] [rect] [skip offset]
static const uint32_t kPushCullOpSize = 2 * kUInt32Size + sizeof(SkRect);
void SkPictureRecord::onPushCull(const SkRect& cullRect) {
- // Skip identical cull rects.
- if (!fCullOffsetStack.isEmpty()) {
- const SkRect& prevCull = fWriter.readTAt<SkRect>(fCullOffsetStack.top() - sizeof(SkRect));
- if (prevCull == cullRect) {
- // Skipped culls are tracked on the stack, but they point to the previous offset.
- fCullOffsetStack.push(fCullOffsetStack.top());
- return;
- }
-
- SkASSERT(prevCull.contains(cullRect));
- }
-
uint32_t size = kPushCullOpSize;
size_t initialOffset = this->addDraw(PUSH_CULL, &size);
// PUSH_CULL's size should stay constant (used to rewind).
@@ -1588,11 +1576,6 @@ void SkPictureRecord::onPopCull() {
uint32_t cullSkipOffset = fCullOffsetStack.top();
fCullOffsetStack.pop();
- // Skipped push, do the same for pop.
- if (!fCullOffsetStack.isEmpty() && cullSkipOffset == fCullOffsetStack.top()) {
- return;
- }
-
// Collapse empty push/pop pairs.
if ((size_t)(cullSkipOffset + kUInt32Size) == fWriter.bytesWritten()) {
SkASSERT(fWriter.bytesWritten() >= kPushCullOpSize);
« no previous file with comments | « src/core/SkCanvas.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698