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

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

Issue 2147493004: Add a function to convert a texture backed SkImage to raster. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: cleanup Created 4 years, 5 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/SkImage.h ('k') | src/image/SkImage_Gpu.cpp » ('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 "SkBitmapCache.h" 9 #include "SkBitmapCache.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 const GrBackendObject yuvTexture Handles[3], 424 const GrBackendObject yuvTexture Handles[3],
425 const SkISize yuvSizes[3], 425 const SkISize yuvSizes[3],
426 GrSurfaceOrigin origin) { 426 GrSurfaceOrigin origin) {
427 return nullptr; 427 return nullptr;
428 } 428 }
429 429
430 sk_sp<SkImage> SkImage::makeTextureImage(GrContext*) const { 430 sk_sp<SkImage> SkImage::makeTextureImage(GrContext*) const {
431 return nullptr; 431 return nullptr;
432 } 432 }
433 433
434 sk_sp<SkImage> SkImage::makeNonTextureImage() const {
435 return sk_ref_sp(const_cast<SkImage*>(this));
436 }
437
434 #endif 438 #endif
435 439
436 //////////////////////////////////////////////////////////////////////////////// /////////////////// 440 //////////////////////////////////////////////////////////////////////////////// ///////////////////
437 441
438 #ifdef SK_SUPPORT_LEGACY_IMAGEFACTORY 442 #ifdef SK_SUPPORT_LEGACY_IMAGEFACTORY
439 SkImage* SkImage::NewRasterCopy(const Info& info, const void* pixels, size_t row Bytes, 443 SkImage* SkImage::NewRasterCopy(const Info& info, const void* pixels, size_t row Bytes,
440 SkColorTable* ctable) { 444 SkColorTable* ctable) {
441 return MakeRasterCopy(SkPixmap(info, pixels, rowBytes, ctable)).release(); 445 return MakeRasterCopy(SkPixmap(info, pixels, rowBytes, ctable)).release();
442 } 446 }
443 447
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 SkImage* SkImage::NewFromDeferredTextureImageData(GrContext* ctx, const void* da ta, 501 SkImage* SkImage::NewFromDeferredTextureImageData(GrContext* ctx, const void* da ta,
498 SkBudgeted budgeted) { 502 SkBudgeted budgeted) {
499 return MakeFromDeferredTextureImageData(ctx, data, budgeted).release(); 503 return MakeFromDeferredTextureImageData(ctx, data, budgeted).release();
500 } 504 }
501 #endif 505 #endif
502 506
503 sk_sp<SkImage> MakeTextureFromMipMap(GrContext*, const SkImageInfo&, const GrMip Level* texels, 507 sk_sp<SkImage> MakeTextureFromMipMap(GrContext*, const SkImageInfo&, const GrMip Level* texels,
504 int mipLevelCount, SkBudgeted) { 508 int mipLevelCount, SkBudgeted) {
505 return nullptr; 509 return nullptr;
506 } 510 }
OLDNEW
« no previous file with comments | « include/core/SkImage.h ('k') | src/image/SkImage_Gpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698