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

Unified Diff: src/gpu/GrLayerHoister.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/SkPictureReplacementPlayback.cpp ('k') | src/gpu/GrRecordReplaceDraw.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrLayerHoister.cpp
diff --git a/src/gpu/GrLayerHoister.cpp b/src/gpu/GrLayerHoister.cpp
index 2dfefcd3feea6d06a05191134b15db3ec6f49162..2ed5b0ae80e0678ba9be015627ab6386bc511360 100644
--- a/src/gpu/GrLayerHoister.cpp
+++ b/src/gpu/GrLayerHoister.cpp
@@ -7,8 +7,8 @@
#include "GrLayerCache.h"
#include "GrLayerHoister.h"
-#include "SkPictureRangePlayback.h"
#include "SkCanvas.h"
+#include "SkRecordDraw.h"
#include "SkSurface.h"
// Return true if any layers are suitable for hoisting
@@ -94,10 +94,8 @@ void GrLayerHoister::DrawLayers(const SkPicture* picture,
atlasCanvas->translate(bound.fLeft, bound.fTop);
atlasCanvas->concat(layer->ctm());
- SkPictureRangePlayback rangePlayback(picture,
- layer->start(),
- layer->stop());
- rangePlayback.draw(atlasCanvas, NULL);
+ SkRecordPartialDraw(*picture->fRecord.get(), atlasCanvas, bound,
+ layer->start(), layer->stop());
atlasCanvas->restore();
}
@@ -111,9 +109,9 @@ void GrLayerHoister::DrawLayers(const SkPicture* picture,
// Each non-atlased layer has its own GrTexture
SkAutoTUnref<SkSurface> surface(SkSurface::NewRenderTargetDirect(
- layer->texture()->asRenderTarget(),
- SkSurface::kStandard_TextRenderMode,
- SkSurface::kDontClear_RenderTargetFlag));
+ layer->texture()->asRenderTarget(),
+ SkSurface::kStandard_TextRenderMode,
+ SkSurface::kDontClear_RenderTargetFlag));
SkCanvas* layerCanvas = surface->getCanvas();
@@ -130,10 +128,8 @@ void GrLayerHoister::DrawLayers(const SkPicture* picture,
layerCanvas->concat(layer->ctm());
- SkPictureRangePlayback rangePlayback(picture,
- layer->start(),
- layer->stop());
- rangePlayback.draw(layerCanvas, NULL);
+ SkRecordPartialDraw(*picture->fRecord.get(), layerCanvas, bound,
+ layer->start(), layer->stop());
layerCanvas->flush();
}
« no previous file with comments | « src/core/SkPictureReplacementPlayback.cpp ('k') | src/gpu/GrRecordReplaceDraw.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698