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

Unified Diff: src/core/SkPictureRecord.h

Issue 187833003: First version of bitmap use tracking in SkPictureRecord (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Actually upload SkOffsetTable.h 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/SkPicturePlayback.cpp ('k') | src/core/SkPictureRecord.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPictureRecord.h
===================================================================
--- src/core/SkPictureRecord.h (revision 13686)
+++ src/core/SkPictureRecord.h (working copy)
@@ -19,8 +19,9 @@
#include "SkTemplates.h"
#include "SkWriter32.h"
+class SkBBoxHierarchy;
+class SkOffsetTable;
class SkPictureStateTree;
-class SkBBoxHierarchy;
// These macros help with packing and unpacking a single byte value and
// a 3 byte value into/out of a uint32_t
@@ -164,7 +165,9 @@
fWriter.writeScalar(scalar);
}
- void addBitmap(const SkBitmap& bitmap);
+ // The command at 'offset' in the skp uses the specified bitmap
+ void trackBitmapUse(int bitmapID, size_t offset);
+ int addBitmap(const SkBitmap& bitmap);
void addMatrix(const SkMatrix& matrix);
const SkFlatData* addPaint(const SkPaint& paint) { return this->addPaintPtr(&paint); }
const SkFlatData* addPaintPtr(const SkPaint* paint);
@@ -294,6 +297,8 @@
bool fOptsEnabled;
int fInitialSaveCount;
+ SkAutoTUnref<SkOffsetTable> fBitmapUseOffsets;
+
friend class SkPicturePlayback;
friend class SkPictureTester; // for unit testing
« no previous file with comments | « src/core/SkPicturePlayback.cpp ('k') | src/core/SkPictureRecord.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698