OLD | NEW |
| (Empty) |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef MOJO_GPU_MOJO_CONTEXT_SUPPORT_H_ | |
6 #define MOJO_GPU_MOJO_CONTEXT_SUPPORT_H_ | |
7 | |
8 #include <MGL/mgl.h> | |
9 | |
10 #include "base/macros.h" | |
11 #include "gpu/command_buffer/client/context_support.h" | |
12 | |
13 namespace mojo { | |
14 | |
15 class MojoContextSupport : public gpu::ContextSupport { | |
16 public: | |
17 explicit MojoContextSupport(MGLContext context); | |
18 ~MojoContextSupport() override; | |
19 | |
20 // gpu::ContextSupport implementation. | |
21 void SignalSyncPoint(uint32 sync_point, | |
22 const base::Closure& callback) override; | |
23 void SignalQuery(uint32 query, const base::Closure& callback) override; | |
24 void SetSurfaceVisible(bool visible) override; | |
25 void Swap() override; | |
26 void PartialSwapBuffers(const gfx::Rect& sub_buffer) override; | |
27 void ScheduleOverlayPlane(int plane_z_order, | |
28 gfx::OverlayTransform plane_transform, | |
29 unsigned overlay_texture_id, | |
30 const gfx::Rect& display_bounds, | |
31 const gfx::RectF& uv_rect) override; | |
32 uint32 InsertFutureSyncPointCHROMIUM() override; | |
33 void RetireSyncPointCHROMIUM(uint32 sync_point) override; | |
34 | |
35 private: | |
36 MGLContext context_; | |
37 DISALLOW_COPY_AND_ASSIGN(MojoContextSupport); | |
38 }; | |
39 } | |
40 | |
41 #endif // MOJO_GPU_MOJO_CONTEXT_SUPPORT_H_ | |
OLD | NEW |