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

Unified Diff: src/gpu/SkGpuDevice.cpp

Issue 504393002: Switch GPU Optimization code to SkRecord (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update to ToT 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
« no previous file with comments | « src/gpu/GrPictureUtils.cpp ('k') | tests/PictureTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/SkGpuDevice.cpp
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index 61ae5ce829ea6c6f5a57b444be31e1d1e84bd50a..b3d154b7e21d23cd5f579d24c35c3a4a1ede58e2 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -1861,11 +1861,7 @@ void SkGpuDevice::EXPERIMENTAL_optimize(const SkPicture* picture) {
return;
}
- SkAutoTUnref<GrAccelData> data(SkNEW_ARGS(GrAccelData, (key)));
-
- picture->EXPERIMENTAL_addAccelData(data);
-
- GatherGPUInfo(picture, data);
+ GPUOptimize(picture);
fContext->getLayerCache()->trackPicture(picture);
}
@@ -2004,10 +2000,10 @@ bool SkGpuDevice::EXPERIMENTAL_drawPicture(SkCanvas* mainCanvas, const SkPicture
if (pullForward[i]) {
const GrAccelData::SaveLayerInfo& info = gpuData->saveLayerInfo(i);
- GrCachedLayer* layer = fContext->getLayerCache()->findLayerOrCreate(picture->uniqueID(),
- info.fSaveLayerOpID,
- info.fRestoreOpID,
- info.fCTM);
+ GrCachedLayer* layer = fContext->getLayerCache()->findLayerOrCreate(picture->uniqueID(),
+ info.fSaveLayerOpID,
+ info.fRestoreOpID,
+ info.fOriginXform);
SkPictureReplacementPlayback::PlaybackReplacements::ReplacementInfo* layerInfo =
replacements.push();
@@ -2165,7 +2161,7 @@ void SkGpuDevice::unlockLayers(const SkPicture* picture) {
GrCachedLayer* layer = fContext->getLayerCache()->findLayer(picture->uniqueID(),
info.fSaveLayerOpID,
info.fRestoreOpID,
- info.fCTM);
+ info.fOriginXform);
fContext->getLayerCache()->unlock(layer);
}
« no previous file with comments | « src/gpu/GrPictureUtils.cpp ('k') | tests/PictureTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698