OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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 CONTENT_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_HOST_H_ | 5 #ifndef CONTENT_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_HOST_H_ |
6 #define CONTENT_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_HOST_H_ | 6 #define CONTENT_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_HOST_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
51 RenderWidgetHostViewAndroid* rwhva, | 51 RenderWidgetHostViewAndroid* rwhva, |
52 WebContents* web_contents); | 52 WebContents* web_contents); |
53 | 53 |
54 ~SynchronousCompositorHost() override; | 54 ~SynchronousCompositorHost() override; |
55 | 55 |
56 // SynchronousCompositor overrides. | 56 // SynchronousCompositor overrides. |
57 SynchronousCompositor::Frame DemandDrawHw( | 57 SynchronousCompositor::Frame DemandDrawHw( |
58 const gfx::Size& viewport_size, | 58 const gfx::Size& viewport_size, |
59 const gfx::Rect& viewport_rect_for_tile_priority, | 59 const gfx::Rect& viewport_rect_for_tile_priority, |
60 const gfx::Transform& transform_for_tile_priority) override; | 60 const gfx::Transform& transform_for_tile_priority) override; |
61 SynchronousCompositor::Frame DemandDrawHw_Async( | |
boliu
2016/08/11 19:23:39
this should not have a return value
ojars
2016/08/23 02:15:42
Done.
| |
62 const gfx::Size& viewport_size, | |
63 const gfx::Rect& viewport_rect_for_tile_priority, | |
64 const gfx::Transform& transform_for_tile_priority) override; | |
61 bool DemandDrawSw(SkCanvas* canvas) override; | 65 bool DemandDrawSw(SkCanvas* canvas) override; |
62 void ReturnResources(uint32_t output_surface_id, | 66 void ReturnResources(uint32_t output_surface_id, |
63 const cc::ReturnedResourceArray& resources) override; | 67 const cc::ReturnedResourceArray& resources) override; |
64 void SetMemoryPolicy(size_t bytes_limit) override; | 68 void SetMemoryPolicy(size_t bytes_limit) override; |
65 void DidChangeRootLayerScrollOffset( | 69 void DidChangeRootLayerScrollOffset( |
66 const gfx::ScrollOffset& root_offset) override; | 70 const gfx::ScrollOffset& root_offset) override; |
67 void SynchronouslyZoomBy(float zoom_delta, const gfx::Point& anchor) override; | 71 void SynchronouslyZoomBy(float zoom_delta, const gfx::Point& anchor) override; |
68 void OnComputeScroll(base::TimeTicks animation_time) override; | 72 void OnComputeScroll(base::TimeTicks animation_time) override; |
69 | 73 |
70 void DidOverscroll(const DidOverscrollParams& over_scroll_params); | 74 void DidOverscroll(const DidOverscrollParams& over_scroll_params); |
71 void DidSendBeginFrame(ui::WindowAndroid* window_android); | 75 void DidSendBeginFrame(ui::WindowAndroid* window_android); |
72 bool OnMessageReceived(const IPC::Message& message); | 76 bool OnMessageReceived(const IPC::Message& message); |
77 void DemandDrawHwReceiveFrame(uint32_t output_surface_id, | |
boliu
2016/08/11 19:23:39
doesn't need to be public
ojars
2016/08/23 02:15:42
Done.
| |
78 const cc::CompositorFrame&); | |
boliu
2016/08/11 19:23:39
variable name required, by style guide
ojars
2016/08/23 02:15:42
Done.
| |
73 | 79 |
74 // Called by SynchronousCompositorObserver. | 80 // Called by SynchronousCompositorObserver. |
75 int routing_id() const { return routing_id_; } | 81 int routing_id() const { return routing_id_; } |
76 void ProcessCommonParams(const SyncCompositorCommonRendererParams& params); | 82 void ProcessCommonParams(const SyncCompositorCommonRendererParams& params); |
77 | 83 |
78 private: | 84 private: |
79 class ScopedSendZeroMemory; | 85 class ScopedSendZeroMemory; |
80 struct SharedMemoryWithSize; | 86 struct SharedMemoryWithSize; |
81 friend class ScopedSetZeroMemory; | 87 friend class ScopedSetZeroMemory; |
82 friend class SynchronousCompositorBase; | 88 friend class SynchronousCompositorBase; |
(...skipping 27 matching lines...) Expand all Loading... | |
110 bool need_animate_scroll_; | 116 bool need_animate_scroll_; |
111 uint32_t need_invalidate_count_; | 117 uint32_t need_invalidate_count_; |
112 uint32_t did_activate_pending_tree_count_; | 118 uint32_t did_activate_pending_tree_count_; |
113 | 119 |
114 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorHost); | 120 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorHost); |
115 }; | 121 }; |
116 | 122 |
117 } // namespace content | 123 } // namespace content |
118 | 124 |
119 #endif // CONTENT_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_HOST_H_ | 125 #endif // CONTENT_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_HOST_H_ |
OLD | NEW |