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

Unified Diff: include/gpu/SkGpuDevice.h

Issue 13211002: Make GM render to render targets that are also textures. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 9 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 | « gm/gmmain.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/SkGpuDevice.h
===================================================================
--- include/gpu/SkGpuDevice.h (revision 8437)
+++ include/gpu/SkGpuDevice.h (working copy)
@@ -27,16 +27,24 @@
*/
class SK_API SkGpuDevice : public SkDevice {
public:
+
/**
+ * Creates an SkGpuDevice from a GrSurface. This will fail if the surface is not a render
+ * target. The caller owns a ref on the returned device.
+ */
+ static SkGpuDevice* Create(GrSurface* surface);
+
+ /**
* New device that will create an offscreen renderTarget based on the
* config, width, height, and sampleCount. The device's storage will not
* count against the GrContext's texture cache budget. The device's pixels
- * will be uninitialized.
+ * will be uninitialized. TODO: This can fail, replace with a factory function.
*/
SkGpuDevice(GrContext*, SkBitmap::Config, int width, int height, int sampleCount = 0);
/**
* New device that will render to the specified renderTarget.
+ * DEPRECATED: Use Create(surface)
*/
SkGpuDevice(GrContext*, GrRenderTarget*);
@@ -44,6 +52,7 @@
* New device that will render to the texture (as a rendertarget).
* The GrTexture's asRenderTarget() must be non-NULL or device will not
* function.
+ * DEPRECATED: Use Create(surface)
*/
SkGpuDevice(GrContext*, GrTexture*);
« no previous file with comments | « gm/gmmain.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698