OLD | NEW |
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 906 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
917 attributes.noAutomaticFlushes = true; | 917 attributes.noAutomaticFlushes = true; |
918 | 918 |
919 return make_scoped_ptr( | 919 return make_scoped_ptr( |
920 WebGraphicsContext3DCommandBufferImpl::CreateOffscreenContext( | 920 WebGraphicsContext3DCommandBufferImpl::CreateOffscreenContext( |
921 this, | 921 this, |
922 attributes, | 922 attributes, |
923 GURL("chrome://gpu/RenderThreadImpl::CreateOffscreenContext3d"))); | 923 GURL("chrome://gpu/RenderThreadImpl::CreateOffscreenContext3d"))); |
924 } | 924 } |
925 | 925 |
926 class RenderThreadImpl::RendererContextProviderCommandBuffer | 926 class RenderThreadImpl::RendererContextProviderCommandBuffer |
927 : public content::ContextProviderCommandBuffer { | 927 : public ContextProviderCommandBuffer { |
928 protected: | 928 protected: |
929 virtual ~RendererContextProviderCommandBuffer() {} | 929 virtual ~RendererContextProviderCommandBuffer() {} |
930 | 930 |
931 virtual scoped_ptr<WebGraphicsContext3DCommandBufferImpl> | 931 virtual scoped_ptr<WebGraphicsContext3DCommandBufferImpl> |
932 CreateOffscreenContext3d() { | 932 CreateOffscreenContext3d() { |
933 RenderThreadImpl* self = RenderThreadImpl::current(); | 933 RenderThreadImpl* self = RenderThreadImpl::current(); |
934 DCHECK(self); | 934 DCHECK(self); |
935 return self->CreateOffscreenContext3d().Pass(); | 935 return self->CreateOffscreenContext3d().Pass(); |
936 } | 936 } |
937 }; | 937 }; |
938 | 938 |
939 scoped_refptr<cc::ContextProvider> | 939 scoped_refptr<ContextProviderCommandBuffer> |
940 RenderThreadImpl::OffscreenContextProviderForMainThread() { | 940 RenderThreadImpl::OffscreenContextProviderForMainThread() { |
941 if (!shared_contexts_main_thread_ || | 941 if (!shared_contexts_main_thread_ || |
942 shared_contexts_main_thread_->DestroyedOnMainThread()) | 942 shared_contexts_main_thread_->DestroyedOnMainThread()) |
943 shared_contexts_main_thread_ = new RendererContextProviderCommandBuffer; | 943 shared_contexts_main_thread_ = new RendererContextProviderCommandBuffer; |
944 return shared_contexts_main_thread_; | 944 return shared_contexts_main_thread_; |
945 } | 945 } |
946 | 946 |
947 scoped_refptr<cc::ContextProvider> | 947 scoped_refptr<ContextProviderCommandBuffer> |
948 RenderThreadImpl::OffscreenContextProviderForCompositorThread() { | 948 RenderThreadImpl::OffscreenContextProviderForCompositorThread() { |
949 if (!shared_contexts_compositor_thread_ || | 949 if (!shared_contexts_compositor_thread_ || |
950 shared_contexts_compositor_thread_->DestroyedOnMainThread()) { | 950 shared_contexts_compositor_thread_->DestroyedOnMainThread()) { |
951 shared_contexts_compositor_thread_ = | 951 shared_contexts_compositor_thread_ = |
952 new RendererContextProviderCommandBuffer; | 952 new RendererContextProviderCommandBuffer; |
953 } | 953 } |
954 return shared_contexts_compositor_thread_; | 954 return shared_contexts_compositor_thread_; |
955 } | 955 } |
956 | 956 |
957 AudioRendererMixerManager* RenderThreadImpl::GetAudioRendererMixerManager() { | 957 AudioRendererMixerManager* RenderThreadImpl::GetAudioRendererMixerManager() { |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1250 | 1250 |
1251 void RenderThreadImpl::SetFlingCurveParameters( | 1251 void RenderThreadImpl::SetFlingCurveParameters( |
1252 const std::vector<float>& new_touchpad, | 1252 const std::vector<float>& new_touchpad, |
1253 const std::vector<float>& new_touchscreen) { | 1253 const std::vector<float>& new_touchscreen) { |
1254 webkit_platform_support_->SetFlingCurveParameters(new_touchpad, | 1254 webkit_platform_support_->SetFlingCurveParameters(new_touchpad, |
1255 new_touchscreen); | 1255 new_touchscreen); |
1256 | 1256 |
1257 } | 1257 } |
1258 | 1258 |
1259 } // namespace content | 1259 } // namespace content |
OLD | NEW |