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

Unified Diff: src/core/SkPictureRangePlayback.cpp

Issue 540543002: Switch Layer Hoisting over to SkRecord backend (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 3 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/SkPictureRangePlayback.h ('k') | src/core/SkPictureReplacementPlayback.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPictureRangePlayback.cpp
diff --git a/src/core/SkPictureRangePlayback.cpp b/src/core/SkPictureRangePlayback.cpp
deleted file mode 100644
index b5e36d6f222d0751a0989fa263f906af85413f82..0000000000000000000000000000000000000000
--- a/src/core/SkPictureRangePlayback.cpp
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright 2014 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#include "SkCanvas.h"
-#include "SkPictureData.h"
-#include "SkPictureRangePlayback.h"
-
-void SkPictureRangePlayback::draw(SkCanvas* canvas, SkDrawPictureCallback* callback) {
- AutoResetOpID aroi(this);
- SkASSERT(0 == fCurOffset);
-
- SkReader32 reader(fPictureData->opData()->bytes(), fPictureData->opData()->size());
-
- if (0 != fStart || 0 != fStop) {
- reader.setOffset(fStart);
- uint32_t size;
- SkDEBUGCODE(DrawType op = ) ReadOpAndSize(&reader, &size);
- SkASSERT(SAVE_LAYER == op);
- reader.setOffset(fStart + size);
- }
-
- // Record this, so we can concat w/ it if we encounter a setMatrix()
- SkMatrix initialMatrix = canvas->getTotalMatrix();
-
- SkAutoCanvasRestore acr(canvas, false);
-
- while (!reader.eof()) {
- if (NULL != callback && callback->abortDrawing()) {
- return;
- }
-
- if (0 != fStart || 0 != fStop) {
- size_t offset = reader.offset();
- if (offset >= fStop) {
- SkDEBUGCODE(uint32_t size;)
- SkDEBUGCODE(DrawType op = ReadOpAndSize(&reader, &size);)
- SkASSERT(RESTORE == op);
- return;
- }
- }
-
- fCurOffset = reader.offset();
- uint32_t size;
- DrawType op = ReadOpAndSize(&reader, &size);
- if (NOOP == op) {
- // NOOPs are to be ignored - do not propagate them any further
- reader.setOffset(fCurOffset + size);
- continue;
- }
-
- this->handleOp(&reader, op, size, canvas, initialMatrix);
- }
-}
« no previous file with comments | « src/core/SkPictureRangePlayback.h ('k') | src/core/SkPictureReplacementPlayback.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698