| Index: components/test_runner/test_plugin.cc
|
| diff --git a/components/test_runner/test_plugin.cc b/components/test_runner/test_plugin.cc
|
| index cd76b8334b1695da0c234d1cbb6876ee89eeabca..5def06006591f613f861c162014c570c6bf60f16 100644
|
| --- a/components/test_runner/test_plugin.cc
|
| +++ b/components/test_runner/test_plugin.cc
|
| @@ -243,7 +243,7 @@ void TestPlugin::updateGeometry(
|
| } else if (context_) {
|
| context_->viewport(0, 0, rect_.width, rect_.height);
|
|
|
| - context_->bindTexture(GL_TEXTURE_2D, color_texture_);
|
| + gl_->BindTexture(GL_TEXTURE_2D, color_texture_);
|
| context_->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
| context_->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
| context_->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
| @@ -257,7 +257,7 @@ void TestPlugin::updateGeometry(
|
| GL_RGBA,
|
| GL_UNSIGNED_BYTE,
|
| 0);
|
| - context_->bindFramebuffer(GL_FRAMEBUFFER, framebuffer_);
|
| + gl_->BindFramebuffer(GL_FRAMEBUFFER, framebuffer_);
|
| gl_->FramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
|
| GL_TEXTURE_2D, color_texture_, 0);
|
|
|
| @@ -266,7 +266,7 @@ void TestPlugin::updateGeometry(
|
| gpu::Mailbox mailbox;
|
| context_->genMailboxCHROMIUM(mailbox.name);
|
| context_->produceTextureCHROMIUM(GL_TEXTURE_2D, mailbox.name);
|
| - const blink::WGC3Duint64 fence_sync = context_->insertFenceSyncCHROMIUM();
|
| + const GLuint64 fence_sync = gl_->InsertFenceSyncCHROMIUM();
|
| context_->flush();
|
|
|
| gpu::SyncToken sync_token;
|
| @@ -376,13 +376,13 @@ bool TestPlugin::InitScene() {
|
| framebuffer_ = context_->createFramebuffer();
|
|
|
| context_->viewport(0, 0, rect_.width, rect_.height);
|
| - context_->disable(GL_DEPTH_TEST);
|
| - context_->disable(GL_SCISSOR_TEST);
|
| + gl_->Disable(GL_DEPTH_TEST);
|
| + gl_->Disable(GL_SCISSOR_TEST);
|
|
|
| - context_->clearColor(color[0], color[1], color[2], color[3]);
|
| + gl_->ClearColor(color[0], color[1], color[2], color[3]);
|
|
|
| - context_->enable(GL_BLEND);
|
| - context_->blendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
|
| + gl_->Enable(GL_BLEND);
|
| + gl_->BlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
|
|
|
| return scene_.primitive != PrimitiveNone ? InitProgram() && InitPrimitive()
|
| : true;
|
| @@ -390,7 +390,7 @@ bool TestPlugin::InitScene() {
|
|
|
| void TestPlugin::DrawSceneGL() {
|
| context_->viewport(0, 0, rect_.width, rect_.height);
|
| - context_->clear(GL_COLOR_BUFFER_BIT);
|
| + gl_->Clear(GL_COLOR_BUFFER_BIT);
|
|
|
| if (scene_.primitive != PrimitiveNone)
|
| DrawPrimitive();
|
| @@ -478,9 +478,9 @@ bool TestPlugin::InitPrimitive() {
|
|
|
| const float vertices[] = {0.0f, 0.8f, 0.0f, -0.8f, -0.8f,
|
| 0.0f, 0.8f, -0.8f, 0.0f};
|
| - context_->bindBuffer(GL_ARRAY_BUFFER, scene_.vbo);
|
| - context_->bufferData(GL_ARRAY_BUFFER, sizeof(vertices), 0, GL_STATIC_DRAW);
|
| - context_->bufferSubData(GL_ARRAY_BUFFER, 0, sizeof(vertices), vertices);
|
| + gl_->BindBuffer(GL_ARRAY_BUFFER, scene_.vbo);
|
| + gl_->BufferData(GL_ARRAY_BUFFER, sizeof(vertices), 0, GL_STATIC_DRAW);
|
| + gl_->BufferSubData(GL_ARRAY_BUFFER, 0, sizeof(vertices), vertices);
|
| return true;
|
| }
|
|
|
| @@ -498,18 +498,18 @@ void TestPlugin::DrawPrimitive() {
|
| scene_.color_location, color[0], color[1], color[2], color[3]);
|
|
|
| // Bind primitive vertices.
|
| - context_->bindBuffer(GL_ARRAY_BUFFER, scene_.vbo);
|
| - context_->enableVertexAttribArray(scene_.position_location);
|
| + gl_->BindBuffer(GL_ARRAY_BUFFER, scene_.vbo);
|
| + gl_->EnableVertexAttribArray(scene_.position_location);
|
| context_->vertexAttribPointer(
|
| scene_.position_location, 3, GL_FLOAT, GL_FALSE, 0, 0);
|
| - context_->drawArrays(GL_TRIANGLES, 0, 3);
|
| + gl_->DrawArrays(GL_TRIANGLES, 0, 3);
|
| }
|
|
|
| unsigned TestPlugin::LoadShader(unsigned type, const std::string& source) {
|
| unsigned shader = context_->createShader(type);
|
| if (shader) {
|
| context_->shaderSource(shader, source.data());
|
| - context_->compileShader(shader);
|
| + gl_->CompileShader(shader);
|
|
|
| int compiled = 0;
|
| context_->getShaderiv(shader, GL_COMPILE_STATUS, &compiled);
|
| @@ -527,8 +527,8 @@ unsigned TestPlugin::LoadProgram(const std::string& vertex_source,
|
| unsigned fragment_shader = LoadShader(GL_FRAGMENT_SHADER, fragment_source);
|
| unsigned program = context_->createProgram();
|
| if (vertex_shader && fragment_shader && program) {
|
| - context_->attachShader(program, vertex_shader);
|
| - context_->attachShader(program, fragment_shader);
|
| + gl_->AttachShader(program, vertex_shader);
|
| + gl_->AttachShader(program, fragment_shader);
|
| context_->linkProgram(program);
|
|
|
| int linked = 0;
|
|
|