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

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

Issue 22340010: Refactor GrGLUniformManager::UniformHandle to initialize itself by default (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: description Created 7 years, 4 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/GrGLShaderBuilder.cpp ('k') | src/gpu/gl/GrGLUniformManager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLUniformHandle.h
diff --git a/src/gpu/gl/GrGLUniformHandle.h b/src/gpu/gl/GrGLUniformHandle.h
index 231dd31c20eb16b86214d1ca899ff0562fcdb215..797afff4e082ea0262d7e836f12cf37c6b2f43b9 100644
--- a/src/gpu/gl/GrGLUniformHandle.h
+++ b/src/gpu/gl/GrGLUniformHandle.h
@@ -8,9 +8,8 @@
#ifndef GrUniformHandle_DEFINED
#define GrUniformHandle_DEFINED
-namespace {
-inline int handle_to_index(GrGLUniformManager::UniformHandle h) { return ~h; }
-inline GrGLUniformManager::UniformHandle index_to_handle(int i) { return ~i; }
+inline GrGLUniformManager::UniformHandle GrGLUniformManager::UniformHandle::CreateFromUniformIndex(int index) {
+ return GrGLUniformManager::UniformHandle(index);
}
#endif
« no previous file with comments | « src/gpu/gl/GrGLShaderBuilder.cpp ('k') | src/gpu/gl/GrGLUniformManager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698