};
#endif
+#ifdef SK_PICTURE_PROFILING_STUBS
+void SkPicturePlayback::preDraw(size_t offset, int type) {
+}
+
+void SkPicturePlayback::postDraw(size_t offset) {
+}
+#endif
+
void SkPicturePlayback::draw(SkCanvas& canvas) {
#ifdef ENABLE_TIME_DRAW
SkAutoTime at("SkPicture::draw", 50);
SkMatrix initialMatrix = canvas.getTotalMatrix();
while (!reader.eof()) {
- switch (reader.readInt()) {
+#ifdef SK_PICTURE_PROFILING_STUBS
+ size_t curOffset = reader.offset();
+#endif
+ int type = reader.readInt();
+#ifdef SK_PICTURE_PROFILING_STUBS
+ this->preDraw(curOffset, type);
+#endif
+ switch (type) {
case CLIP_PATH: {
const SkPath& path = getPath(reader);
uint32_t packed = reader.readInt();
SkASSERT(0);
}
+#ifdef SK_PICTURE_PROFILING_STUBS
+ this->postDraw(curOffset);
+#endif
+
if (it.isValid()) {
uint32_t off = it.draw();
if (off == SK_MaxU32) {
// drawing and return from draw() after the "current" op code is done
void abort();
+protected:
+#ifdef SK_PICTURE_PROFILING_STUBS
+ virtual void preDraw(size_t offset, int type);
+ virtual void postDraw(size_t offset);
+#endif
+
private:
class TextContainer {
public: