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

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

Issue 1776693002: Add deferred texture upload API. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase on sk_skp Created 4 years, 9 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 | « src/gpu/GrContext.cpp ('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 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 352
353 sk_sp<SkImage> SkImage::MakeTextureFromPixmap(GrContext*, const SkPixmap&, SkBud geted budgeted) { 353 sk_sp<SkImage> SkImage::MakeTextureFromPixmap(GrContext*, const SkPixmap&, SkBud geted budgeted) {
354 return nullptr; 354 return nullptr;
355 } 355 }
356 356
357 sk_sp<SkImage> SkImage::MakeFromTexture(GrContext*, const GrBackendTextureDesc&, SkAlphaType, 357 sk_sp<SkImage> SkImage::MakeFromTexture(GrContext*, const GrBackendTextureDesc&, SkAlphaType,
358 TextureReleaseProc, ReleaseContext) { 358 TextureReleaseProc, ReleaseContext) {
359 return nullptr; 359 return nullptr;
360 } 360 }
361 361
362 size_t SkImage::getDeferredTextureImageData(const GrContextThreadSafeProxy&,
363 const DeferredTextureImageUsageParam s[],
364 int paramCnt, void* buffer) const {
365 return 0;
366 }
367
368 sk_sp<SkImage> SkImage::MakeFromDeferredTextureImageData(GrContext* context, con st void*,
369 SkBudgeted) {
370 return nullptr;
371 }
372
362 sk_sp<SkImage> SkImage::MakeFromAdoptedTexture(GrContext*, const GrBackendTextur eDesc&, 373 sk_sp<SkImage> SkImage::MakeFromAdoptedTexture(GrContext*, const GrBackendTextur eDesc&,
363 SkAlphaType) { 374 SkAlphaType) {
364 return nullptr; 375 return nullptr;
365 } 376 }
366 377
367 sk_sp<SkImage> SkImage::MakeFromTextureCopy(GrContext*, const GrBackendTextureDe sc&, SkAlphaType) { 378 sk_sp<SkImage> SkImage::MakeFromTextureCopy(GrContext*, const GrBackendTextureDe sc&, SkAlphaType) {
368 return nullptr; 379 return nullptr;
369 } 380 }
370 381
371 sk_sp<SkImage> SkImage::MakeFromYUVTexturesCopy(GrContext* ctx, SkYUVColorSpace space, 382 sk_sp<SkImage> SkImage::MakeFromYUVTexturesCopy(GrContext* ctx, SkYUVColorSpace space,
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 445
435 SkImage* SkImage::NewFromPicture(const SkPicture* picture, const SkISize& dimens ions, 446 SkImage* SkImage::NewFromPicture(const SkPicture* picture, const SkISize& dimens ions,
436 const SkMatrix* matrix, const SkPaint* paint) { 447 const SkMatrix* matrix, const SkPaint* paint) {
437 return MakeFromPicture(sk_ref_sp(const_cast<SkPicture*>(picture)), dimension s, 448 return MakeFromPicture(sk_ref_sp(const_cast<SkPicture*>(picture)), dimension s,
438 matrix, paint).release(); 449 matrix, paint).release();
439 } 450 }
440 451
441 SkImage* SkImage::NewTextureFromPixmap(GrContext* ctx, const SkPixmap& pmap, SkB udgeted budgeted) { 452 SkImage* SkImage::NewTextureFromPixmap(GrContext* ctx, const SkPixmap& pmap, SkB udgeted budgeted) {
442 return MakeTextureFromPixmap(ctx, pmap, budgeted).release(); 453 return MakeTextureFromPixmap(ctx, pmap, budgeted).release();
443 } 454 }
455
456 SkImage* SkImage::NewFromDeferredTextureImageData(GrContext* ctx, const void* da ta,
457 SkBudgeted budgeted) {
458 return MakeFromDeferredTextureImageData(ctx, data, budgeted).release();
459 }
444 #endif 460 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/image/SkImage_Gpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698