Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(150)

Side by Side Diff: content/renderer/android/synchronous_compositor_proxy.h

Issue 1546383002: sync compositor: Send ipc reply in swap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_PROXY_H_ 5 #ifndef CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_PROXY_H_
6 #define CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_PROXY_H_ 6 #define CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_PROXY_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 const gfx::SizeF& scrollable_size, 59 const gfx::SizeF& scrollable_size,
60 float page_scale_factor, 60 float page_scale_factor,
61 float min_page_scale_factor, 61 float min_page_scale_factor,
62 float max_page_scale_factor) override; 62 float max_page_scale_factor) override;
63 63
64 // SynchronousCompositorExternalBeginFrameSourceClient overrides. 64 // SynchronousCompositorExternalBeginFrameSourceClient overrides.
65 void OnNeedsBeginFramesChange(bool needs_begin_frames) override; 65 void OnNeedsBeginFramesChange(bool needs_begin_frames) override;
66 66
67 // SynchronousCompositorOutputSurfaceClient overrides. 67 // SynchronousCompositorOutputSurfaceClient overrides.
68 void Invalidate() override; 68 void Invalidate() override;
69 void SwapBuffers(cc::CompositorFrame* frame) override;
69 70
70 void OnMessageReceived(const IPC::Message& message); 71 void OnMessageReceived(const IPC::Message& message);
71 bool Send(IPC::Message* message); 72 bool Send(IPC::Message* message);
72 void DidOverscroll(const DidOverscrollParams& did_overscroll_params); 73 void DidOverscroll(const DidOverscrollParams& did_overscroll_params);
73 74
74 private: 75 private:
75 void ProcessCommonParams( 76 void ProcessCommonParams(
76 const SyncCompositorCommonBrowserParams& common_params); 77 const SyncCompositorCommonBrowserParams& common_params);
77 void PopulateCommonParams(SyncCompositorCommonRendererParams* params); 78 void PopulateCommonParams(SyncCompositorCommonRendererParams* params);
78 79
79 // IPC handlers. 80 // IPC handlers.
80 void HandleInputEvent( 81 void HandleInputEvent(
81 const SyncCompositorCommonBrowserParams& common_params, 82 const SyncCompositorCommonBrowserParams& common_params,
82 const blink::WebInputEvent* event, 83 const blink::WebInputEvent* event,
83 SyncCompositorCommonRendererParams* common_renderer_params, 84 SyncCompositorCommonRendererParams* common_renderer_params,
84 InputEventAckState* ack); 85 InputEventAckState* ack);
85 void BeginFrame(const SyncCompositorCommonBrowserParams& common_params, 86 void BeginFrame(const SyncCompositorCommonBrowserParams& common_params,
86 const cc::BeginFrameArgs& args, 87 const cc::BeginFrameArgs& args,
87 SyncCompositorCommonRendererParams* common_renderer_params); 88 SyncCompositorCommonRendererParams* common_renderer_params);
88 void OnComputeScroll( 89 void OnComputeScroll(
89 const SyncCompositorCommonBrowserParams& common_params, 90 const SyncCompositorCommonBrowserParams& common_params,
90 base::TimeTicks animation_time, 91 base::TimeTicks animation_time,
91 SyncCompositorCommonRendererParams* common_renderer_params); 92 SyncCompositorCommonRendererParams* common_renderer_params);
92 void DemandDrawHw(const SyncCompositorCommonBrowserParams& common_params, 93 void DemandDrawHw(const SyncCompositorCommonBrowserParams& common_params,
93 const SyncCompositorDemandDrawHwParams& params, 94 const SyncCompositorDemandDrawHwParams& params,
94 SyncCompositorCommonRendererParams* common_renderer_params, 95 IPC::Message* reply_message);
95 cc::CompositorFrame* frame);
96 void DemandDrawSw(const SyncCompositorCommonBrowserParams& common_params, 96 void DemandDrawSw(const SyncCompositorCommonBrowserParams& common_params,
97 const SyncCompositorDemandDrawSwParams& params, 97 const SyncCompositorDemandDrawSwParams& params,
98 bool* result, 98 bool* result,
99 SyncCompositorCommonRendererParams* common_renderer_params, 99 SyncCompositorCommonRendererParams* common_renderer_params,
100 cc::CompositorFrame* frame); 100 cc::CompositorFrame* frame);
101 101
102 void SwapBuffersHw(cc::CompositorFrame* frame);
103 void SwapBuffersSw(cc::CompositorFrame* frame);
102 void DidActivatePendingTree(); 104 void DidActivatePendingTree();
103 void DeliverMessages(); 105 void DeliverMessages();
104 void SendAsyncRendererStateIfNeeded(); 106 void SendAsyncRendererStateIfNeeded();
105 107
106 const int routing_id_; 108 const int routing_id_;
107 IPC::Sender* const sender_; 109 IPC::Sender* const sender_;
108 SynchronousCompositorOutputSurface* const output_surface_; 110 SynchronousCompositorOutputSurface* const output_surface_;
109 SynchronousCompositorExternalBeginFrameSource* const begin_frame_source_; 111 SynchronousCompositorExternalBeginFrameSource* const begin_frame_source_;
110 ui::SynchronousInputHandlerProxy* const input_handler_proxy_; 112 ui::SynchronousInputHandlerProxy* const input_handler_proxy_;
111 InputHandlerManagerClient::Handler* const input_handler_; 113 InputHandlerManagerClient::Handler* const input_handler_;
112 bool inside_receive_; 114 bool inside_receive_;
115 IPC::Message* hardware_draw_reply_;
116 scoped_ptr<cc::CompositorFrame> software_frame_holder_;
113 117
114 // From browser. 118 // From browser.
115 size_t bytes_limit_; 119 size_t bytes_limit_;
116 120
117 uint32_t version_; 121 uint32_t version_;
118 gfx::ScrollOffset total_scroll_offset_; // Modified by both. 122 gfx::ScrollOffset total_scroll_offset_; // Modified by both.
119 gfx::ScrollOffset max_scroll_offset_; 123 gfx::ScrollOffset max_scroll_offset_;
120 gfx::SizeF scrollable_size_; 124 gfx::SizeF scrollable_size_;
121 float page_scale_factor_; 125 float page_scale_factor_;
122 float min_page_scale_factor_; 126 float min_page_scale_factor_;
123 float max_page_scale_factor_; 127 float max_page_scale_factor_;
124 bool need_animate_scroll_; 128 bool need_animate_scroll_;
125 bool need_invalidate_; 129 bool need_invalidate_;
126 bool need_begin_frame_; 130 bool need_begin_frame_;
127 bool did_activate_pending_tree_; 131 bool did_activate_pending_tree_;
128 132
129 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorProxy); 133 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorProxy);
130 }; 134 };
131 135
132 } // namespace content 136 } // namespace content
133 137
134 #endif // CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_PROXY_H_ 138 #endif // CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698