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

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

Issue 2241353002: pin as texture api (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix comments Created 4 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 | « src/gpu/SkGpuDevice.cpp ('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 "SkBitmapCache.h" 9 #include "SkBitmapCache.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 //////////////////////////////////////////////////////////////////////////////// /////////////////// 504 //////////////////////////////////////////////////////////////////////////////// ///////////////////
505 #include "SkImageDeserializer.h" 505 #include "SkImageDeserializer.h"
506 506
507 sk_sp<SkImage> SkImageDeserializer::makeFromData(SkData* data, const SkIRect* su bset) { 507 sk_sp<SkImage> SkImageDeserializer::makeFromData(SkData* data, const SkIRect* su bset) {
508 return SkImage::MakeFromEncoded(sk_ref_sp(data), subset); 508 return SkImage::MakeFromEncoded(sk_ref_sp(data), subset);
509 } 509 }
510 sk_sp<SkImage> SkImageDeserializer::makeFromMemory(const void* data, size_t leng th, 510 sk_sp<SkImage> SkImageDeserializer::makeFromMemory(const void* data, size_t leng th,
511 const SkIRect* subset) { 511 const SkIRect* subset) {
512 return SkImage::MakeFromEncoded(SkData::MakeWithCopy(data, length), subset); 512 return SkImage::MakeFromEncoded(SkData::MakeWithCopy(data, length), subset);
513 } 513 }
514
515 //////////////////////////////////////////////////////////////////////////////// ///////////////////
516
517 void SkImage_pinAsTexture(const SkImage* image, GrContext* ctx) {
518 SkASSERT(image);
519 SkASSERT(ctx);
520 as_IB(image)->onPinAsTexture(ctx);
521 }
522
523 void SkImage_unpinAsTexture(const SkImage* image, GrContext* ctx) {
524 SkASSERT(image);
525 SkASSERT(ctx);
526 as_IB(image)->onUnpinAsTexture(ctx);
527 }
OLDNEW
« no previous file with comments | « src/gpu/SkGpuDevice.cpp ('k') | src/image/SkImage_Base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698