Chromium Code Reviews| Index: src/gpu/GrTexture.cpp |
| diff --git a/src/gpu/GrTexture.cpp b/src/gpu/GrTexture.cpp |
| index 3186d89d77535cf734c2cc70319a2d0a21e5e892..4ce4acd528c7db676a9f59f9733088b5febb7774 100644 |
| --- a/src/gpu/GrTexture.cpp |
| +++ b/src/gpu/GrTexture.cpp |
| @@ -26,13 +26,12 @@ GrTexture::~GrTexture() { |
| * textures back in the texture cache when their ref count goes to zero. |
| */ |
| void GrTexture::internal_dispose() const { |
| - |
| - if (this->isSetFlag((GrTextureFlags) kReturnToCache_FlagBit) && |
| + if (this->impl()->isSetFlag((GrTextureFlags) GrTextureImpl::kReturnToCache_FlagBit) && |
| NULL != this->INHERITED::getContext()) { |
| GrTexture* nonConstThis = const_cast<GrTexture *>(this); |
| this->fRefCnt = 1; // restore ref count to initial setting |
| - nonConstThis->resetFlag((GrTextureFlags) kReturnToCache_FlagBit); |
| + nonConstThis->impl()->resetFlag((GrTextureFlags) GrTextureImpl::kReturnToCache_FlagBit); |
| nonConstThis->INHERITED::getContext()->addExistingTextureToCache(nonConstThis); |
| // Note: "this" texture might be freed inside addExistingTextureToCache |
| @@ -44,7 +43,7 @@ void GrTexture::internal_dispose() const { |
| this->INHERITED::internal_dispose(); |
| } |
| -void GrTexture::dirtyMipMaps(bool mipMapsDirty) { |
| +void GrTextureImpl::dirtyMipMaps(bool mipMapsDirty) { |
| if (mipMapsDirty) { |
| if (kValid_MipMapsStatus == fMipMapsStatus) { |
| fMipMapsStatus = kAllocated_MipMapsStatus; |
| @@ -63,7 +62,7 @@ size_t GrTexture::gpuMemorySize() const { |
| size_t textureSize = (size_t) fDesc.fWidth * |
| fDesc.fHeight * |
| GrBytesPerPixel(fDesc.fConfig); |
| - if (kNotAllocated_MipMapsStatus != fMipMapsStatus) { |
| + if (GrTextureImpl::kNotAllocated_MipMapsStatus != this->impl()->fMipMapsStatus) { |
| // We don't have to worry about the mipmaps being a different size than |
| // we'd expect because we never change fDesc.fWidth/fHeight. |
| textureSize *= 2; |
| @@ -100,7 +99,7 @@ void GrTexture::writePixels(int left, int top, int width, int height, |
| } |
| void GrTexture::onRelease() { |
| - SkASSERT(!this->isSetFlag((GrTextureFlags) kReturnToCache_FlagBit)); |
| + SkASSERT(!this->impl()->isSetFlag((GrTextureFlags) GrTextureImpl::kReturnToCache_FlagBit)); |
| INHERITED::onRelease(); |
| } |
| @@ -186,7 +185,7 @@ GrSurfaceOrigin resolve_origin(const GrTextureDesc& desc) { |
| } |
| } |
|
robertphillips
2014/05/09 14:57:22
These guys will move out, right?
bsalomon
2014/05/09 15:10:39
I wasn't planning on that. There are only a few fu
|
| -GrResourceKey GrTexture::ComputeKey(const GrGpu* gpu, |
| +GrResourceKey GrTextureImpl::ComputeKey(const GrGpu* gpu, |
| const GrTextureParams* params, |
| const GrTextureDesc& desc, |
| const GrCacheID& cacheID) { |
| @@ -194,7 +193,7 @@ GrResourceKey GrTexture::ComputeKey(const GrGpu* gpu, |
| return GrResourceKey(cacheID, texture_resource_type(), flags); |
| } |
| -GrResourceKey GrTexture::ComputeScratchKey(const GrTextureDesc& desc) { |
| +GrResourceKey GrTextureImpl::ComputeScratchKey(const GrTextureDesc& desc) { |
| GrCacheID::Key idKey; |
| // Instead of a client-provided key of the texture contents we create a key from the |
| // descriptor. |
| @@ -213,10 +212,10 @@ GrResourceKey GrTexture::ComputeScratchKey(const GrTextureDesc& desc) { |
| return GrResourceKey(cacheID, texture_resource_type(), 0); |
| } |
| -bool GrTexture::NeedsResizing(const GrResourceKey& key) { |
| +bool GrTextureImpl::NeedsResizing(const GrResourceKey& key) { |
| return SkToBool(key.getResourceFlags() & kStretchToPOT_TextureFlag); |
| } |
| -bool GrTexture::NeedsBilerp(const GrResourceKey& key) { |
| +bool GrTextureImpl::NeedsBilerp(const GrResourceKey& key) { |
| return SkToBool(key.getResourceFlags() & kBilerp_TextureFlag); |
| } |