| 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 #ifndef MOJO_GLES2_GLES2_CONTEXT_H_ | 5 #ifndef MOJO_GLES2_GLES2_CONTEXT_H_ |
| 6 #define MOJO_GLES2_GLES2_CONTEXT_H_ | 6 #define MOJO_GLES2_GLES2_CONTEXT_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 9 |
| 8 #include "base/macros.h" | 10 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" | |
| 10 #include "gpu/command_buffer/client/gles2_implementation.h" | 11 #include "gpu/command_buffer/client/gles2_implementation.h" |
| 11 #include "mojo/gles2/command_buffer_client_impl.h" | 12 #include "mojo/gles2/command_buffer_client_impl.h" |
| 12 #include "mojo/public/c/gpu/MGL/mgl_echo.h" | 13 #include "mojo/public/c/gpu/MGL/mgl_echo.h" |
| 13 #include "mojo/public/c/gpu/MGL/mgl_signal_sync_point.h" | 14 #include "mojo/public/c/gpu/MGL/mgl_signal_sync_point.h" |
| 14 #include "mojo/public/c/gpu/MGL/mgl_types.h" | 15 #include "mojo/public/c/gpu/MGL/mgl_types.h" |
| 15 | 16 |
| 16 struct MGLContextPrivate {}; | 17 struct MGLContextPrivate {}; |
| 17 | 18 |
| 18 namespace gpu { | 19 namespace gpu { |
| 19 class TransferBuffer; | 20 class TransferBuffer; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 42 void Echo(MGLEchoCallback callback, void* closure); | 43 void Echo(MGLEchoCallback callback, void* closure); |
| 43 | 44 |
| 44 void SignalSyncPoint(uint32_t sync_point, | 45 void SignalSyncPoint(uint32_t sync_point, |
| 45 MGLSignalSyncPointCallback callback, | 46 MGLSignalSyncPointCallback callback, |
| 46 void* closure); | 47 void* closure); |
| 47 | 48 |
| 48 private: | 49 private: |
| 49 void ContextLost() override; | 50 void ContextLost() override; |
| 50 | 51 |
| 51 CommandBufferClientImpl command_buffer_; | 52 CommandBufferClientImpl command_buffer_; |
| 52 scoped_ptr<gpu::gles2::GLES2CmdHelper> gles2_helper_; | 53 std::unique_ptr<gpu::gles2::GLES2CmdHelper> gles2_helper_; |
| 53 scoped_ptr<gpu::TransferBuffer> transfer_buffer_; | 54 std::unique_ptr<gpu::TransferBuffer> transfer_buffer_; |
| 54 scoped_ptr<gpu::gles2::GLES2Implementation> implementation_; | 55 std::unique_ptr<gpu::gles2::GLES2Implementation> implementation_; |
| 55 MGLContextLostCallback lost_callback_; | 56 MGLContextLostCallback lost_callback_; |
| 56 void* closure_; | 57 void* closure_; |
| 57 | 58 |
| 58 MOJO_DISALLOW_COPY_AND_ASSIGN(GLES2Context); | 59 MOJO_DISALLOW_COPY_AND_ASSIGN(GLES2Context); |
| 59 }; | 60 }; |
| 60 | 61 |
| 61 } // namespace gles2 | 62 } // namespace gles2 |
| 62 | 63 |
| 63 #endif // MOJO_GLES2_GLES2_CONTEXT_H_ | 64 #endif // MOJO_GLES2_GLES2_CONTEXT_H_ |
| OLD | NEW |