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

Unified Diff: src/gpu/GrTexture.cpp

Issue 682223002: rename GrTextureDesc->GrSurfaceDesc, GrTextureFlags->GrSurfaceFlags (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: const Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrTextStrike.cpp ('k') | src/gpu/GrTexturePriv.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrTexture.cpp
diff --git a/src/gpu/GrTexture.cpp b/src/gpu/GrTexture.cpp
index 8af5b8f128ce71ac46c4ccf71932cbfdcbca4c09..2717b3192fa99991816ab9d4db87812d1e217808 100644
--- a/src/gpu/GrTexture.cpp
+++ b/src/gpu/GrTexture.cpp
@@ -68,18 +68,18 @@ void GrTexture::onAbandon() {
void GrTexture::validateDesc() const {
if (this->asRenderTarget()) {
// This texture has a render target
- SkASSERT(0 != (fDesc.fFlags & kRenderTarget_GrTextureFlagBit));
+ SkASSERT(0 != (fDesc.fFlags & kRenderTarget_GrSurfaceFlag));
if (this->asRenderTarget()->getStencilBuffer()) {
- SkASSERT(0 != (fDesc.fFlags & kNoStencil_GrTextureFlagBit));
+ SkASSERT(0 != (fDesc.fFlags & kNoStencil_GrSurfaceFlag));
} else {
- SkASSERT(0 == (fDesc.fFlags & kNoStencil_GrTextureFlagBit));
+ SkASSERT(0 == (fDesc.fFlags & kNoStencil_GrSurfaceFlag));
}
SkASSERT(fDesc.fSampleCnt == this->asRenderTarget()->numSamples());
} else {
- SkASSERT(0 == (fDesc.fFlags & kRenderTarget_GrTextureFlagBit));
- SkASSERT(0 == (fDesc.fFlags & kNoStencil_GrTextureFlagBit));
+ SkASSERT(0 == (fDesc.fFlags & kRenderTarget_GrSurfaceFlag));
+ SkASSERT(0 == (fDesc.fFlags & kNoStencil_GrSurfaceFlag));
SkASSERT(0 == fDesc.fSampleCnt);
}
}
@@ -104,7 +104,7 @@ enum TextureFlags {
namespace {
GrResourceKey::ResourceFlags get_texture_flags(const GrGpu* gpu,
const GrTextureParams* params,
- const GrTextureDesc& desc) {
+ const GrSurfaceDesc& desc) {
GrResourceKey::ResourceFlags flags = 0;
bool tiled = params && params->isTiled();
if (tiled && !gpu->caps()->npotTextureTileSupport()) {
@@ -124,11 +124,11 @@ GrResourceKey::ResourceFlags get_texture_flags(const GrGpu* gpu,
}
// FIXME: This should be refactored with the code in gl/GrGpuGL.cpp.
-GrSurfaceOrigin resolve_origin(const GrTextureDesc& desc) {
+GrSurfaceOrigin resolve_origin(const GrSurfaceDesc& desc) {
// By default, GrRenderTargets are GL's normal orientation so that they
// can be drawn to by the outside world without the client having
// to render upside down.
- bool renderTarget = 0 != (desc.fFlags & kRenderTarget_GrTextureFlagBit);
+ bool renderTarget = 0 != (desc.fFlags & kRenderTarget_GrSurfaceFlag);
if (kDefault_GrSurfaceOrigin == desc.fOrigin) {
return renderTarget ? kBottomLeft_GrSurfaceOrigin : kTopLeft_GrSurfaceOrigin;
} else {
@@ -138,7 +138,7 @@ GrSurfaceOrigin resolve_origin(const GrTextureDesc& desc) {
}
//////////////////////////////////////////////////////////////////////////////
-GrTexture::GrTexture(GrGpu* gpu, bool isWrapped, const GrTextureDesc& desc)
+GrTexture::GrTexture(GrGpu* gpu, bool isWrapped, const GrSurfaceDesc& desc)
: INHERITED(gpu, isWrapped, desc)
, fRenderTarget(NULL)
, fMipMapsStatus(kNotAllocated_MipMapsStatus) {
@@ -150,13 +150,13 @@ GrTexture::GrTexture(GrGpu* gpu, bool isWrapped, const GrTextureDesc& desc)
GrResourceKey GrTexturePriv::ComputeKey(const GrGpu* gpu,
const GrTextureParams* params,
- const GrTextureDesc& desc,
+ const GrSurfaceDesc& desc,
const GrCacheID& cacheID) {
GrResourceKey::ResourceFlags flags = get_texture_flags(gpu, params, desc);
return GrResourceKey(cacheID, ResourceType(), flags);
}
-GrResourceKey GrTexturePriv::ComputeScratchKey(const GrTextureDesc& desc) {
+GrResourceKey GrTexturePriv::ComputeScratchKey(const GrSurfaceDesc& desc) {
GrCacheID::Key idKey;
// Instead of a client-provided key of the texture contents we create a key from the
// descriptor.
« no previous file with comments | « src/gpu/GrTextStrike.cpp ('k') | src/gpu/GrTexturePriv.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698