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

Unified Diff: src/gpu/gl/GrGLShaderBuilder.h

Issue 305203002: Use GrGLShaderBuilder::GenProgramOutput in GrGLProgram. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: restore autotunref Created 6 years, 7 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/GrGLProgramEffects.h ('k') | src/gpu/gl/GrGLShaderBuilder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLShaderBuilder.h
diff --git a/src/gpu/gl/GrGLShaderBuilder.h b/src/gpu/gl/GrGLShaderBuilder.h
index 3a93c1bf72e33e944c36403d06d8c9c975a32b65..7e71acf901f8e78df6a1bb3c32c89e8c98810b35 100644
--- a/src/gpu/gl/GrGLShaderBuilder.h
+++ b/src/gpu/gl/GrGLShaderBuilder.h
@@ -68,12 +68,26 @@ public:
, fTexCoordSetCnt(0)
, fProgramID(0) {}
- GrGLProgramEffects* fColorEffects;
- GrGLProgramEffects* fCoverageEffects;
- UniformHandles fUniformHandles;
- bool fHasVertexShader;
- int fTexCoordSetCnt;
- GrGLuint fProgramID;
+ GenProgramOutput(const GenProgramOutput& other) {
+ *this = other;
+ }
+
+ GenProgramOutput& operator=(const GenProgramOutput& other) {
+ fColorEffects.reset(SkRef(other.fColorEffects.get()));
+ fCoverageEffects.reset(SkRef(other.fCoverageEffects.get()));
+ fUniformHandles = other.fUniformHandles;
+ fHasVertexShader = other.fHasVertexShader;
+ fTexCoordSetCnt = other.fTexCoordSetCnt;
+ fProgramID = other.fProgramID;
+ return *this;
+ }
+
+ SkAutoTUnref<GrGLProgramEffects> fColorEffects;
+ SkAutoTUnref<GrGLProgramEffects> fCoverageEffects;
+ UniformHandles fUniformHandles;
+ bool fHasVertexShader;
+ int fTexCoordSetCnt;
+ GrGLuint fProgramID;
};
static bool GenProgram(GrGpuGL* gpu,
« no previous file with comments | « src/gpu/gl/GrGLProgramEffects.h ('k') | src/gpu/gl/GrGLShaderBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698