aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu/SkGpuDevice.h
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-06-16 19:10:39 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-06-16 19:10:39 +0000
commitaf951c9bc4cbb6e60b430194fe5127ebe99c53fb (patch)
treeb1eba8d71a9db8d02de1cf5ca0c13f7a5f6f1e4e /include/gpu/SkGpuDevice.h
parent3cbd37535083a83d517e9d032ba732c2ff8afc6b (diff)
make SkDevice constructors explicit between offscreen and on/direct
Diffstat (limited to 'include/gpu/SkGpuDevice.h')
-rw-r--r--include/gpu/SkGpuDevice.h21
1 files changed, 13 insertions, 8 deletions
diff --git a/include/gpu/SkGpuDevice.h b/include/gpu/SkGpuDevice.h
index 96afa082ff..4d0efeb511 100644
--- a/include/gpu/SkGpuDevice.h
+++ b/include/gpu/SkGpuDevice.h
@@ -19,6 +19,7 @@
#define SkGpuDevice_DEFINED
#include "SkGr.h"
+#include "SkBitmap.h"
#include "SkDevice.h"
#include "SkRegion.h"
@@ -33,15 +34,19 @@ class GrTextContext;
class SK_API SkGpuDevice : public SkDevice {
public:
/**
- * The SkGpuDevice will render to the GrRenderTarget, or if the paremeter is
- * null it will create its own render target and manage that target's
- * lifetime. Setting isSaveLayer to true is for internal use and may cause
- * problems when using the device's bitmap as a src if used externally.
+ * New device that will create an offscreen renderTarget based on the
+ * config, width, height.
+ *
+ * isForSaveLayer is a special flag that should only be set by SkCanvas
+ * internally.
*/
- SkGpuDevice(GrContext*,
- const SkBitmap& bitmap,
- GrRenderTarget* renderTargetOrNull,
- bool isSaveLayer = false);
+ SkGpuDevice(GrContext*, SkBitmap::Config, int width, int height,
+ bool isForSaveLayer = false);
+
+ /**
+ * New device that will render to the specified renderTarget.
+ */
+ SkGpuDevice(GrContext*, GrRenderTarget*);
/**
* Magic value that can be passed to constructor. Causes