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

Side by Side Diff: src/image/SkImage.cpp

Issue 1305453007: SkImage method for detecting lazy decoding (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: review comments Created 5 years, 4 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/SkPixelRef.h ('k') | src/image/SkImage_Base.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 #include "SkBitmap.h" 8 #include "SkBitmap.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkData.h" 10 #include "SkData.h"
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 } 280 }
281 281
282 SkImage* SkImage::NewFromPicture(const SkPicture* picture, const SkISize& dimens ions, 282 SkImage* SkImage::NewFromPicture(const SkPicture* picture, const SkISize& dimens ions,
283 const SkMatrix* matrix, const SkPaint* paint) { 283 const SkMatrix* matrix, const SkPaint* paint) {
284 if (!picture) { 284 if (!picture) {
285 return nullptr; 285 return nullptr;
286 } 286 }
287 return NewFromGenerator(SkImageGenerator::NewFromPicture(dimensions, picture , matrix, paint)); 287 return NewFromGenerator(SkImageGenerator::NewFromPicture(dimensions, picture , matrix, paint));
288 } 288 }
289 289
290 bool SkImage::isLazyGenerated() const {
291 return as_IB(this)->onIsLazyGenerated();
292 }
293
290 //////////////////////////////////////////////////////////////////////////////// ////// 294 //////////////////////////////////////////////////////////////////////////////// //////
291 295
292 #if !SK_SUPPORT_GPU 296 #if !SK_SUPPORT_GPU
293 297
294 SkImage* SkImage::NewFromTexture(GrContext*, const GrBackendTextureDesc&, SkAlph aType, 298 SkImage* SkImage::NewFromTexture(GrContext*, const GrBackendTextureDesc&, SkAlph aType,
295 TextureReleaseProc, ReleaseContext) { 299 TextureReleaseProc, ReleaseContext) {
296 return NULL; 300 return NULL;
297 } 301 }
298 302
299 SkImage* SkImage::NewFromAdoptedTexture(GrContext*, const GrBackendTextureDesc&, SkAlphaType) { 303 SkImage* SkImage::NewFromAdoptedTexture(GrContext*, const GrBackendTextureDesc&, SkAlphaType) {
300 return NULL; 304 return NULL;
301 } 305 }
302 306
303 SkImage* SkImage::NewFromTextureCopy(GrContext*, const GrBackendTextureDesc&, Sk AlphaType) { 307 SkImage* SkImage::NewFromTextureCopy(GrContext*, const GrBackendTextureDesc&, Sk AlphaType) {
304 return NULL; 308 return NULL;
305 } 309 }
306 310
307 #endif 311 #endif
OLDNEW
« no previous file with comments | « include/core/SkPixelRef.h ('k') | src/image/SkImage_Base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698