| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/webgraphicscontext3d_provider_impl.h" | 5 #include "content/renderer/webgraphicscontext3d_provider_impl.h" |
| 6 | 6 |
| 7 #include "content/common/gpu/client/context_provider_command_buffer.h" | |
| 8 #include "gpu/command_buffer/client/context_support.h" | 7 #include "gpu/command_buffer/client/context_support.h" |
| 8 #include "services/ui/public/cpp/gpu/context_provider_command_buffer.h" |
| 9 | 9 |
| 10 namespace content { | 10 namespace content { |
| 11 | 11 |
| 12 WebGraphicsContext3DProviderImpl::WebGraphicsContext3DProviderImpl( | 12 WebGraphicsContext3DProviderImpl::WebGraphicsContext3DProviderImpl( |
| 13 scoped_refptr<ContextProviderCommandBuffer> provider, | 13 scoped_refptr<ui::ContextProviderCommandBuffer> provider, |
| 14 bool software_rendering) | 14 bool software_rendering) |
| 15 : provider_(std::move(provider)), software_rendering_(software_rendering) {} | 15 : provider_(std::move(provider)), software_rendering_(software_rendering) {} |
| 16 | 16 |
| 17 WebGraphicsContext3DProviderImpl::~WebGraphicsContext3DProviderImpl() {} | 17 WebGraphicsContext3DProviderImpl::~WebGraphicsContext3DProviderImpl() {} |
| 18 | 18 |
| 19 bool WebGraphicsContext3DProviderImpl::bindToCurrentThread() { | 19 bool WebGraphicsContext3DProviderImpl::bindToCurrentThread() { |
| 20 return provider_->BindToCurrentThread(); | 20 return provider_->BindToCurrentThread(); |
| 21 } | 21 } |
| 22 | 22 |
| 23 gpu::gles2::GLES2Interface* WebGraphicsContext3DProviderImpl::contextGL() { | 23 gpu::gles2::GLES2Interface* WebGraphicsContext3DProviderImpl::contextGL() { |
| (...skipping 21 matching lines...) Expand all Loading... |
| 45 const base::Callback<void(const char*, int32_t)>& c) { | 45 const base::Callback<void(const char*, int32_t)>& c) { |
| 46 provider_->ContextSupport()->SetErrorMessageCallback(c); | 46 provider_->ContextSupport()->SetErrorMessageCallback(c); |
| 47 } | 47 } |
| 48 | 48 |
| 49 void WebGraphicsContext3DProviderImpl::signalQuery( | 49 void WebGraphicsContext3DProviderImpl::signalQuery( |
| 50 uint32_t query, const base::Closure& callback) { | 50 uint32_t query, const base::Closure& callback) { |
| 51 provider_->ContextSupport()->SignalQuery(query, callback); | 51 provider_->ContextSupport()->SignalQuery(query, callback); |
| 52 } | 52 } |
| 53 | 53 |
| 54 } // namespace content | 54 } // namespace content |
| OLD | NEW |