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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 * | 192 * |
193 * Preroll() can be called before drawing to try to perform this prepatory
work ahead of time. | 193 * Preroll() can be called before drawing to try to perform this prepatory
work ahead of time. |
194 * For images that have no such work, this returns instantly. Others may do
some thing to | 194 * For images that have no such work, this returns instantly. Others may do
some thing to |
195 * prepare their cache and then return. | 195 * prepare their cache and then return. |
196 * | 196 * |
197 * If the image will drawn to a GPU-backed canvas or surface, pass the asso
ciated GrContext. | 197 * If the image will drawn to a GPU-backed canvas or surface, pass the asso
ciated GrContext. |
198 * If the image will be drawn to any other type of canvas or surface, pass
null. | 198 * If the image will be drawn to any other type of canvas or surface, pass
null. |
199 */ | 199 */ |
200 void preroll(GrContext* = nullptr) const; | 200 void preroll(GrContext* = nullptr) const; |
201 | 201 |
202 // DEPRECATED | 202 // DEPRECATED - currently used by Canvas2DLayerBridge in Chromium. |
203 GrTexture* getTexture() const; | 203 GrTexture* getTexture() const; |
204 | 204 |
205 /** | 205 /** |
206 * Returns true if the image is texture backed. | 206 * Returns true if the image is texture backed. |
207 */ | 207 */ |
208 bool isTextureBacked() const; | 208 bool isTextureBacked() const; |
209 | 209 |
210 /** | 210 /** |
211 * Retrieves the backend API handle of the texture. If flushPendingGrContex
tIO then the | 211 * Retrieves the backend API handle of the texture. If flushPendingGrContex
tIO then the |
212 * GrContext will issue to the backend API any deferred IO operations on th
e texture before | 212 * GrContext will issue to the backend API any deferred IO operations on th
e texture before |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 | 343 |
344 private: | 344 private: |
345 const int fWidth; | 345 const int fWidth; |
346 const int fHeight; | 346 const int fHeight; |
347 const uint32_t fUniqueID; | 347 const uint32_t fUniqueID; |
348 | 348 |
349 typedef SkRefCnt INHERITED; | 349 typedef SkRefCnt INHERITED; |
350 }; | 350 }; |
351 | 351 |
352 #endif | 352 #endif |
OLD | NEW |