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 SERVICES_NATIVE_VIEWPORT_VIEWPORT_SURFACE_H_ | 5 #ifndef SERVICES_NATIVE_VIEWPORT_VIEWPORT_SURFACE_H_ |
6 #define SERVICES_NATIVE_VIEWPORT_VIEWPORT_SURFACE_H_ | 6 #define SERVICES_NATIVE_VIEWPORT_VIEWPORT_SURFACE_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "cc/surfaces/surface_id.h" | 10 #include "cc/surfaces/surface_id.h" |
11 #include "mojo/services/gpu/public/interfaces/gpu.mojom.h" | 11 #include "mojo/services/gpu/public/interfaces/gpu.mojom.h" |
12 #include "mojo/services/surfaces/public/interfaces/surfaces.mojom.h" | 12 #include "mojo/services/surfaces/public/interfaces/surfaces.mojom.h" |
13 #include "mojo/services/surfaces/public/interfaces/surfaces_service.mojom.h" | |
14 #include "ui/gfx/native_widget_types.h" | 13 #include "ui/gfx/native_widget_types.h" |
15 #include "ui/gfx/size.h" | 14 #include "ui/gfx/size.h" |
16 | 15 |
17 namespace native_viewport { | 16 namespace native_viewport { |
18 | 17 |
19 // This manages the surface that draws to a particular NativeViewport instance. | 18 // This manages the surface that draws to a particular NativeViewport instance. |
20 class ViewportSurface : public mojo::SurfaceClient { | 19 class ViewportSurface : public mojo::SurfaceClient { |
21 public: | 20 public: |
22 ViewportSurface(mojo::SurfacePtr surface, | 21 ViewportSurface(mojo::SurfacePtr surface, |
23 mojo::Gpu* gpu_service, | 22 mojo::Gpu* gpu_service, |
(...skipping 21 matching lines...) Expand all Loading... |
45 bool gles2_bound_surface_created_; | 44 bool gles2_bound_surface_created_; |
46 cc::SurfaceId child_id_; | 45 cc::SurfaceId child_id_; |
47 base::WeakPtrFactory<ViewportSurface> weak_factory_; | 46 base::WeakPtrFactory<ViewportSurface> weak_factory_; |
48 | 47 |
49 DISALLOW_COPY_AND_ASSIGN(ViewportSurface); | 48 DISALLOW_COPY_AND_ASSIGN(ViewportSurface); |
50 }; | 49 }; |
51 | 50 |
52 } // namespace native_viewport | 51 } // namespace native_viewport |
53 | 52 |
54 #endif // SERVICES_NATIVE_VIEWPORT_VIEWPORT_SURFACE_H_ | 53 #endif // SERVICES_NATIVE_VIEWPORT_VIEWPORT_SURFACE_H_ |
OLD | NEW |