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

Unified Diff: src/core/SkPictureData.cpp

Issue 378703002: Clean up a bit after SkPictureData/SkPicturePlayback split (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update to ToT 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
Index: src/core/SkPictureData.cpp
diff --git a/src/core/SkPictureData.cpp b/src/core/SkPictureData.cpp
index 15ba45d7d6c4c75ef171802a8ae79c1252115a5d..2c71eebf2f0a2bfda1ce18caf30fb1e7e5be58d6 100644
--- a/src/core/SkPictureData.cpp
+++ b/src/core/SkPictureData.cpp
@@ -23,11 +23,6 @@ template <typename T> int SafeCount(const T* obj) {
return obj ? obj->count() : 0;
}
-/* Define this to spew out a debug statement whenever we skip the remainder of
- a save/restore block because a clip... command returned false (empty).
- */
-#define SPEW_CLIP_SKIPPINGx
-
SkPictureData::SkPictureData(const SkPictInfo& info)
: fInfo(info) {
this->init();
@@ -673,39 +668,12 @@ bool SkPictureData::parseBuffer(SkReadBuffer& buffer) {
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
-#ifdef SPEW_CLIP_SKIPPING
-struct SkipClipRec {
- int fCount;
- size_t fSize;
-
- SkipClipRec() {
- fCount = 0;
- fSize = 0;
- }
-
- void recordSkip(size_t bytes) {
- fCount += 1;
- fSize += bytes;
- }
-};
-#endif
-
-uint32_t SkPictureData::OperationList::offset(int index) const {
- SkASSERT(index < fOps.count());
- return ((SkPictureStateTree::Draw*)fOps[index])->fOffset;
-}
-
-const SkMatrix& SkPictureData::OperationList::matrix(int index) const {
- SkASSERT(index < fOps.count());
- return *((SkPictureStateTree::Draw*)fOps[index])->fMatrix;
-}
-
const SkPicture::OperationList* SkPictureData::getActiveOps(const SkIRect& query) const {
if (NULL == fStateTree || NULL == fBoundingHierarchy) {
return NULL;
}
- OperationList* activeOps = SkNEW(OperationList);
+ SkPicture::OperationList* activeOps = SkNEW(SkPicture::OperationList);
fBoundingHierarchy->search(query, &(activeOps->fOps));
if (0 != activeOps->fOps.count()) {

Powered by Google App Engine
This is Rietveld 408576698