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

Unified Diff: src/image/SkImage_Gpu.cpp

Issue 14646007: Adding public API method on SkImage for extracting the GPU texture handle. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 8 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/SkImage_Base.h ('k') | tests/SurfaceTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/image/SkImage_Gpu.cpp
===================================================================
--- src/image/SkImage_Gpu.cpp (revision 8915)
+++ src/image/SkImage_Gpu.cpp (working copy)
@@ -21,6 +21,7 @@
virtual ~SkImage_Gpu();
virtual void onDraw(SkCanvas*, SkScalar x, SkScalar y, const SkPaint*) SK_OVERRIDE;
+ virtual GrTexture* onGetTexture() SK_OVERRIDE;
GrTexture* getTexture() { return fTexture; }
@@ -56,6 +57,10 @@
canvas->drawBitmap(fBitmap, x, y, paint);
}
+GrTexture* SkImage_Gpu::onGetTexture() {
+ return fTexture;
+}
+
void SkImage_Gpu::setTexture(GrTexture* texture) {
if (texture == fTexture) {
« no previous file with comments | « src/image/SkImage_Base.h ('k') | tests/SurfaceTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698