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

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: rebase 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
« no previous file with comments | « content/renderer/render_thread_impl.h ('k') | content/renderer/render_view_impl.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 (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 920 matching lines...) Expand 10 before | Expand all | Expand 10 after
931 931
932 if (!offscreen_compositor_contexts_.get() || 932 if (!offscreen_compositor_contexts_.get() ||
933 offscreen_compositor_contexts_->DestroyedOnMainThread()) { 933 offscreen_compositor_contexts_->DestroyedOnMainThread()) {
934 offscreen_compositor_contexts_ = ContextProviderCommandBuffer::Create( 934 offscreen_compositor_contexts_ = ContextProviderCommandBuffer::Create(
935 CreateOffscreenContext3d(), 935 CreateOffscreenContext3d(),
936 "Compositor-Offscreen"); 936 "Compositor-Offscreen");
937 } 937 }
938 return offscreen_compositor_contexts_; 938 return offscreen_compositor_contexts_;
939 } 939 }
940 940
941 scoped_refptr<cc::ContextProvider> 941 scoped_refptr<webkit::gpu::ContextProviderWebContext>
942 RenderThreadImpl::SharedMainThreadContextProvider() { 942 RenderThreadImpl::SharedMainThreadContextProvider() {
943 DCHECK(IsMainThread()); 943 DCHECK(IsMainThread());
944 #if defined(OS_ANDROID) 944 #if defined(OS_ANDROID)
945 if (SynchronousCompositorFactory* factory = 945 if (SynchronousCompositorFactory* factory =
946 SynchronousCompositorFactory::GetInstance()) 946 SynchronousCompositorFactory::GetInstance())
947 return factory->GetOffscreenContextProviderForMainThread(); 947 return factory->GetOffscreenContextProviderForMainThread();
948 #endif 948 #endif
949 949
950 if (!shared_main_thread_contexts_ || 950 if (!shared_main_thread_contexts_ ||
951 shared_main_thread_contexts_->DestroyedOnMainThread()) { 951 shared_main_thread_contexts_->DestroyedOnMainThread()) {
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
1392 hidden_widget_count_--; 1392 hidden_widget_count_--;
1393 1393
1394 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { 1394 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) {
1395 return; 1395 return;
1396 } 1396 }
1397 1397
1398 ScheduleIdleHandler(kLongIdleHandlerDelayMs); 1398 ScheduleIdleHandler(kLongIdleHandlerDelayMs);
1399 } 1399 }
1400 1400
1401 } // namespace content 1401 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_thread_impl.h ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698