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

Unified Diff: cc/output/dynamic_geometry_binding.cc

Issue 1065463002: cc: Remove GLC macro (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 | « no previous file | cc/output/geometry_binding.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/dynamic_geometry_binding.cc
diff --git a/cc/output/dynamic_geometry_binding.cc b/cc/output/dynamic_geometry_binding.cc
index 9e25892c15acebfcbeaa75ccdf3d510f61841aa4..ecdf66e133e728871e5ea49333769112b7f6487b 100644
--- a/cc/output/dynamic_geometry_binding.cc
+++ b/cc/output/dynamic_geometry_binding.cc
@@ -4,8 +4,8 @@
#include "cc/output/dynamic_geometry_binding.h"
-#include "cc/output/gl_renderer.h" // For the GLC() macro.
#include "gpu/command_buffer/client/gles2_interface.h"
+#include "ui/gfx/geometry/quad_f.h"
#include "ui/gfx/geometry/rect_f.h"
namespace cc {
@@ -20,17 +20,16 @@ DynamicGeometryBinding::DynamicGeometryBinding(gpu::gles2::GLES2Interface* gl)
static_assert(sizeof(GeometryBindingQuadIndex) == 6 * sizeof(uint16_t),
"struct QuadIndex should be densely packed");
- GLC(gl_, gl_->GenBuffers(1, &quad_vertices_vbo_));
- GLC(gl_, gl_->GenBuffers(1, &quad_elements_vbo_));
+ gl_->GenBuffers(1, &quad_vertices_vbo_);
+ gl_->GenBuffers(1, &quad_elements_vbo_);
- GLC(gl_, gl_->BindBuffer(GL_ARRAY_BUFFER, quad_vertices_vbo_));
- GLC(gl_, gl_->BufferData(GL_ARRAY_BUFFER, sizeof(GeometryBindingQuad) * 1,
- quads, GL_DYNAMIC_DRAW));
+ gl_->BindBuffer(GL_ARRAY_BUFFER, quad_vertices_vbo_);
+ gl_->BufferData(GL_ARRAY_BUFFER, sizeof(GeometryBindingQuad) * 1, quads,
+ GL_DYNAMIC_DRAW);
- GLC(gl_, gl_->BindBuffer(GL_ELEMENT_ARRAY_BUFFER, quad_elements_vbo_));
- GLC(gl_, gl_->BufferData(GL_ELEMENT_ARRAY_BUFFER,
- sizeof(GeometryBindingQuadIndex) * 1, &quad_indices,
- GL_DYNAMIC_DRAW));
+ gl_->BindBuffer(GL_ELEMENT_ARRAY_BUFFER, quad_elements_vbo_);
+ gl_->BufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(GeometryBindingQuadIndex) * 1,
+ &quad_indices, GL_DYNAMIC_DRAW);
}
void DynamicGeometryBinding::InitializeCustomQuad(const gfx::QuadF& quad) {
@@ -54,10 +53,10 @@ void DynamicGeometryBinding::InitializeCustomQuadWithUVs(const gfx::QuadF& quad,
static_cast<uint16>(0), static_cast<uint16>(1), static_cast<uint16>(2),
static_cast<uint16>(3), static_cast<uint16>(0), static_cast<uint16>(2));
- GLC(gl_, gl_->BufferSubData(GL_ARRAY_BUFFER, 0, sizeof(GeometryBindingQuad),
- &local_quad));
- GLC(gl_, gl_->BufferSubData(GL_ELEMENT_ARRAY_BUFFER, 0,
- sizeof(GeometryBindingQuadIndex), &quad_index));
+ gl_->BufferSubData(GL_ARRAY_BUFFER, 0, sizeof(GeometryBindingQuad),
+ &local_quad);
+ gl_->BufferSubData(GL_ELEMENT_ARRAY_BUFFER, 0,
+ sizeof(GeometryBindingQuadIndex), &quad_index);
}
void DynamicGeometryBinding::PrepareForDraw() {
« no previous file with comments | « no previous file | cc/output/geometry_binding.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698