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

Unified Diff: src/core/SkPictureRecorder.cpp

Issue 719133002: Rename GrAccelData to SkLayerInfo and move it to src/core (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix up unit test Created 6 years, 1 month 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/SkLayerInfo.cpp ('k') | src/core/SkRecordDraw.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPictureRecorder.cpp
diff --git a/src/core/SkPictureRecorder.cpp b/src/core/SkPictureRecorder.cpp
index 160446797dc8ba00b75cc989a831343fa71dfa36..3441a0dfeb265f14d4568d50af188b6fa1446553 100644
--- a/src/core/SkPictureRecorder.cpp
+++ b/src/core/SkPictureRecorder.cpp
@@ -5,6 +5,7 @@
* found in the LICENSE file.
*/
+#include "SkLayerInfo.h"
#include "SkPictureRecorder.h"
#include "SkRecord.h"
#include "SkRecordDraw.h"
@@ -12,12 +13,6 @@
#include "SkRecordOpts.h"
#include "SkTypes.h"
-// Must place SK_SUPPORT_GPU after other includes so it is defined in the
-// Android framework build.
-#if SK_SUPPORT_GPU
-#include "GrPictureUtils.h"
-#endif
-
SkPictureRecorder::SkPictureRecorder() {}
SkPictureRecorder::~SkPictureRecorder() {}
@@ -47,37 +42,29 @@ SkPicture* SkPictureRecorder::endRecording() {
// TODO: delay as much of this work until just before first playback?
SkRecordOptimize(fRecord);
-#if SK_SUPPORT_GPU
- SkAutoTUnref<GrAccelData> saveLayerData;
+ SkAutoTUnref<SkLayerInfo> saveLayerData;
if (fBBH && (fFlags & kComputeSaveLayerInfo_RecordFlag)) {
- SkPicture::AccelData::Key key = GrAccelData::ComputeAccelDataKey();
+ SkPicture::AccelData::Key key = SkLayerInfo::ComputeKey();
- saveLayerData.reset(SkNEW_ARGS(GrAccelData, (key)));
+ saveLayerData.reset(SkNEW_ARGS(SkLayerInfo, (key)));
}
-#endif
if (fBBH.get()) {
SkRect cullRect = SkRect::MakeWH(fCullWidth, fCullHeight);
-#if SK_SUPPORT_GPU
if (saveLayerData) {
SkRecordComputeLayers(cullRect, *fRecord, fBBH.get(), saveLayerData);
} else {
-#endif
SkRecordFillBounds(cullRect, *fRecord, fBBH.get());
-#if SK_SUPPORT_GPU
}
-#endif
}
SkPicture* pict = SkNEW_ARGS(SkPicture, (fCullWidth, fCullHeight, fRecord.detach(), fBBH.get()));
-#if SK_SUPPORT_GPU
if (saveLayerData) {
pict->EXPERIMENTAL_addAccelData(saveLayerData);
}
-#endif
return pict;
}
« no previous file with comments | « src/core/SkLayerInfo.cpp ('k') | src/core/SkRecordDraw.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698