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 ANDROID_WEBVIEW_BROWSER_HARDWARE_RENDERER_H_ | 5 #ifndef ANDROID_WEBVIEW_BROWSER_HARDWARE_RENDERER_H_ |
6 #define ANDROID_WEBVIEW_BROWSER_HARDWARE_RENDERER_H_ | 6 #define ANDROID_WEBVIEW_BROWSER_HARDWARE_RENDERER_H_ |
7 | 7 |
| 8 #include <memory> |
| 9 |
8 #include "android_webview/browser/shared_renderer_state.h" | 10 #include "android_webview/browser/shared_renderer_state.h" |
9 #include "base/macros.h" | 11 #include "base/macros.h" |
10 #include "base/memory/scoped_ptr.h" | |
11 #include "cc/surfaces/display_client.h" | 12 #include "cc/surfaces/display_client.h" |
12 #include "cc/surfaces/surface_factory_client.h" | 13 #include "cc/surfaces/surface_factory_client.h" |
13 #include "cc/surfaces/surface_id.h" | 14 #include "cc/surfaces/surface_id.h" |
14 | 15 |
15 struct AwDrawGLInfo; | 16 struct AwDrawGLInfo; |
16 | 17 |
17 namespace cc { | 18 namespace cc { |
18 class Display; | 19 class Display; |
19 class SurfaceFactory; | 20 class SurfaceFactory; |
20 class SurfaceIdAllocator; | 21 class SurfaceIdAllocator; |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 | 63 |
63 // Information about last delegated frame. | 64 // Information about last delegated frame. |
64 gfx::Size frame_size_; | 65 gfx::Size frame_size_; |
65 | 66 |
66 // Infromation from UI on last commit. | 67 // Infromation from UI on last commit. |
67 gfx::Vector2d scroll_offset_; | 68 gfx::Vector2d scroll_offset_; |
68 | 69 |
69 // This holds the last ChildFrame received. Contains the frame info of the | 70 // This holds the last ChildFrame received. Contains the frame info of the |
70 // last frame. The |frame| member may be null if it's already submitted to | 71 // last frame. The |frame| member may be null if it's already submitted to |
71 // SurfaceFactory. | 72 // SurfaceFactory. |
72 scoped_ptr<ChildFrame> child_frame_; | 73 std::unique_ptr<ChildFrame> child_frame_; |
73 | 74 |
74 scoped_refptr<AwGLSurface> gl_surface_; | 75 scoped_refptr<AwGLSurface> gl_surface_; |
75 | 76 |
76 scoped_ptr<cc::SurfaceManager> surface_manager_; | 77 std::unique_ptr<cc::SurfaceManager> surface_manager_; |
77 scoped_ptr<cc::Display> display_; | 78 std::unique_ptr<cc::Display> display_; |
78 scoped_ptr<cc::SurfaceFactory> surface_factory_; | 79 std::unique_ptr<cc::SurfaceFactory> surface_factory_; |
79 scoped_ptr<cc::SurfaceIdAllocator> surface_id_allocator_; | 80 std::unique_ptr<cc::SurfaceIdAllocator> surface_id_allocator_; |
80 cc::SurfaceId child_id_; | 81 cc::SurfaceId child_id_; |
81 cc::SurfaceId root_id_; | 82 cc::SurfaceId root_id_; |
82 uint32_t compositor_id_; | 83 uint32_t compositor_id_; |
83 // HardwareRenderer guarantees resources are returned in the order of | 84 // HardwareRenderer guarantees resources are returned in the order of |
84 // output_surface_id, and resources for old output surfaces are dropped. | 85 // output_surface_id, and resources for old output surfaces are dropped. |
85 uint32_t last_committed_output_surface_id_; | 86 uint32_t last_committed_output_surface_id_; |
86 uint32_t last_submitted_output_surface_id_; | 87 uint32_t last_submitted_output_surface_id_; |
87 | 88 |
88 // This is owned by |display_|. | 89 // This is owned by |display_|. |
89 ParentOutputSurface* output_surface_; | 90 ParentOutputSurface* output_surface_; |
90 | 91 |
91 DISALLOW_COPY_AND_ASSIGN(HardwareRenderer); | 92 DISALLOW_COPY_AND_ASSIGN(HardwareRenderer); |
92 }; | 93 }; |
93 | 94 |
94 } // namespace android_webview | 95 } // namespace android_webview |
95 | 96 |
96 #endif // ANDROID_WEBVIEW_BROWSER_HARDWARE_RENDERER_H_ | 97 #endif // ANDROID_WEBVIEW_BROWSER_HARDWARE_RENDERER_H_ |
OLD | NEW |