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

Unified Diff: include/core/SkImage.h

Issue 20354003: Make SkImage_Gpu share it's pixelref with the surface to prevent premature return to scratch pool. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 5 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 | « no previous file | src/image/SkImage_Gpu.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkImage.h
===================================================================
--- include/core/SkImage.h (revision 10357)
+++ include/core/SkImage.h (working copy)
@@ -65,8 +65,14 @@
static SkImage* NewRasterCopy(const Info&, const void* pixels, size_t rowBytes);
static SkImage* NewRasterData(const Info&, SkData* pixels, size_t rowBytes);
static SkImage* NewEncodedData(SkData*);
- static SkImage* NewTexture(GrTexture*);
+ /**
+ * GrTexture is a more logical parameter for this factory, but its
+ * interactions with scratch cache still has issues, so for now we take
+ * SkBitmap instead. This will be changed in the future. skbug.com/1449
+ */
+ static SkImage* NewTexture(const SkBitmap&);
+
int width() const { return fWidth; }
int height() const { return fHeight; }
uint32_t uniqueID() const { return fUniqueID; }
« no previous file with comments | « no previous file | src/image/SkImage_Gpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698