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

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

Issue 101223005: Plumbing explicit share groups through context creation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 10 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 892 matching lines...) Expand 10 before | Expand all | Expand 10 after
903 if (!gpu_channel_host) { 903 if (!gpu_channel_host) {
904 gpu_channel_host = EstablishGpuChannelSync( 904 gpu_channel_host = EstablishGpuChannelSync(
905 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZ E); 905 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZ E);
906 } 906 }
907 gpu_va_context_provider_ = ContextProviderCommandBuffer::Create( 907 gpu_va_context_provider_ = ContextProviderCommandBuffer::Create(
908 make_scoped_ptr( 908 make_scoped_ptr(
909 WebGraphicsContext3DCommandBufferImpl::CreateOffscreenContext( 909 WebGraphicsContext3DCommandBufferImpl::CreateOffscreenContext(
910 gpu_channel_host.get(), 910 gpu_channel_host.get(),
911 blink::WebGraphicsContext3D::Attributes(), 911 blink::WebGraphicsContext3D::Attributes(),
912 GURL("chrome://gpu/RenderThreadImpl::GetGpuVDAContext3D"), 912 GURL("chrome://gpu/RenderThreadImpl::GetGpuVDAContext3D"),
913 WebGraphicsContext3DCommandBufferImpl::SharedMemoryLimits())), 913 WebGraphicsContext3DCommandBufferImpl::SharedMemoryLimits(),
914 NULL)),
914 "GPU-VideoAccelerator-Offscreen"); 915 "GPU-VideoAccelerator-Offscreen");
915 if (gpu_va_context_provider_) { 916 if (gpu_va_context_provider_) {
916 media_loop_proxy->PostTask( 917 media_loop_proxy->PostTask(
917 FROM_HERE, 918 FROM_HERE,
918 base::Bind( 919 base::Bind(
919 base::IgnoreResult(&cc::ContextProvider::BindToCurrentThread), 920 base::IgnoreResult(&cc::ContextProvider::BindToCurrentThread),
920 gpu_va_context_provider_)); 921 gpu_va_context_provider_));
921 } 922 }
922 } 923 }
923 } 924 }
(...skipping 13 matching lines...) Expand all
937 attributes.antialias = false; 938 attributes.antialias = false;
938 attributes.noAutomaticFlushes = true; 939 attributes.noAutomaticFlushes = true;
939 940
940 scoped_refptr<GpuChannelHost> gpu_channel_host(EstablishGpuChannelSync( 941 scoped_refptr<GpuChannelHost> gpu_channel_host(EstablishGpuChannelSync(
941 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE)); 942 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE));
942 return make_scoped_ptr( 943 return make_scoped_ptr(
943 WebGraphicsContext3DCommandBufferImpl::CreateOffscreenContext( 944 WebGraphicsContext3DCommandBufferImpl::CreateOffscreenContext(
944 gpu_channel_host.get(), 945 gpu_channel_host.get(),
945 attributes, 946 attributes,
946 GURL("chrome://gpu/RenderThreadImpl::CreateOffscreenContext3d"), 947 GURL("chrome://gpu/RenderThreadImpl::CreateOffscreenContext3d"),
947 WebGraphicsContext3DCommandBufferImpl::SharedMemoryLimits())); 948 WebGraphicsContext3DCommandBufferImpl::SharedMemoryLimits(),
949 NULL));
948 } 950 }
949 951
950 scoped_refptr<cc::ContextProvider> 952 scoped_refptr<cc::ContextProvider>
951 RenderThreadImpl::OffscreenCompositorContextProvider() { 953 RenderThreadImpl::OffscreenCompositorContextProvider() {
952 DCHECK(IsMainThread()); 954 DCHECK(IsMainThread());
953 955
954 #if defined(OS_ANDROID) 956 #if defined(OS_ANDROID)
955 if (SynchronousCompositorFactory* factory = 957 if (SynchronousCompositorFactory* factory =
956 SynchronousCompositorFactory::GetInstance()) { 958 SynchronousCompositorFactory::GetInstance()) {
957 if (compositor_message_loop_proxy_) 959 if (compositor_message_loop_proxy_)
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
1415 hidden_widget_count_--; 1417 hidden_widget_count_--;
1416 1418
1417 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { 1419 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) {
1418 return; 1420 return;
1419 } 1421 }
1420 1422
1421 ScheduleIdleHandler(kLongIdleHandlerDelayMs); 1423 ScheduleIdleHandler(kLongIdleHandlerDelayMs);
1422 } 1424 }
1423 1425
1424 } // namespace content 1426 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698