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

Unified Diff: src/core/SkPicture.cpp

Issue 617953002: Strip old backend recording down to essentials (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: debug-only 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/SkBBoxRecord.cpp ('k') | src/core/SkPictureData.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPicture.cpp
diff --git a/src/core/SkPicture.cpp b/src/core/SkPicture.cpp
index 10bbbcedb3493f0c46deee92e919d4c7b76434d1..def67e6571f422af37a6686b834c4d8caf715ff4 100644
--- a/src/core/SkPicture.cpp
+++ b/src/core/SkPicture.cpp
@@ -12,7 +12,6 @@
#include "SkPicturePlayback.h"
#include "SkPictureRecord.h"
#include "SkPictureRecorder.h"
-#include "SkPictureStateTree.h"
#include "SkBitmapDevice.h"
#include "SkCanvas.h"
@@ -32,7 +31,6 @@
#include "SkReader32.h"
#include "SkWriter32.h"
#include "SkRTree.h"
-#include "SkBBoxHierarchyRecord.h"
#if SK_SUPPORT_GPU
#include "GrContext.h"
@@ -307,32 +305,21 @@ SkPicture::AccelData::Domain SkPicture::AccelData::GenerateDomain() {
///////////////////////////////////////////////////////////////////////////////
-uint32_t SkPicture::OperationList::offset(int index) const {
- SkASSERT(index < fOps.count());
- return ((SkPictureStateTree::Draw*)fOps[index])->fOffset;
-}
-
-const SkMatrix& SkPicture::OperationList::matrix(int index) const {
- SkASSERT(index < fOps.count());
- return *((SkPictureStateTree::Draw*)fOps[index])->fMatrix;
-}
-
// fRecord OK
void SkPicture::playback(SkCanvas* canvas, SkDrawPictureCallback* callback) const {
SkASSERT(canvas);
SkASSERT(fData.get() || fRecord.get());
- // If the query contains the whole picture, don't bother with the BBH.
- SkRect clipBounds = { 0, 0, 0, 0 };
- (void)canvas->getClipBounds(&clipBounds);
- const bool useBBH = !clipBounds.contains(this->cullRect());
-
if (fData.get()) {
SkPicturePlayback playback(this);
- playback.setUseBBH(useBBH);
playback.draw(canvas, callback);
}
if (fRecord.get()) {
+ // If the query contains the whole picture, don't bother with the BBH.
+ SkRect clipBounds = { 0, 0, 0, 0 };
+ (void)canvas->getClipBounds(&clipBounds);
+ const bool useBBH = !clipBounds.contains(this->cullRect());
+
SkRecordDraw(*fRecord, canvas, useBBH ? fBBH.get() : NULL, callback);
}
}
« no previous file with comments | « src/core/SkBBoxRecord.cpp ('k') | src/core/SkPictureData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698