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

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

Issue 1703163002: Remove dependency on GURL from content/common/gpu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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 <utility> 10 #include <utility>
(...skipping 1502 matching lines...) Expand 10 before | Expand all | Expand 10 after
1513 1513
1514 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> 1514 scoped_ptr<WebGraphicsContext3DCommandBufferImpl>
1515 RenderThreadImpl::CreateOffscreenContext3d() { 1515 RenderThreadImpl::CreateOffscreenContext3d() {
1516 blink::WebGraphicsContext3D::Attributes attributes(GetOffscreenAttribs()); 1516 blink::WebGraphicsContext3D::Attributes attributes(GetOffscreenAttribs());
1517 bool lose_context_when_out_of_memory = true; 1517 bool lose_context_when_out_of_memory = true;
1518 1518
1519 scoped_refptr<GpuChannelHost> gpu_channel_host(EstablishGpuChannelSync( 1519 scoped_refptr<GpuChannelHost> gpu_channel_host(EstablishGpuChannelSync(
1520 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE)); 1520 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE));
1521 return make_scoped_ptr( 1521 return make_scoped_ptr(
1522 WebGraphicsContext3DCommandBufferImpl::CreateOffscreenContext( 1522 WebGraphicsContext3DCommandBufferImpl::CreateOffscreenContext(
1523 gpu_channel_host.get(), 1523 gpu_channel_host.get(), attributes, lose_context_when_out_of_memory,
1524 attributes, 1524 "chrome://gpu/RenderThreadImpl::CreateOffscreenContext3d",
1525 lose_context_when_out_of_memory, 1525 WebGraphicsContext3DCommandBufferImpl::SharedMemoryLimits(), NULL));
1526 GURL("chrome://gpu/RenderThreadImpl::CreateOffscreenContext3d"),
1527 WebGraphicsContext3DCommandBufferImpl::SharedMemoryLimits(),
1528 NULL));
1529 } 1526 }
1530 1527
1531 scoped_refptr<cc_blink::ContextProviderWebContext> 1528 scoped_refptr<cc_blink::ContextProviderWebContext>
1532 RenderThreadImpl::SharedMainThreadContextProvider() { 1529 RenderThreadImpl::SharedMainThreadContextProvider() {
1533 DCHECK(IsMainThread()); 1530 DCHECK(IsMainThread());
1534 if (!shared_main_thread_contexts_.get() || 1531 if (!shared_main_thread_contexts_.get() ||
1535 shared_main_thread_contexts_->ContextGL()->GetGraphicsResetStatusKHR() != 1532 shared_main_thread_contexts_->ContextGL()->GetGraphicsResetStatusKHR() !=
1536 GL_NO_ERROR) { 1533 GL_NO_ERROR) {
1537 shared_main_thread_contexts_ = ContextProviderCommandBuffer::Create( 1534 shared_main_thread_contexts_ = ContextProviderCommandBuffer::Create(
1538 CreateOffscreenContext3d(), RENDERER_MAINTHREAD_CONTEXT); 1535 CreateOffscreenContext3d(), RENDERER_MAINTHREAD_CONTEXT);
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after
2171 } 2168 }
2172 2169
2173 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { 2170 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() {
2174 size_t erased = 2171 size_t erased =
2175 RenderThreadImpl::current()->pending_render_frame_connects_.erase( 2172 RenderThreadImpl::current()->pending_render_frame_connects_.erase(
2176 routing_id_); 2173 routing_id_);
2177 DCHECK_EQ(1u, erased); 2174 DCHECK_EQ(1u, erased);
2178 } 2175 }
2179 2176
2180 } // namespace content 2177 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698