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

Unified Diff: src/gpu/SkGpuDevice.h

Issue 925343002: Swap render target instead of creating a new gpu device for surface copy-on-write (Closed) Base URL: https://skia.googlesource.com/skia.git@skimage-filters-02-use-sksurface-constructor-skgpudevice
Patch Set: Created 5 years, 10 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/gpu/SkGpuDevice.h
diff --git a/src/gpu/SkGpuDevice.h b/src/gpu/SkGpuDevice.h
index 6cbf628e58b90724608af7dedc751fe5b60c2c03..9eddc41a21521153902ac8b27037b4fc56f2c37d 100644
--- a/src/gpu/SkGpuDevice.h
+++ b/src/gpu/SkGpuDevice.h
@@ -50,6 +50,10 @@ public:
virtual ~SkGpuDevice();
+ /** Creates a render targetthat can be used as the render target of the device. */
+ static GrRenderTarget* CreateRenderTarget(GrContext* context, SkSurface::Budgeted budgeted,
bsalomon 2015/02/18 14:29:36 Is it possible to just infer the parameters for th
Kimmo Kinnunen 2015/02/18 14:42:54 Yeah, this is just a refactoring. I did not hone i
+ const SkImageInfo& info, int sampleCount);
+
SkGpuDevice* cloneDevice(const SkSurfaceProps& props) {
SkBaseDevice* dev = this->onCreateCompatibleDevice(CreateInfo(this->imageInfo(),
kGeneral_Usage,
@@ -62,6 +66,8 @@ public:
// set all pixels to 0
void clearAll();
+ void swapRenderTarget(GrRenderTarget* newTarget);
+
GrRenderTarget* accessRenderTarget() SK_OVERRIDE;
SkImageInfo imageInfo() const SK_OVERRIDE {
« no previous file with comments | « src/core/SkCanvas.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | src/image/SkSurface_Gpu.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698