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

Side by Side Diff: src/image/SkImage_Base.h

Issue 605843002: Rename SkImage::draw(_, SkRect, SkRect) in SkImage::drawRect() (Closed) Base URL: https://skia.googlesource.com/skia.git@skimage_draw_forgot
Patch Set: Created 6 years, 2 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 unified diff | Download patch
« no previous file with comments | « src/image/SkImage.cpp ('k') | src/image/SkImage_Gpu.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkImage_Base_DEFINED 8 #ifndef SkImage_Base_DEFINED
9 #define SkImage_Base_DEFINED 9 #define SkImage_Base_DEFINED
10 10
11 #include "SkImage.h" 11 #include "SkImage.h"
12 12
13 class SkImage_Base : public SkImage { 13 class SkImage_Base : public SkImage {
14 public: 14 public:
15 SkImage_Base(int width, int height) : INHERITED(width, height) {} 15 SkImage_Base(int width, int height) : INHERITED(width, height) {}
16 16
17 virtual void onDraw(SkCanvas*, SkScalar x, SkScalar y, const SkPaint*) const = 0; 17 virtual void onDraw(SkCanvas*, SkScalar x, SkScalar y, const SkPaint*) const = 0;
18 virtual void onDrawRectToRect(SkCanvas*, const SkRect* src, 18 virtual void onDrawRect(SkCanvas*, const SkRect* src,
19 const SkRect& dst, const SkPaint*) const = 0; 19 const SkRect& dst, const SkPaint*) const = 0;
20 20
21 // Default impl calls onDraw 21 // Default impl calls onDraw
22 virtual bool onReadPixels(SkBitmap*, const SkIRect& subset) const; 22 virtual bool onReadPixels(SkBitmap*, const SkIRect& subset) const;
23 23
24 virtual const void* onPeekPixels(SkImageInfo*, size_t* /*rowBytes*/) const { 24 virtual const void* onPeekPixels(SkImageInfo*, size_t* /*rowBytes*/) const {
25 return NULL; 25 return NULL;
26 } 26 }
27 27
28 virtual GrTexture* onGetTexture() const { return NULL; } 28 virtual GrTexture* onGetTexture() const { return NULL; }
29 29
30 // return a read-only copy of the pixels. We promise to not modify them, 30 // return a read-only copy of the pixels. We promise to not modify them,
31 // but only inspect them (or encode them). 31 // but only inspect them (or encode them).
32 virtual bool getROPixels(SkBitmap*) const { return false; } 32 virtual bool getROPixels(SkBitmap*) const { return false; }
33 33
34 virtual SkShader* onNewShader(SkShader::TileMode, 34 virtual SkShader* onNewShader(SkShader::TileMode,
35 SkShader::TileMode, 35 SkShader::TileMode,
36 const SkMatrix* localMatrix) const { return NU LL; }; 36 const SkMatrix* localMatrix) const { return NU LL; };
37 private: 37 private:
38 typedef SkImage INHERITED; 38 typedef SkImage INHERITED;
39 }; 39 };
40 40
41 #endif 41 #endif
OLDNEW
« no previous file with comments | « src/image/SkImage.cpp ('k') | src/image/SkImage_Gpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698