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

Side by Side Diff: include/core/SkImage.h

Issue 1282363002: Use SkImageCacherator in SkImages (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix rob comments Created 5 years, 3 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 | « include/core/SkBitmap.h ('k') | include/gpu/SkGr.h » ('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_DEFINED 8 #ifndef SkImage_DEFINED
9 #define SkImage_DEFINED 9 #define SkImage_DEFINED
10 10
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 const SkISize yuvSizes[3], 143 const SkISize yuvSizes[3],
144 GrSurfaceOrigin); 144 GrSurfaceOrigin);
145 145
146 static SkImage* NewFromPicture(const SkPicture*, const SkISize& dimensions, 146 static SkImage* NewFromPicture(const SkPicture*, const SkISize& dimensions,
147 const SkMatrix*, const SkPaint*); 147 const SkMatrix*, const SkPaint*);
148 148
149 //////////////////////////////////////////////////////////////////////////// /////////////////// 149 //////////////////////////////////////////////////////////////////////////// ///////////////////
150 150
151 int width() const { return fWidth; } 151 int width() const { return fWidth; }
152 int height() const { return fHeight; } 152 int height() const { return fHeight; }
153 SkISize dimensions() const { return SkISize::Make(fWidth, fHeight); }
154 SkIRect bounds() const { return SkIRect::MakeWH(fWidth, fHeight); }
153 uint32_t uniqueID() const { return fUniqueID; } 155 uint32_t uniqueID() const { return fUniqueID; }
154 virtual bool isOpaque() const { return false; } 156 virtual bool isOpaque() const { return false; }
155 157
156 virtual SkShader* newShader(SkShader::TileMode, 158 virtual SkShader* newShader(SkShader::TileMode,
157 SkShader::TileMode, 159 SkShader::TileMode,
158 const SkMatrix* localMatrix = NULL) const; 160 const SkMatrix* localMatrix = NULL) const;
159 161
160 /** 162 /**
161 * If the image has direct access to its pixels (i.e. they are in local 163 * If the image has direct access to its pixels (i.e. they are in local
162 * RAM) return the (const) address of those pixels, and if not null, return 164 * RAM) return the (const) address of those pixels, and if not null, return
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 331
330 private: 332 private:
331 const int fWidth; 333 const int fWidth;
332 const int fHeight; 334 const int fHeight;
333 const uint32_t fUniqueID; 335 const uint32_t fUniqueID;
334 336
335 typedef SkRefCnt INHERITED; 337 typedef SkRefCnt INHERITED;
336 }; 338 };
337 339
338 #endif 340 #endif
OLDNEW
« no previous file with comments | « include/core/SkBitmap.h ('k') | include/gpu/SkGr.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698