| 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 SERVICES_GLES2_COMMAND_BUFFER_DRIVER_H_ | 5 #ifndef SERVICES_GLES2_COMMAND_BUFFER_DRIVER_H_ |
| 6 #define SERVICES_GLES2_COMMAND_BUFFER_DRIVER_H_ | 6 #define SERVICES_GLES2_COMMAND_BUFFER_DRIVER_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 mojo::CommandBufferLostContextObserverPtr loss_observer, | 62 mojo::CommandBufferLostContextObserverPtr loss_observer, |
| 63 mojo::ScopedSharedBufferHandle shared_state); | 63 mojo::ScopedSharedBufferHandle shared_state); |
| 64 void SetGetBuffer(int32_t buffer); | 64 void SetGetBuffer(int32_t buffer); |
| 65 void Flush(int32_t put_offset); | 65 void Flush(int32_t put_offset); |
| 66 void MakeProgress(int32_t last_get_offset); | 66 void MakeProgress(int32_t last_get_offset); |
| 67 void RegisterTransferBuffer(int32_t id, | 67 void RegisterTransferBuffer(int32_t id, |
| 68 mojo::ScopedSharedBufferHandle transfer_buffer, | 68 mojo::ScopedSharedBufferHandle transfer_buffer, |
| 69 uint32_t size); | 69 uint32_t size); |
| 70 void DestroyTransferBuffer(int32_t id); | 70 void DestroyTransferBuffer(int32_t id); |
| 71 void Echo(const mojo::Callback<void()>& callback); | 71 void Echo(const mojo::Callback<void()>& callback); |
| 72 void RetireSyncPointOnGpuThread(uint32_t sync_point); |
| 72 | 73 |
| 73 private: | 74 private: |
| 74 bool DoInitialize(mojo::ScopedSharedBufferHandle shared_state); | 75 bool DoInitialize(mojo::ScopedSharedBufferHandle shared_state); |
| 75 void OnResize(gfx::Size size, float scale_factor); | 76 void OnResize(gfx::Size size, float scale_factor); |
| 76 bool OnWaitSyncPoint(uint32_t sync_point); | 77 bool OnWaitSyncPoint(uint32_t sync_point); |
| 77 void OnSyncPointRetired(); | 78 void OnSyncPointRetired(); |
| 78 void OnParseError(); | 79 void OnParseError(); |
| 79 void OnContextLost(uint32_t reason); | 80 void OnContextLost(uint32_t reason); |
| 80 void OnUpdateVSyncParameters(const base::TimeTicks timebase, | 81 void OnUpdateVSyncParameters(const base::TimeTicks timebase, |
| 81 const base::TimeDelta interval); | 82 const base::TimeDelta interval); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 98 base::Callback<void(int32_t)> context_lost_callback_; | 99 base::Callback<void(int32_t)> context_lost_callback_; |
| 99 | 100 |
| 100 base::WeakPtrFactory<CommandBufferDriver> weak_factory_; | 101 base::WeakPtrFactory<CommandBufferDriver> weak_factory_; |
| 101 | 102 |
| 102 DISALLOW_COPY_AND_ASSIGN(CommandBufferDriver); | 103 DISALLOW_COPY_AND_ASSIGN(CommandBufferDriver); |
| 103 }; | 104 }; |
| 104 | 105 |
| 105 } // namespace gles2 | 106 } // namespace gles2 |
| 106 | 107 |
| 107 #endif // SERVICES_GLES2_COMMAND_BUFFER_DRIVER_H_ | 108 #endif // SERVICES_GLES2_COMMAND_BUFFER_DRIVER_H_ |
| OLD | NEW |