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

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

Issue 1814263004: Remove create/delete methods from WebGraphicsContext3D. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@complex-casts
Patch Set: 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
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 #ifndef COMPONENTS_TEST_RUNNER_TEST_PLUGIN_H_ 5 #ifndef COMPONENTS_TEST_RUNNER_TEST_PLUGIN_H_
6 #define COMPONENTS_TEST_RUNNER_TEST_PLUGIN_H_ 6 #define COMPONENTS_TEST_RUNNER_TEST_PLUGIN_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 101
102 private: 102 private:
103 TestPlugin(blink::WebFrame* frame, 103 TestPlugin(blink::WebFrame* frame,
104 const blink::WebPluginParams& params, 104 const blink::WebPluginParams& params,
105 WebTestDelegate* delegate); 105 WebTestDelegate* delegate);
106 106
107 enum Primitive { PrimitiveNone, PrimitiveTriangle }; 107 enum Primitive { PrimitiveNone, PrimitiveTriangle };
108 108
109 struct Scene { 109 struct Scene {
110 Primitive primitive; 110 Primitive primitive;
111 unsigned background_color[3]; 111 uint32_t background_color[3];
112 unsigned primitive_color[3]; 112 uint32_t primitive_color[3];
113 float opacity; 113 float opacity;
114 114
115 unsigned vbo; 115 uint32_t vbo;
116 unsigned program; 116 uint32_t program;
117 int color_location; 117 int color_location;
118 int position_location; 118 int position_location;
119 119
120 Scene() 120 Scene()
121 : primitive(PrimitiveNone), 121 : primitive(PrimitiveNone),
122 opacity(1.0f) // Fully opaque. 122 opacity(1.0f) // Fully opaque.
123 , 123 ,
124 vbo(0), 124 vbo(0),
125 program(0), 125 program(0),
126 color_location(-1), 126 color_location(-1),
127 position_location(-1) { 127 position_location(-1) {
128 background_color[0] = background_color[1] = background_color[2] = 0; 128 background_color[0] = background_color[1] = background_color[2] = 0;
129 primitive_color[0] = primitive_color[1] = primitive_color[2] = 0; 129 primitive_color[0] = primitive_color[1] = primitive_color[2] = 0;
130 } 130 }
131 }; 131 };
132 132
133 // Functions for parsing plugin parameters. 133 // Functions for parsing plugin parameters.
134 Primitive ParsePrimitive(const blink::WebString& string); 134 Primitive ParsePrimitive(const blink::WebString& string);
135 void ParseColor(const blink::WebString& string, unsigned color[3]); 135 void ParseColor(const blink::WebString& string, uint32_t color[3]);
136 float ParseOpacity(const blink::WebString& string); 136 float ParseOpacity(const blink::WebString& string);
137 bool ParseBoolean(const blink::WebString& string); 137 bool ParseBoolean(const blink::WebString& string);
138 138
139 // Functions for loading and drawing scene in GL. 139 // Functions for loading and drawing scene in GL.
140 bool InitScene(); 140 bool InitScene();
141 void DrawSceneGL(); 141 void DrawSceneGL();
142 void DestroyScene(); 142 void DestroyScene();
143 bool InitProgram(); 143 bool InitProgram();
144 bool InitPrimitive(); 144 bool InitPrimitive();
145 void DrawPrimitive(); 145 void DrawPrimitive();
146 unsigned LoadShader(unsigned type, const std::string& source); 146 uint32_t LoadShader(uint32_t type, const std::string& source);
147 unsigned LoadProgram(const std::string& vertex_source, 147 uint32_t LoadProgram(const std::string& vertex_source,
148 const std::string& fragment_source); 148 const std::string& fragment_source);
149 149
150 // Functions for drawing scene in Software. 150 // Functions for drawing scene in Software.
151 void DrawSceneSoftware(void* memory); 151 void DrawSceneSoftware(void* memory);
152 152
153 blink::WebFrame* frame_; 153 blink::WebFrame* frame_;
154 WebTestDelegate* delegate_; 154 WebTestDelegate* delegate_;
155 blink::WebPluginContainer* container_; 155 blink::WebPluginContainer* container_;
156 156
157 blink::WebRect rect_; 157 blink::WebRect rect_;
158 blink::WebGraphicsContext3D* context_; 158 blink::WebGraphicsContext3D* context_;
159 gpu::gles2::GLES2Interface* gl_; 159 gpu::gles2::GLES2Interface* gl_;
160 unsigned color_texture_; 160 uint32_t color_texture_;
Ken Russell (switch to Gerrit) 2016/03/19 01:46:39 Seems a little strange to use uint32_t for an Open
danakj 2016/03/21 22:27:02 Done.
161 cc::TextureMailbox texture_mailbox_; 161 cc::TextureMailbox texture_mailbox_;
162 scoped_ptr<cc::SharedBitmap> shared_bitmap_; 162 scoped_ptr<cc::SharedBitmap> shared_bitmap_;
163 bool mailbox_changed_; 163 bool mailbox_changed_;
164 unsigned framebuffer_; 164 uint32_t framebuffer_;
165 Scene scene_; 165 Scene scene_;
166 scoped_refptr<cc::TextureLayer> layer_; 166 scoped_refptr<cc::TextureLayer> layer_;
167 scoped_ptr<blink::WebLayer> web_layer_; 167 scoped_ptr<blink::WebLayer> web_layer_;
168 168
169 blink::WebPluginContainer::TouchEventRequestType touch_event_request_; 169 blink::WebPluginContainer::TouchEventRequestType touch_event_request_;
170 // Requests touch events from the WebPluginContainerImpl multiple times to 170 // Requests touch events from the WebPluginContainerImpl multiple times to
171 // tickle webkit.org/b/108381 171 // tickle webkit.org/b/108381
172 bool re_request_touch_events_; 172 bool re_request_touch_events_;
173 bool print_event_details_; 173 bool print_event_details_;
174 bool print_user_gesture_status_; 174 bool print_user_gesture_status_;
175 bool can_process_drag_; 175 bool can_process_drag_;
176 bool supports_keyboard_focus_; 176 bool supports_keyboard_focus_;
177 177
178 bool is_persistent_; 178 bool is_persistent_;
179 bool can_create_without_renderer_; 179 bool can_create_without_renderer_;
180 180
181 DISALLOW_COPY_AND_ASSIGN(TestPlugin); 181 DISALLOW_COPY_AND_ASSIGN(TestPlugin);
182 }; 182 };
183 183
184 } // namespace test_runner 184 } // namespace test_runner
185 185
186 #endif // COMPONENTS_TEST_RUNNER_TEST_PLUGIN_H_ 186 #endif // COMPONENTS_TEST_RUNNER_TEST_PLUGIN_H_
OLDNEW
« no previous file with comments | « no previous file | components/test_runner/test_plugin.cc » ('j') | third_party/WebKit/Source/modules/webgl/CHROMIUMValuebuffer.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698