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

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

Issue 1936773002: Move attributes and context type out to ContextProviderCommandBuffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@rmwgc3d
Patch Set: attributes: 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 unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/compositor/gpu_process_transport_factory.cc » ('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 9
10 #include <utility> 10 #include <utility>
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 TestPlugin::~TestPlugin() { 173 TestPlugin::~TestPlugin() {
174 } 174 }
175 175
176 bool TestPlugin::initialize(blink::WebPluginContainer* container) { 176 bool TestPlugin::initialize(blink::WebPluginContainer* container) {
177 DCHECK(container); 177 DCHECK(container);
178 DCHECK_EQ(this, container->plugin()); 178 DCHECK_EQ(this, container->plugin());
179 179
180 container_ = container; 180 container_ = container;
181 181
182 blink::Platform::ContextAttributes attrs; 182 blink::Platform::ContextAttributes attrs;
183 attrs.webGLVersion = 1; // We are creating a context through the WebGL APIs.
183 DCHECK(!container->element().isNull()); 184 DCHECK(!container->element().isNull());
184 DCHECK(!container->element().document().isNull()); 185 DCHECK(!container->element().document().isNull());
185 blink::WebURL url = container->element().document().url(); 186 blink::WebURL url = container->element().document().url();
186 blink::Platform::GraphicsInfo gl_info; 187 blink::Platform::GraphicsInfo gl_info;
187 context_provider_ = base::WrapUnique( 188 context_provider_ = base::WrapUnique(
188 blink::Platform::current()->createOffscreenGraphicsContext3DProvider( 189 blink::Platform::current()->createOffscreenGraphicsContext3DProvider(
189 attrs, url, nullptr, &gl_info)); 190 attrs, url, nullptr, &gl_info));
190 gl_ = context_provider_ ? context_provider_->contextGL() : nullptr; 191 gl_ = context_provider_ ? context_provider_->contextGL() : nullptr;
191 192
192 if (!InitScene()) 193 if (!InitScene())
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after
731 return kPluginPersistsMimeType; 732 return kPluginPersistsMimeType;
732 } 733 }
733 734
734 bool TestPlugin::IsSupportedMimeType(const blink::WebString& mime_type) { 735 bool TestPlugin::IsSupportedMimeType(const blink::WebString& mime_type) {
735 return mime_type == TestPlugin::MimeType() || 736 return mime_type == TestPlugin::MimeType() ||
736 mime_type == PluginPersistsMimeType() || 737 mime_type == PluginPersistsMimeType() ||
737 mime_type == CanCreateWithoutRendererMimeType(); 738 mime_type == CanCreateWithoutRendererMimeType();
738 } 739 }
739 740
740 } // namespace test_runner 741 } // namespace test_runner
OLDNEW
« no previous file with comments | « no previous file | content/browser/compositor/gpu_process_transport_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698