diff options
author | bsalomon <bsalomon@google.com> | 2014-09-16 13:54:53 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-16 13:54:53 -0700 |
commit | c49233410e7278f0b95b8b0d28a80105a2930a88 (patch) | |
tree | 4d452efbda22977c1d752cab94a7ec262cedc4c9 /src/gpu | |
parent | d664c21a38de98d8db210c46f7a8c4187f1534da (diff) |
Make templated GrProgramTResource subclass of GrProgramResource
R=robertphillips@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/563963004
Diffstat (limited to 'src/gpu')
-rw-r--r-- | src/gpu/GrDrawState.h | 2 | ||||
-rw-r--r-- | src/gpu/GrEffect.cpp | 2 | ||||
-rw-r--r-- | src/gpu/GrRODrawState.h | 3 | ||||
-rw-r--r-- | src/gpu/GrTextureAccess.cpp | 8 |
4 files changed, 8 insertions, 7 deletions
diff --git a/src/gpu/GrDrawState.h b/src/gpu/GrDrawState.h index 4869658b4f..f04d592713 100644 --- a/src/gpu/GrDrawState.h +++ b/src/gpu/GrDrawState.h @@ -405,7 +405,7 @@ public: * @param target The render target to set. */ void setRenderTarget(GrRenderTarget* target) { - fRenderTarget.setResource(SkSafeRef(target), GrProgramResource::kWrite_IOType); + fRenderTarget.set(SkSafeRef(target), GrProgramResource::kWrite_IOType); this->invalidateOptState(); } diff --git a/src/gpu/GrEffect.cpp b/src/gpu/GrEffect.cpp index b8d945edc6..50a198002f 100644 --- a/src/gpu/GrEffect.cpp +++ b/src/gpu/GrEffect.cpp @@ -72,7 +72,7 @@ void GrEffect::addCoordTransform(const GrCoordTransform* transform) { void GrEffect::addTextureAccess(const GrTextureAccess* access) { fTextureAccesses.push_back(access); - this->addProgramResource(access->getTextureProgramResource()); + this->addProgramResource(access->getProgramTexture()); } void* GrEffect::operator new(size_t size) { diff --git a/src/gpu/GrRODrawState.h b/src/gpu/GrRODrawState.h index eea6f9b98a..7e57b089b0 100644 --- a/src/gpu/GrRODrawState.h +++ b/src/gpu/GrRODrawState.h @@ -397,8 +397,9 @@ protected: GrBlendCoeff* srcCoeff = NULL, GrBlendCoeff* dstCoeff = NULL) const; + typedef GrProgramTResource<GrRenderTarget> ProgramRenderTarget; // These fields are roughly sorted by decreasing likelihood of being different in op== - GrProgramResource fRenderTarget; + ProgramRenderTarget fRenderTarget; GrColor fColor; SkMatrix fViewMatrix; GrColor fBlendConstant; diff --git a/src/gpu/GrTextureAccess.cpp b/src/gpu/GrTextureAccess.cpp index 0886db411a..c4cde3dbaf 100644 --- a/src/gpu/GrTextureAccess.cpp +++ b/src/gpu/GrTextureAccess.cpp @@ -46,7 +46,7 @@ void GrTextureAccess::reset(GrTexture* texture, SkASSERT(strlen(swizzle) >= 1 && strlen(swizzle) <= 4); fParams = params; - fTexture.setResource(SkRef(texture), GrProgramResource::kRead_IOType); + fTexture.set(SkRef(texture), GrProgramResource::kRead_IOType); this->setSwizzle(swizzle); } @@ -58,14 +58,14 @@ void GrTextureAccess::reset(GrTexture* texture, SkASSERT(strlen(swizzle) >= 1 && strlen(swizzle) <= 4); fParams.reset(tileXAndY, filterMode); - fTexture.setResource(SkRef(texture), GrProgramResource::kRead_IOType); + fTexture.set(SkRef(texture), GrProgramResource::kRead_IOType); this->setSwizzle(swizzle); } void GrTextureAccess::reset(GrTexture* texture, const GrTextureParams& params) { SkASSERT(texture); - fTexture.setResource(SkRef(texture), GrProgramResource::kRead_IOType); + fTexture.set(SkRef(texture), GrProgramResource::kRead_IOType); fParams = params; memcpy(fSwizzle, "rgba", 5); fSwizzleMask = kRGBA_GrColorComponentFlags; @@ -75,7 +75,7 @@ void GrTextureAccess::reset(GrTexture* texture, GrTextureParams::FilterMode filterMode, SkShader::TileMode tileXAndY) { SkASSERT(texture); - fTexture.setResource(SkRef(texture), GrProgramResource::kRead_IOType); + fTexture.set(SkRef(texture), GrProgramResource::kRead_IOType); fParams.reset(tileXAndY, filterMode); memcpy(fSwizzle, "rgba", 5); fSwizzleMask = kRGBA_GrColorComponentFlags; |