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

Side by Side Diff: content/shell/renderer/test_runner/TestPlugin.cpp

Issue 470973002: gpu: Remove WebGraphicsContext3D::makeContextCurrent() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: build fix in unittests Created 6 years, 3 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 #include "content/shell/renderer/test_runner/TestPlugin.h" 5 #include "content/shell/renderer/test_runner/TestPlugin.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/shared_memory.h" 10 #include "base/memory/shared_memory.h"
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 } 185 }
186 186
187 TestPlugin::~TestPlugin() 187 TestPlugin::~TestPlugin()
188 { 188 {
189 } 189 }
190 190
191 bool TestPlugin::initialize(WebPluginContainer* container) 191 bool TestPlugin::initialize(WebPluginContainer* container)
192 { 192 {
193 WebGraphicsContext3D::Attributes attrs; 193 WebGraphicsContext3D::Attributes attrs;
194 m_context = Platform::current()->createOffscreenGraphicsContext3D(attrs); 194 m_context = Platform::current()->createOffscreenGraphicsContext3D(attrs);
195 if (m_context && !m_context->makeContextCurrent()) {
196 delete m_context;
197 m_context = 0;
198 }
199 195
200 if (!initScene()) 196 if (!initScene())
201 return false; 197 return false;
202 198
203 m_layer = cc::TextureLayer::CreateForMailbox(this); 199 m_layer = cc::TextureLayer::CreateForMailbox(this);
204 m_webLayer = make_scoped_ptr(InstantiateWebLayer(m_layer)); 200 m_webLayer = make_scoped_ptr(InstantiateWebLayer(m_layer));
205 m_container = container; 201 m_container = container;
206 m_container->setWebLayer(m_webLayer.get()); 202 m_container->setWebLayer(m_webLayer.get());
207 if (m_reRequestTouchEvents) { 203 if (m_reRequestTouchEvents) {
208 m_container->requestTouchEventType(WebPluginContainer::TouchEventRequest TypeSynthesizedMouse); 204 m_container->requestTouchEventType(WebPluginContainer::TouchEventRequest TypeSynthesizedMouse);
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
678 } 674 }
679 675
680 bool TestPlugin::isSupportedMimeType(const WebString& mimeType) 676 bool TestPlugin::isSupportedMimeType(const WebString& mimeType)
681 { 677 {
682 return mimeType == TestPlugin::mimeType() 678 return mimeType == TestPlugin::mimeType()
683 || mimeType == pluginPersistsMimeType() 679 || mimeType == pluginPersistsMimeType()
684 || mimeType == canCreateWithoutRendererMimeType(); 680 || mimeType == canCreateWithoutRendererMimeType();
685 } 681 }
686 682
687 } // namespace content 683 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/renderer_webkitplatformsupport_impl.cc ('k') | webkit/common/gpu/context_provider_in_process.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698