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

Unified Diff: src/image/SkSurface_Gpu.h

Issue 912243004: Make all SkSurface_* -related devices all have a device (Closed) Base URL: https://skia.googlesource.com/skia.git@skimage-filters-03-sksurface-set-root-device
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
« no previous file with comments | « src/image/SkSurface_Base.h ('k') | src/image/SkSurface_Gpu.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/image/SkSurface_Gpu.h
diff --git a/src/image/SkSurface_Gpu.h b/src/image/SkSurface_Gpu.h
index 636bb018d04b2c17417f1788579b02ccac276c97..e3d478501717263ec70ba578eb26def52ed95ddb 100644
--- a/src/image/SkSurface_Gpu.h
+++ b/src/image/SkSurface_Gpu.h
@@ -9,6 +9,7 @@
#define SkSurface_Gpu_DEFINED
#include "SkSurface_Base.h"
+#include "SkDevice.h"
#if SK_SUPPORT_GPU
@@ -36,8 +37,20 @@ public:
*/
static GrRenderTarget* CreateRenderTarget(GrContext*, SkSurface::Budgeted, const SkImageInfo&,
int sampleCount);
+
+ /** Creates a surface that is attached to a device.
+ * The device will own the reference to the surface, and the surface will go out of scope when
+ * the device goes out of scope. Note: This function is deprecated, it will be renamed to
+ * SkSurface_Gpu* createCompatibleSurface(const SkBaseDevice::CreateInfo& cinfo)
+ */
+ SkGpuDevice* createCompatibleDeviceDeprecated(const SkBaseDevice::CreateInfo& cinfo);
+
private:
+ enum ReverseOwnershipDeprecated { kReverseOwnershipDeprecated };
+ SkSurface_Gpu(SkGpuDevice*, ReverseOwnershipDeprecated);
+
SkGpuDevice* fDevice;
+ bool fOwnsDevice;
typedef SkSurface_Base INHERITED;
};
« no previous file with comments | « src/image/SkSurface_Base.h ('k') | src/image/SkSurface_Gpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698