Chromium Code Reviews| 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) { |
|
robertphillips
2014/03/20 12:23:56
Is this no longer useful?
f(malita)
2014/03/20 13:30:58
Potentially still useful, but not easy to pull off
robertphillips
2014/03/20 14:20:41
Aren't they all in device space now?
f(malita)
2014/03/20 14:38:20
They are in SkCanvas::fCullStack - but that is deb
|
| - // 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); |