| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 MOJO_SERVICES_GLES2_COMMAND_BUFFER_IMPL_H_ | 5 #ifndef MOJO_SERVICES_GLES2_COMMAND_BUFFER_IMPL_H_ |
| 6 #define MOJO_SERVICES_GLES2_COMMAND_BUFFER_IMPL_H_ | 6 #define MOJO_SERVICES_GLES2_COMMAND_BUFFER_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/timer/timer.h" | 9 #include "base/timer/timer.h" |
| 10 #include "mojo/public/cpp/system/core.h" | 10 #include "mojo/public/cpp/system/core.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 virtual void SetGetBuffer(int32_t buffer) OVERRIDE; | 39 virtual void SetGetBuffer(int32_t buffer) OVERRIDE; |
| 40 virtual void Flush(int32_t put_offset) OVERRIDE; | 40 virtual void Flush(int32_t put_offset) OVERRIDE; |
| 41 virtual void MakeProgress(int32_t last_get_offset) OVERRIDE; | 41 virtual void MakeProgress(int32_t last_get_offset) OVERRIDE; |
| 42 virtual void RegisterTransferBuffer( | 42 virtual void RegisterTransferBuffer( |
| 43 int32_t id, | 43 int32_t id, |
| 44 mojo::ScopedSharedBufferHandle transfer_buffer, | 44 mojo::ScopedSharedBufferHandle transfer_buffer, |
| 45 uint32_t size) OVERRIDE; | 45 uint32_t size) OVERRIDE; |
| 46 virtual void DestroyTransferBuffer(int32_t id) OVERRIDE; | 46 virtual void DestroyTransferBuffer(int32_t id) OVERRIDE; |
| 47 virtual void Echo(const Callback<void()>& callback) OVERRIDE; | 47 virtual void Echo(const Callback<void()>& callback) OVERRIDE; |
| 48 | 48 |
| 49 virtual void RequestAnimationFrames() OVERRIDE; | |
| 50 virtual void CancelAnimationFrames() OVERRIDE; | |
| 51 | |
| 52 private: | 49 private: |
| 53 bool DoInitialize(mojo::ScopedSharedBufferHandle shared_state); | 50 bool DoInitialize(mojo::ScopedSharedBufferHandle shared_state); |
| 54 | 51 |
| 55 void OnResize(gfx::Size size, float scale_factor); | 52 void OnResize(gfx::Size size, float scale_factor); |
| 56 | 53 |
| 57 void OnParseError(); | 54 void OnParseError(); |
| 58 | 55 |
| 59 void DrawAnimationFrame(); | |
| 60 | |
| 61 CommandBufferSyncClientPtr sync_client_; | 56 CommandBufferSyncClientPtr sync_client_; |
| 62 | 57 |
| 63 gfx::AcceleratedWidget widget_; | 58 gfx::AcceleratedWidget widget_; |
| 64 gfx::Size size_; | 59 gfx::Size size_; |
| 65 scoped_ptr<gpu::CommandBufferService> command_buffer_; | 60 scoped_ptr<gpu::CommandBufferService> command_buffer_; |
| 66 scoped_ptr<gpu::gles2::GLES2Decoder> decoder_; | 61 scoped_ptr<gpu::gles2::GLES2Decoder> decoder_; |
| 67 scoped_ptr<gpu::GpuScheduler> scheduler_; | 62 scoped_ptr<gpu::GpuScheduler> scheduler_; |
| 68 scoped_refptr<gfx::GLSurface> surface_; | 63 scoped_refptr<gfx::GLSurface> surface_; |
| 69 base::RepeatingTimer<CommandBufferImpl> timer_; | |
| 70 | 64 |
| 71 DISALLOW_COPY_AND_ASSIGN(CommandBufferImpl); | 65 DISALLOW_COPY_AND_ASSIGN(CommandBufferImpl); |
| 72 }; | 66 }; |
| 73 | 67 |
| 74 } // namespace services | 68 } // namespace services |
| 75 } // namespace mojo | 69 } // namespace mojo |
| 76 | 70 |
| 77 #endif // MOJO_SERVICES_GLES2_COMMAND_BUFFER_IMPL_H_ | 71 #endif // MOJO_SERVICES_GLES2_COMMAND_BUFFER_IMPL_H_ |
| OLD | NEW |