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

Unified Diff: src/gpu/gl/GrGLTexture.cpp

Issue 691523002: Separate out GrSurfaceConfig's fields from other structs used to create GrGL* GrSurface subclasses (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix indent 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/gl/GrGLTexture.h ('k') | src/gpu/gl/GrGpuGL.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLTexture.cpp
diff --git a/src/gpu/gl/GrGLTexture.cpp b/src/gpu/gl/GrGLTexture.cpp
index 202fc426ba97105325759c23ab7ce6c4ec1084a9..8cf574ba15bb2d15bce3ce5e49d7534e4bab892c 100644
--- a/src/gpu/gl/GrGLTexture.cpp
+++ b/src/gpu/gl/GrGLTexture.cpp
@@ -13,40 +13,41 @@
#define GL_CALL(X) GR_GL_CALL(GPUGL->glInterface(), X)
void GrGLTexture::init(GrGpuGL* gpu,
- const Desc& textureDesc,
- const GrGLRenderTarget::Desc* rtDesc) {
+ const GrSurfaceDesc& desc,
+ const IDDesc& idDesc,
+ const GrGLRenderTarget::IDDesc* rtIDDesc) {
- SkASSERT(0 != textureDesc.fTextureID);
+ SkASSERT(0 != idDesc.fTextureID);
fTexParams.invalidate();
fTexParamsTimestamp = GrGpu::kExpiredTimestamp;
fTexIDObj.reset(SkNEW_ARGS(GrGLTexID, (GPUGL->glInterface(),
- textureDesc.fTextureID,
- textureDesc.fIsWrapped)));
+ idDesc.fTextureID,
+ idDesc.fIsWrapped)));
- if (rtDesc) {
+ if (rtIDDesc) {
GrGLIRect vp;
vp.fLeft = 0;
- vp.fWidth = textureDesc.fWidth;
+ vp.fWidth = desc.fWidth;
vp.fBottom = 0;
- vp.fHeight = textureDesc.fHeight;
+ vp.fHeight = desc.fHeight;
- fRenderTarget.reset(SkNEW_ARGS(GrGLRenderTarget, (gpu, *rtDesc, vp, fTexIDObj, this)));
+ fRenderTarget.reset(SkNEW_ARGS(GrGLRenderTarget, (gpu, *rtIDDesc, vp, fTexIDObj, this)));
}
this->registerWithCache();
}
-GrGLTexture::GrGLTexture(GrGpuGL* gpu,
- const Desc& textureDesc)
- : INHERITED(gpu, textureDesc.fIsWrapped, textureDesc) {
- this->init(gpu, textureDesc, NULL);
+GrGLTexture::GrGLTexture(GrGpuGL* gpu, const GrSurfaceDesc& desc, const IDDesc& idDesc)
+ : INHERITED(gpu, idDesc.fIsWrapped, desc) {
+ this->init(gpu, desc, idDesc, NULL);
}
GrGLTexture::GrGLTexture(GrGpuGL* gpu,
- const Desc& textureDesc,
- const GrGLRenderTarget::Desc& rtDesc)
- : INHERITED(gpu, textureDesc.fIsWrapped, textureDesc) {
- this->init(gpu, textureDesc, &rtDesc);
+ const GrSurfaceDesc& desc,
+ const IDDesc& idDesc,
+ const GrGLRenderTarget::IDDesc& rtIDDesc)
+ : INHERITED(gpu, idDesc.fIsWrapped, desc) {
+ this->init(gpu, desc, idDesc, &rtIDDesc);
}
void GrGLTexture::onRelease() {
« no previous file with comments | « src/gpu/gl/GrGLTexture.h ('k') | src/gpu/gl/GrGpuGL.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698