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

Unified Diff: src/image/SkImage_Gpu.cpp

Issue 19729007: Add SkImage->draw() call with src and dst rects. (Closed) Base URL: https://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 | « src/image/SkImage_Codec.cpp ('k') | src/image/SkImage_Picture.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/image/SkImage_Gpu.cpp
diff --git a/src/image/SkImage_Gpu.cpp b/src/image/SkImage_Gpu.cpp
index b6e4211d28fc422501ed3c79449a98ec393c5c82..d19d2100c3000b5c8dceef341fead9c3281df819 100644
--- a/src/image/SkImage_Gpu.cpp
+++ b/src/image/SkImage_Gpu.cpp
@@ -21,6 +21,7 @@ public:
virtual ~SkImage_Gpu();
virtual void onDraw(SkCanvas*, SkScalar x, SkScalar y, const SkPaint*) SK_OVERRIDE;
+ virtual void onDrawRectToRect(SkCanvas*, const SkRect* src, const SkRect& dst, const SkPaint*) SK_OVERRIDE;
virtual GrTexture* onGetTexture() SK_OVERRIDE;
virtual bool getROPixels(SkBitmap*) const SK_OVERRIDE {
// TODO
@@ -61,6 +62,11 @@ void SkImage_Gpu::onDraw(SkCanvas* canvas, SkScalar x, SkScalar y,
canvas->drawBitmap(fBitmap, x, y, paint);
}
+void SkImage_Gpu::onDrawRectToRect(SkCanvas* canvas, const SkRect* src, const SkRect& dst,
+ const SkPaint* paint) {
+ canvas->drawBitmapRectToRect(fBitmap, src, dst, paint);
+}
+
GrTexture* SkImage_Gpu::onGetTexture() {
return fTexture;
}
« no previous file with comments | « src/image/SkImage_Codec.cpp ('k') | src/image/SkImage_Picture.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698