| OLD | NEW |
| 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 if (NULL == subset && this->width() == newWidth && this->height() == newHeig
ht) { | 112 if (NULL == subset && this->width() == newWidth && this->height() == newHeig
ht) { |
| 113 return SkRef(const_cast<SkImage*>(this)); | 113 return SkRef(const_cast<SkImage*>(this)); |
| 114 } | 114 } |
| 115 | 115 |
| 116 return as_IB(this)->onNewImage(newWidth, newHeight, subset, quality); | 116 return as_IB(this)->onNewImage(newWidth, newHeight, subset, quality); |
| 117 } | 117 } |
| 118 | 118 |
| 119 #if SK_SUPPORT_GPU | 119 #if SK_SUPPORT_GPU |
| 120 | 120 |
| 121 GrTexture* SkImage::getTexture() const { | 121 GrTexture* SkImage::getTexture() const { |
| 122 return as_IB(this)->getTexture(); | 122 return as_IB(this)->peekTexture(); |
| 123 } | 123 } |
| 124 | 124 |
| 125 bool SkImage::isTextureBacked() const { return SkToBool(as_IB(this)->getTexture(
)); } | 125 bool SkImage::isTextureBacked() const { return SkToBool(as_IB(this)->getTexture(
)); } |
| 126 | 126 |
| 127 GrBackendObject SkImage::getTextureHandle(bool flushPendingGrContextIO) const { | 127 GrBackendObject SkImage::getTextureHandle(bool flushPendingGrContextIO) const { |
| 128 GrTexture* texture = as_IB(this)->getTexture(); | 128 GrTexture* texture = as_IB(this)->getTexture(); |
| 129 if (texture) { | 129 if (texture) { |
| 130 GrContext* context = texture->getContext(); | 130 GrContext* context = texture->getContext(); |
| 131 if (context) { | 131 if (context) { |
| 132 if (flushPendingGrContextIO) { | 132 if (flushPendingGrContextIO) { |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 | 302 |
| 303 SkImage* SkImage::NewFromAdoptedTexture(GrContext*, const GrBackendTextureDesc&,
SkAlphaType) { | 303 SkImage* SkImage::NewFromAdoptedTexture(GrContext*, const GrBackendTextureDesc&,
SkAlphaType) { |
| 304 return NULL; | 304 return NULL; |
| 305 } | 305 } |
| 306 | 306 |
| 307 SkImage* SkImage::NewFromTextureCopy(GrContext*, const GrBackendTextureDesc&, Sk
AlphaType) { | 307 SkImage* SkImage::NewFromTextureCopy(GrContext*, const GrBackendTextureDesc&, Sk
AlphaType) { |
| 308 return NULL; | 308 return NULL; |
| 309 } | 309 } |
| 310 | 310 |
| 311 #endif | 311 #endif |
| OLD | NEW |