| 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 "cc/blink/context_provider_web_context.h" | 7 #include "cc/blink/context_provider_web_context.h" |
| 8 #include "gpu/command_buffer/client/context_support.h" | 8 #include "gpu/command_buffer/client/context_support.h" |
| 9 #include "third_party/WebKit/public/platform/functional/WebFunction.h" | 9 #include "third_party/WebKit/public/platform/functional/WebFunction.h" |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 | 23 |
| 24 gpu::gles2::GLES2Interface* WebGraphicsContext3DProviderImpl::contextGL() { | 24 gpu::gles2::GLES2Interface* WebGraphicsContext3DProviderImpl::contextGL() { |
| 25 return provider_->ContextGL(); | 25 return provider_->ContextGL(); |
| 26 } | 26 } |
| 27 | 27 |
| 28 GrContext* WebGraphicsContext3DProviderImpl::grContext() { | 28 GrContext* WebGraphicsContext3DProviderImpl::grContext() { |
| 29 return provider_->GrContext(); | 29 return provider_->GrContext(); |
| 30 } | 30 } |
| 31 | 31 |
| 32 gpu::Capabilities WebGraphicsContext3DProviderImpl::getCapabilities() { | 32 gpu::Capabilities WebGraphicsContext3DProviderImpl::getCapabilities() { |
| 33 return provider_->ContextCapabilities().gpu; | 33 return provider_->ContextCapabilities(); |
| 34 } | 34 } |
| 35 | 35 |
| 36 void WebGraphicsContext3DProviderImpl::setLostContextCallback( | 36 void WebGraphicsContext3DProviderImpl::setLostContextCallback( |
| 37 blink::WebClosure c) { | 37 blink::WebClosure c) { |
| 38 provider_->SetLostContextCallback(c.TakeBaseCallback()); | 38 provider_->SetLostContextCallback(c.TakeBaseCallback()); |
| 39 } | 39 } |
| 40 | 40 |
| 41 void WebGraphicsContext3DProviderImpl::setErrorMessageCallback( | 41 void WebGraphicsContext3DProviderImpl::setErrorMessageCallback( |
| 42 blink::WebFunction<void(const char*, int32_t)> c) { | 42 blink::WebFunction<void(const char*, int32_t)> c) { |
| 43 provider_->ContextSupport()->SetErrorMessageCallback(c.TakeBaseCallback()); | 43 provider_->ContextSupport()->SetErrorMessageCallback(c.TakeBaseCallback()); |
| 44 } | 44 } |
| 45 | 45 |
| 46 } // namespace content | 46 } // namespace content |
| OLD | NEW |