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

Unified Diff: src/core/SkPicture.cpp

Issue 364823009: Port suitableForGpuRasterization to SkRecord (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: More SkPicture.h cleanup Created 6 years, 4 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/SkPicture.cpp
diff --git a/src/core/SkPicture.cpp b/src/core/SkPicture.cpp
index fa4c103d5ce1ca5506a5fc7b7731b7bf9c24572a..f1481440e8e585629f963c8ac701a3784fd4eea0 100644
--- a/src/core/SkPicture.cpp
+++ b/src/core/SkPicture.cpp
@@ -20,7 +20,6 @@
#include "SkDrawPictureCallback.h"
#include "SkPaintPriv.h"
#include "SkPicture.h"
-#include "SkRecordAnalysis.h"
#include "SkRegion.h"
#include "SkStream.h"
#include "SkTDArray.h"
@@ -50,8 +49,7 @@ template <typename T> int SafeCount(const T* obj) {
// fRecord OK
SkPicture::SkPicture()
: fWidth(0)
- , fHeight(0)
- , fRecordWillPlayBackBitmaps(false) {
+ , fHeight(0) {
this->needsNewGenID();
}
#endif
@@ -61,8 +59,7 @@ SkPicture::SkPicture(int width, int height,
const SkPictureRecord& record,
bool deepCopyOps)
: fWidth(width)
- , fHeight(height)
- , fRecordWillPlayBackBitmaps(false) {
+ , fHeight(height) {
this->needsNewGenID();
SkPictInfo info;
@@ -137,7 +134,6 @@ SkPicture* SkPicture::clone() const {
}
SkPicture* clone = SkNEW_ARGS(SkPicture, (newData.detach(), fWidth, fHeight));
- clone->fRecordWillPlayBackBitmaps = fRecordWillPlayBackBitmaps;
clone->fUniqueID = this->uniqueID(); // need to call method to ensure != 0
return clone;
@@ -264,8 +260,7 @@ bool SkPicture::InternalOnly_BufferIsSKP(SkReadBuffer& buffer, SkPictInfo* pInfo
SkPicture::SkPicture(SkPictureData* data, int width, int height)
: fData(data)
, fWidth(width)
- , fHeight(height)
- , fRecordWillPlayBackBitmaps(false) {
+ , fHeight(height) {
this->needsNewGenID();
}
@@ -396,7 +391,7 @@ bool SkPicture::suitableForGpuRasterization(GrContext* context, const char **rea
// fRecord OK
bool SkPicture::willPlayBackBitmaps() const {
if (fRecord.get()) {
- return fRecordWillPlayBackBitmaps;
+ return fRecord->fAccelerationInfo.fWillPlaybackBitmaps;
}
if (!fData.get()) {
return false;
@@ -429,8 +424,7 @@ SkPicture::SkPicture(int width, int height, SkRecord* record, SkBBoxHierarchy* b
: fWidth(width)
, fHeight(height)
, fRecord(record)
- , fBBH(SkSafeRef(bbh))
- , fRecordWillPlayBackBitmaps(SkRecordWillPlaybackBitmaps(*record)) {
+ , fBBH(SkSafeRef(bbh)) {
// TODO: delay as much of this work until just before first playback?
if (fBBH.get()) {
SkRecordFillBounds(*record, fBBH.get());
« no previous file with comments | « include/core/SkPicture.h ('k') | src/core/SkPictureAnalysis.h » ('j') | src/core/SkRecord.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698