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

Side by Side Diff: components/test_runner/test_plugin.cc

Issue 1812243003: Remove methods from WebGraphicsContext3D that wrap type casts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@simples-tplus
Patch Set: complex-casts: rebase Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | gpu/blink/webgraphicscontext3d_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/test_runner/test_plugin.h" 5 #include "components/test_runner/test_plugin.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 gl_->UseProgram(scene_.program); 484 gl_->UseProgram(scene_.program);
485 485
486 // Bind primitive color. 486 // Bind primitive color.
487 float color[4]; 487 float color[4];
488 PremultiplyAlpha(scene_.primitive_color, scene_.opacity, color); 488 PremultiplyAlpha(scene_.primitive_color, scene_.opacity, color);
489 gl_->Uniform4f(scene_.color_location, color[0], color[1], color[2], color[3]); 489 gl_->Uniform4f(scene_.color_location, color[0], color[1], color[2], color[3]);
490 490
491 // Bind primitive vertices. 491 // Bind primitive vertices.
492 gl_->BindBuffer(GL_ARRAY_BUFFER, scene_.vbo); 492 gl_->BindBuffer(GL_ARRAY_BUFFER, scene_.vbo);
493 gl_->EnableVertexAttribArray(scene_.position_location); 493 gl_->EnableVertexAttribArray(scene_.position_location);
494 context_->vertexAttribPointer( 494 gl_->VertexAttribPointer(scene_.position_location, 3, GL_FLOAT, GL_FALSE, 0,
495 scene_.position_location, 3, GL_FLOAT, GL_FALSE, 0, 0); 495 nullptr);
496 gl_->DrawArrays(GL_TRIANGLES, 0, 3); 496 gl_->DrawArrays(GL_TRIANGLES, 0, 3);
497 } 497 }
498 498
499 unsigned TestPlugin::LoadShader(unsigned type, const std::string& source) { 499 unsigned TestPlugin::LoadShader(unsigned type, const std::string& source) {
500 unsigned shader = gl_->CreateShader(type); 500 unsigned shader = gl_->CreateShader(type);
501 if (shader) { 501 if (shader) {
502 context_->shaderSource(shader, source.data()); 502 context_->shaderSource(shader, source.data());
503 gl_->CompileShader(shader); 503 gl_->CompileShader(shader);
504 504
505 int compiled = 0; 505 int compiled = 0;
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
723 return kPluginPersistsMimeType; 723 return kPluginPersistsMimeType;
724 } 724 }
725 725
726 bool TestPlugin::IsSupportedMimeType(const blink::WebString& mime_type) { 726 bool TestPlugin::IsSupportedMimeType(const blink::WebString& mime_type) {
727 return mime_type == TestPlugin::MimeType() || 727 return mime_type == TestPlugin::MimeType() ||
728 mime_type == PluginPersistsMimeType() || 728 mime_type == PluginPersistsMimeType() ||
729 mime_type == CanCreateWithoutRendererMimeType(); 729 mime_type == CanCreateWithoutRendererMimeType();
730 } 730 }
731 731
732 } // namespace test_runner 732 } // namespace test_runner
OLDNEW
« no previous file with comments | « no previous file | gpu/blink/webgraphicscontext3d_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698