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

Unified Diff: include/gpu/SkGpuDevice.h

Issue 168653002: Change device factories to take SkImageInfo instead of SkBitmap::Config (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: fix PdfViewer Created 6 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 | « include/device/xps/SkXPSDevice.h ('k') | include/gpu/SkGr.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/SkGpuDevice.h
diff --git a/include/gpu/SkGpuDevice.h b/include/gpu/SkGpuDevice.h
index 8b2170da6dbcceca5bbc1731542106236544f7b6..3ccab51831dca58f17df7bd4a114b49d1da7392e 100644
--- a/include/gpu/SkGpuDevice.h
+++ b/include/gpu/SkGpuDevice.h
@@ -37,11 +37,21 @@ public:
/**
* New device that will create an offscreen renderTarget based on the
+ * ImageInfo and sampleCount. The device's storage will not
+ * count against the GrContext's texture cache budget. The device's pixels
+ * will be uninitialized. On failure, returns NULL.
+ */
+ static SkGpuDevice* Create(GrContext*, const SkImageInfo&, int sampleCount);
+
+#ifdef SK_SUPPORT_LEGACY_COMPATIBLEDEVICE_CONFIG
+ /**
+ * 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. TODO: This can fail, replace with a factory function.
*/
SkGpuDevice(GrContext*, SkBitmap::Config, int width, int height, int sampleCount = 0);
+#endif
/**
* DEPRECATED -- need to make this private, call Create(surface)
@@ -163,11 +173,7 @@ private:
// used by createCompatibleDevice
SkGpuDevice(GrContext*, GrTexture* texture, bool needClear);
- // override from SkBaseDevice
- virtual SkBaseDevice* onCreateCompatibleDevice(SkBitmap::Config config,
- int width, int height,
- bool isOpaque,
- Usage usage) SK_OVERRIDE;
+ virtual SkBaseDevice* onCreateDevice(const SkImageInfo&, Usage) SK_OVERRIDE;
virtual SkSurface* newSurface(const SkImageInfo&) SK_OVERRIDE;
« no previous file with comments | « include/device/xps/SkXPSDevice.h ('k') | include/gpu/SkGr.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698