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

Unified Diff: src/core/SkPictureRecord.cpp

Issue 794263002: Cull pushCull and popCull from Skia. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix debugger Created 6 years 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/SkPictureRecord.h ('k') | src/core/SkRecordDraw.cpp » ('j') | 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 67c4229e3d43290881c7a311b36769611fb0e104..eec6bc0bcb2034eae08194ef84ae3c4f879a594d 100644
--- a/src/core/SkPictureRecord.cpp
+++ b/src/core/SkPictureRecord.cpp
@@ -847,36 +847,6 @@ void SkPictureRecord::endCommentGroup() {
this->validate(initialOffset, size);
}
-// [op/size] [rect] [skip offset]
-static const uint32_t kPushCullOpSize = 2 * kUInt32Size + sizeof(SkRect);
-void SkPictureRecord::onPushCull(const SkRect& cullRect) {
- size_t size = kPushCullOpSize;
- size_t initialOffset = this->addDraw(PUSH_CULL, &size);
- // PUSH_CULL's size should stay constant (used to rewind).
- SkASSERT(size == kPushCullOpSize);
-
- this->addRect(cullRect);
- fCullOffsetStack.push(SkToU32(fWriter.bytesWritten()));
- this->addInt(0);
- this->validate(initialOffset, size);
-}
-
-void SkPictureRecord::onPopCull() {
- SkASSERT(!fCullOffsetStack.isEmpty());
-
- uint32_t cullSkipOffset = fCullOffsetStack.top();
- fCullOffsetStack.pop();
-
- // op only
- size_t size = kUInt32Size;
- size_t initialOffset = this->addDraw(POP_CULL, &size);
-
- // update the cull skip offset to point past this op.
- fWriter.overwriteTAt<uint32_t>(cullSkipOffset, SkToU32(fWriter.bytesWritten()));
-
- this->validate(initialOffset, size);
-}
-
///////////////////////////////////////////////////////////////////////////////
SkSurface* SkPictureRecord::onNewSurface(const SkImageInfo& info, const SkSurfaceProps&) {
« no previous file with comments | « src/core/SkPictureRecord.h ('k') | src/core/SkRecordDraw.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698