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

Side by Side Diff: content/renderer/render_thread_impl.cc

Issue 126093010: Use ContextProvider subclass to provide WGC3D pointers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/renderer/render_thread_impl.h" 5 #include "content/renderer/render_thread_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
(...skipping 924 matching lines...) Expand 10 before | Expand all | Expand 10 after
935 935
936 if (!offscreen_compositor_contexts_.get() || 936 if (!offscreen_compositor_contexts_.get() ||
937 offscreen_compositor_contexts_->DestroyedOnMainThread()) { 937 offscreen_compositor_contexts_->DestroyedOnMainThread()) {
938 offscreen_compositor_contexts_ = ContextProviderCommandBuffer::Create( 938 offscreen_compositor_contexts_ = ContextProviderCommandBuffer::Create(
939 CreateOffscreenContext3d(), 939 CreateOffscreenContext3d(),
940 "Compositor-Offscreen"); 940 "Compositor-Offscreen");
941 } 941 }
942 return offscreen_compositor_contexts_; 942 return offscreen_compositor_contexts_;
943 } 943 }
944 944
945 scoped_refptr<cc::ContextProvider> 945 scoped_refptr<ContextProviderWebContext>
946 RenderThreadImpl::SharedMainThreadContextProvider() { 946 RenderThreadImpl::SharedMainThreadContextProvider() {
947 DCHECK(IsMainThread()); 947 DCHECK(IsMainThread());
948 #if defined(OS_ANDROID) 948 #if defined(OS_ANDROID)
949 if (SynchronousCompositorFactory* factory = 949 if (SynchronousCompositorFactory* factory =
950 SynchronousCompositorFactory::GetInstance()) 950 SynchronousCompositorFactory::GetInstance())
951 return factory->GetOffscreenContextProviderForMainThread(); 951 return factory->GetOffscreenContextProviderForMainThread();
952 #endif 952 #endif
953 953
954 if (!shared_main_thread_contexts_ || 954 if (!shared_main_thread_contexts_ ||
955 shared_main_thread_contexts_->DestroyedOnMainThread()) { 955 shared_main_thread_contexts_->DestroyedOnMainThread()) {
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
1354 if (!gamepad_shared_memory_reader_) 1354 if (!gamepad_shared_memory_reader_)
1355 gamepad_shared_memory_reader_.reset(new GamepadSharedMemoryReader); 1355 gamepad_shared_memory_reader_.reset(new GamepadSharedMemoryReader);
1356 gamepad_shared_memory_reader_->SampleGamepads(*data); 1356 gamepad_shared_memory_reader_->SampleGamepads(*data);
1357 } 1357 }
1358 1358
1359 base::ProcessId RenderThreadImpl::renderer_process_id() const { 1359 base::ProcessId RenderThreadImpl::renderer_process_id() const {
1360 return renderer_process_id_; 1360 return renderer_process_id_;
1361 } 1361 }
1362 1362
1363 } // namespace content 1363 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698