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> | 8 #include <memory> |
9 | 9 |
10 #include "android_webview/browser/compositor_id.h" | 10 #include "android_webview/browser/compositor_id.h" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/memory/ptr_util.h" | |
dcheng
2016/10/21 06:42:56
Nit: let's not include this in headers (it's prett
boliu
2016/10/21 15:15:32
Done.
| |
12 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
13 #include "cc/surfaces/frame_sink_id.h" | 14 #include "cc/surfaces/frame_sink_id.h" |
14 #include "cc/surfaces/surface_factory_client.h" | 15 #include "cc/surfaces/surface_factory_client.h" |
15 #include "cc/surfaces/surface_id.h" | 16 #include "cc/surfaces/surface_id.h" |
17 #include "content/public/browser/android/synchronous_compositor.h" | |
16 | 18 |
17 struct AwDrawGLInfo; | 19 struct AwDrawGLInfo; |
18 | 20 |
19 namespace cc { | 21 namespace cc { |
20 class Display; | 22 class Display; |
21 class SurfaceFactory; | 23 class SurfaceFactory; |
22 class SurfaceIdAllocator; | 24 class SurfaceIdAllocator; |
23 class SurfaceManager; | 25 class SurfaceManager; |
24 } | 26 } |
25 | 27 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
59 gfx::Size frame_size_; | 61 gfx::Size frame_size_; |
60 | 62 |
61 // Infromation from UI on last commit. | 63 // Infromation from UI on last commit. |
62 gfx::Vector2d scroll_offset_; | 64 gfx::Vector2d scroll_offset_; |
63 | 65 |
64 // This holds the last ChildFrame received. Contains the frame info of the | 66 // This holds the last ChildFrame received. Contains the frame info of the |
65 // last frame. The |frame| member may be null if it's already submitted to | 67 // last frame. The |frame| member may be null if it's already submitted to |
66 // SurfaceFactory. | 68 // SurfaceFactory. |
67 std::unique_ptr<ChildFrame> child_frame_; | 69 std::unique_ptr<ChildFrame> child_frame_; |
68 | 70 |
71 scoped_refptr<content::SynchronousCompositor::FrameFuture> frame_future_; | |
72 | |
69 const scoped_refptr<SurfacesInstance> surfaces_; | 73 const scoped_refptr<SurfacesInstance> surfaces_; |
70 cc::FrameSinkId frame_sink_id_; | 74 cc::FrameSinkId frame_sink_id_; |
71 const std::unique_ptr<cc::SurfaceIdAllocator> surface_id_allocator_; | 75 const std::unique_ptr<cc::SurfaceIdAllocator> surface_id_allocator_; |
72 std::unique_ptr<cc::SurfaceFactory> surface_factory_; | 76 std::unique_ptr<cc::SurfaceFactory> surface_factory_; |
73 cc::LocalFrameId child_id_; | 77 cc::LocalFrameId child_id_; |
74 CompositorID compositor_id_; | 78 CompositorID compositor_id_; |
75 // HardwareRenderer guarantees resources are returned in the order of | 79 // HardwareRenderer guarantees resources are returned in the order of |
76 // compositor_frame_sink_id, and resources for old output surfaces are | 80 // compositor_frame_sink_id, and resources for old output surfaces are |
77 // dropped. | 81 // dropped. |
78 uint32_t last_committed_compositor_frame_sink_id_; | 82 uint32_t last_committed_compositor_frame_sink_id_; |
79 uint32_t last_submitted_compositor_frame_sink_id_; | 83 uint32_t last_submitted_compositor_frame_sink_id_; |
80 | 84 |
81 DISALLOW_COPY_AND_ASSIGN(HardwareRenderer); | 85 DISALLOW_COPY_AND_ASSIGN(HardwareRenderer); |
82 }; | 86 }; |
83 | 87 |
84 } // namespace android_webview | 88 } // namespace android_webview |
85 | 89 |
86 #endif // ANDROID_WEBVIEW_BROWSER_HARDWARE_RENDERER_H_ | 90 #endif // ANDROID_WEBVIEW_BROWSER_HARDWARE_RENDERER_H_ |
OLD | NEW |