| 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 #ifndef CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ | 5 #ifndef CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ |
| 6 #define CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ | 6 #define CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 using WebKit::WGC3Duint; | 51 using WebKit::WGC3Duint; |
| 52 using WebKit::WGC3Dfloat; | 52 using WebKit::WGC3Dfloat; |
| 53 using WebKit::WGC3Dclampf; | 53 using WebKit::WGC3Dclampf; |
| 54 using WebKit::WGC3Dintptr; | 54 using WebKit::WGC3Dintptr; |
| 55 using WebKit::WGC3Dsizeiptr; | 55 using WebKit::WGC3Dsizeiptr; |
| 56 | 56 |
| 57 // TODO(piman): move this logic to the compositor and remove it from the | 57 // TODO(piman): move this logic to the compositor and remove it from the |
| 58 // context... | 58 // context... |
| 59 class WebGraphicsContext3DSwapBuffersClient { | 59 class WebGraphicsContext3DSwapBuffersClient { |
| 60 public: | 60 public: |
| 61 virtual ~WebGraphicsContext3DSwapBuffersClient() { } | |
| 62 virtual void OnViewContextSwapBuffersPosted() = 0; | 61 virtual void OnViewContextSwapBuffersPosted() = 0; |
| 63 virtual void OnViewContextSwapBuffersComplete() = 0; | 62 virtual void OnViewContextSwapBuffersComplete() = 0; |
| 64 virtual void OnViewContextSwapBuffersAborted() = 0; | 63 virtual void OnViewContextSwapBuffersAborted() = 0; |
| 64 |
| 65 protected: |
| 66 virtual ~WebGraphicsContext3DSwapBuffersClient() {} |
| 65 }; | 67 }; |
| 66 | 68 |
| 67 class WebGraphicsContext3DErrorMessageCallback; | 69 class WebGraphicsContext3DErrorMessageCallback; |
| 68 | 70 |
| 69 class WebGraphicsContext3DCommandBufferImpl | 71 class WebGraphicsContext3DCommandBufferImpl |
| 70 : public WebKit::WebGraphicsContext3D, | 72 : public WebKit::WebGraphicsContext3D, |
| 71 public base::SupportsWeakPtr<WebGraphicsContext3DCommandBufferImpl> { | 73 public base::SupportsWeakPtr<WebGraphicsContext3DCommandBufferImpl> { |
| 72 public: | 74 public: |
| 73 WebGraphicsContext3DCommandBufferImpl( | 75 WebGraphicsContext3DCommandBufferImpl( |
| 74 int surface_id, | 76 int surface_id, |
| (...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 686 CommandBufferProxy* command_buffer_; | 688 CommandBufferProxy* command_buffer_; |
| 687 gpu::gles2::GLES2CmdHelper* gles2_helper_; | 689 gpu::gles2::GLES2CmdHelper* gles2_helper_; |
| 688 gpu::TransferBuffer* transfer_buffer_; | 690 gpu::TransferBuffer* transfer_buffer_; |
| 689 gpu::gles2::GLES2Implementation* gl_; | 691 gpu::gles2::GLES2Implementation* gl_; |
| 690 Error last_error_; | 692 Error last_error_; |
| 691 int frame_number_; | 693 int frame_number_; |
| 692 bool bind_generates_resources_; | 694 bool bind_generates_resources_; |
| 693 }; | 695 }; |
| 694 | 696 |
| 695 #endif // CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ | 697 #endif // CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ |
| OLD | NEW |