OLD | NEW |
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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 * deleted after the function returns. The image will have the dimensions o
f the y texture. | 138 * deleted after the function returns. The image will have the dimensions o
f the y texture. |
139 */ | 139 */ |
140 static SkImage* NewFromYUVTexturesCopy(GrContext*, SkYUVColorSpace, | 140 static SkImage* NewFromYUVTexturesCopy(GrContext*, SkYUVColorSpace, |
141 const GrBackendObject yuvTextureHandl
es[3], | 141 const GrBackendObject yuvTextureHandl
es[3], |
142 const SkISize yuvSizes[3], | 142 const SkISize yuvSizes[3], |
143 GrSurfaceOrigin); | 143 GrSurfaceOrigin); |
144 | 144 |
145 static SkImage* NewFromPicture(const SkPicture*, const SkISize& dimensions, | 145 static SkImage* NewFromPicture(const SkPicture*, const SkISize& dimensions, |
146 const SkMatrix*, const SkPaint*); | 146 const SkMatrix*, const SkPaint*); |
147 | 147 |
148 static SkImage* NewTextureFromPixmap(GrContext*, const SkPixmap&, SkBudgeted
budgeted); | |
149 | |
150 ////////////////////////////////////////////////////////////////////////////
/////////////////// | 148 ////////////////////////////////////////////////////////////////////////////
/////////////////// |
151 | 149 |
152 int width() const { return fWidth; } | 150 int width() const { return fWidth; } |
153 int height() const { return fHeight; } | 151 int height() const { return fHeight; } |
154 SkISize dimensions() const { return SkISize::Make(fWidth, fHeight); } | 152 SkISize dimensions() const { return SkISize::Make(fWidth, fHeight); } |
155 SkIRect bounds() const { return SkIRect::MakeWH(fWidth, fHeight); } | 153 SkIRect bounds() const { return SkIRect::MakeWH(fWidth, fHeight); } |
156 uint32_t uniqueID() const { return fUniqueID; } | 154 uint32_t uniqueID() const { return fUniqueID; } |
157 virtual bool isOpaque() const { return false; } | 155 virtual bool isOpaque() const { return false; } |
158 | 156 |
159 /** | 157 /** |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 | 347 |
350 private: | 348 private: |
351 const int fWidth; | 349 const int fWidth; |
352 const int fHeight; | 350 const int fHeight; |
353 const uint32_t fUniqueID; | 351 const uint32_t fUniqueID; |
354 | 352 |
355 typedef SkRefCnt INHERITED; | 353 typedef SkRefCnt INHERITED; |
356 }; | 354 }; |
357 | 355 |
358 #endif | 356 #endif |
OLD | NEW |