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

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

Issue 1744243002: Remove internal calls to SkImage::getTexture (Closed) Base URL: https://skia.googlesource.com/skia.git@budalias
Patch Set: Add getTexture() back to SkImage :( 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/core/SkSpecialImage.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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 } 162 }
163 return as_IB(this)->onNewSubset(subset); 163 return as_IB(this)->onNewSubset(subset);
164 } 164 }
165 165
166 #if SK_SUPPORT_GPU 166 #if SK_SUPPORT_GPU
167 167
168 GrTexture* SkImage::getTexture() const { 168 GrTexture* SkImage::getTexture() const {
169 return as_IB(this)->peekTexture(); 169 return as_IB(this)->peekTexture();
170 } 170 }
171 171
172 bool SkImage::isTextureBacked() const { return SkToBool(as_IB(this)->getTexture( )); } 172 bool SkImage::isTextureBacked() const { return SkToBool(as_IB(this)->peekTexture ()); }
173 173
174 GrBackendObject SkImage::getTextureHandle(bool flushPendingGrContextIO) const { 174 GrBackendObject SkImage::getTextureHandle(bool flushPendingGrContextIO) const {
175 GrTexture* texture = as_IB(this)->getTexture(); 175 GrTexture* texture = as_IB(this)->peekTexture();
176 if (texture) { 176 if (texture) {
177 GrContext* context = texture->getContext(); 177 GrContext* context = texture->getContext();
178 if (context) { 178 if (context) {
179 if (flushPendingGrContextIO) { 179 if (flushPendingGrContextIO) {
180 context->prepareSurfaceForExternalIO(texture); 180 context->prepareSurfaceForExternalIO(texture);
181 } 181 }
182 } 182 }
183 return texture->getTextureHandle(); 183 return texture->getTextureHandle();
184 } 184 }
185 return 0; 185 return 0;
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 354
355 SkImage* SkImage::NewFromTextureCopy(GrContext*, const GrBackendTextureDesc&, Sk AlphaType) { 355 SkImage* SkImage::NewFromTextureCopy(GrContext*, const GrBackendTextureDesc&, Sk AlphaType) {
356 return nullptr; 356 return nullptr;
357 } 357 }
358 358
359 SkImage* SkImage::newTextureImage(GrContext*) const { 359 SkImage* SkImage::newTextureImage(GrContext*) const {
360 return nullptr; 360 return nullptr;
361 } 361 }
362 362
363 #endif 363 #endif
OLDNEW
« no previous file with comments | « src/core/SkSpecialImage.cpp ('k') | src/image/SkImage_Base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698