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

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

Issue 920513003: Make filters use SkImage instead of SkBitmap Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 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 unified diff | Download patch
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
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 virtual SkShader* onNewShader(SkShader::TileMode, 58 virtual SkShader* onNewShader(SkShader::TileMode,
59 SkShader::TileMode, 59 SkShader::TileMode,
60 const SkMatrix* localMatrix) const { return NU LL; }; 60 const SkMatrix* localMatrix) const { return NU LL; };
61 61
62 // newWidth > 0, newHeight > 0, subset either NULL or a proper subset of thi s bounds 62 // newWidth > 0, newHeight > 0, subset either NULL or a proper subset of thi s bounds
63 virtual SkImage* onNewImage(int newWidth, int newHeight, const SkIRect* subs et, 63 virtual SkImage* onNewImage(int newWidth, int newHeight, const SkIRect* subs et,
64 SkFilterQuality) const; 64 SkFilterQuality) const;
65 65
66 virtual void onPreroll() const {} 66 virtual void onPreroll() const {}
67 67
68 virtual size_t getSize() const = 0;
68 private: 69 private:
69 const SkSurfaceProps fProps; 70 const SkSurfaceProps fProps;
70 71
71 typedef SkImage INHERITED; 72 typedef SkImage INHERITED;
72 }; 73 };
73 74
74 static inline SkImage_Base* as_IB(SkImage* image) { 75 static inline SkImage_Base* as_IB(SkImage* image) {
75 return static_cast<SkImage_Base*>(image); 76 return static_cast<SkImage_Base*>(image);
76 } 77 }
77 78
78 static inline const SkImage_Base* as_IB(const SkImage* image) { 79 static inline const SkImage_Base* as_IB(const SkImage* image) {
79 return static_cast<const SkImage_Base*>(image); 80 return static_cast<const SkImage_Base*>(image);
80 } 81 }
81 82
82 #endif 83 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698