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

Unified Diff: ui/gl/gl_helper.cc

Issue 1998723002: Move code in ui/gl/* from gfx:: to gl:: (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 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 | « ui/gl/gl_helper.h ('k') | ui/gl/gl_image_egl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_helper.cc
diff --git a/ui/gl/gl_helper.cc b/ui/gl/gl_helper.cc
index afaebad6f3eed2ececf9c1b9da5abd320fbaa6d6..1439b543bd4ed9fb0de678c2bd8abe6ee7f36e70 100644
--- a/ui/gl/gl_helper.cc
+++ b/ui/gl/gl_helper.cc
@@ -9,7 +9,7 @@
#include "base/logging.h"
#include "ui/gl/scoped_binders.h"
-namespace gfx {
+namespace gl {
// static
GLuint GLHelper::CompileShader(GLenum type, const char* src) {
@@ -73,7 +73,7 @@ GLuint GLHelper::SetupProgram(GLuint vertex_shader, GLuint fragment_shader) {
GLuint GLHelper::SetupQuadVertexBuffer() {
GLuint vertex_buffer = 0;
glGenBuffersARB(1, &vertex_buffer);
- gfx::ScopedBufferBinder buffer_binder(GL_ARRAY_BUFFER, vertex_buffer);
+ gl::ScopedBufferBinder buffer_binder(GL_ARRAY_BUFFER, vertex_buffer);
GLfloat data[] = {-1.f, -1.f, 1.f, -1.f, -1.f, 1.f, 1.f, 1.f};
glBufferData(GL_ARRAY_BUFFER, sizeof(data), data, GL_STATIC_DRAW);
return vertex_buffer;
@@ -81,17 +81,17 @@ GLuint GLHelper::SetupQuadVertexBuffer() {
// static
void GLHelper::DrawQuad(GLuint vertex_buffer) {
- gfx::ScopedBufferBinder buffer_binder(GL_ARRAY_BUFFER, vertex_buffer);
- gfx::ScopedVertexAttribArray vertex_attrib_array(0, 2, GL_FLOAT, GL_FALSE,
- sizeof(GLfloat) * 2, 0);
- gfx::ScopedCapability disable_blending(GL_BLEND, GL_FALSE);
- gfx::ScopedCapability disable_culling(GL_CULL_FACE, GL_FALSE);
- gfx::ScopedCapability disable_dithering(GL_DITHER, GL_FALSE);
- gfx::ScopedCapability disable_depth_test(GL_DEPTH_TEST, GL_FALSE);
- gfx::ScopedCapability disable_scissor_test(GL_SCISSOR_TEST, GL_FALSE);
- gfx::ScopedColorMask color_mask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
+ gl::ScopedBufferBinder buffer_binder(GL_ARRAY_BUFFER, vertex_buffer);
+ gl::ScopedVertexAttribArray vertex_attrib_array(0, 2, GL_FLOAT, GL_FALSE,
+ sizeof(GLfloat) * 2, 0);
+ gl::ScopedCapability disable_blending(GL_BLEND, GL_FALSE);
+ gl::ScopedCapability disable_culling(GL_CULL_FACE, GL_FALSE);
+ gl::ScopedCapability disable_dithering(GL_DITHER, GL_FALSE);
+ gl::ScopedCapability disable_depth_test(GL_DEPTH_TEST, GL_FALSE);
+ gl::ScopedCapability disable_scissor_test(GL_SCISSOR_TEST, GL_FALSE);
+ gl::ScopedColorMask color_mask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
}
-} // namespace gfx
+} // namespace gl
« no previous file with comments | « ui/gl/gl_helper.h ('k') | ui/gl/gl_image_egl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698