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

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

Issue 2096493002: Make cc::CompositorFrames movable [Part 1 of 2] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Dana's nits Created 4 years, 6 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 const gfx::ScrollOffset& max_scroll_offset, 54 const gfx::ScrollOffset& max_scroll_offset,
55 const gfx::SizeF& scrollable_size, 55 const gfx::SizeF& scrollable_size,
56 float page_scale_factor, 56 float page_scale_factor,
57 float min_page_scale_factor, 57 float min_page_scale_factor,
58 float max_page_scale_factor) override; 58 float max_page_scale_factor) override;
59 59
60 // SynchronousCompositorOutputSurfaceClient overrides. 60 // SynchronousCompositorOutputSurfaceClient overrides.
61 void DidActivatePendingTree() override; 61 void DidActivatePendingTree() override;
62 void Invalidate() override; 62 void Invalidate() override;
63 void SwapBuffers(uint32_t output_surface_id, 63 void SwapBuffers(uint32_t output_surface_id,
64 cc::CompositorFrame* frame) override; 64 cc::CompositorFrame frame) override;
65 65
66 void SetOutputSurface(SynchronousCompositorOutputSurface* output_surface); 66 void SetOutputSurface(SynchronousCompositorOutputSurface* output_surface);
67 void OnMessageReceived(const IPC::Message& message); 67 void OnMessageReceived(const IPC::Message& message);
68 bool Send(IPC::Message* message); 68 bool Send(IPC::Message* message);
69 69
70 private: 70 private:
71 struct SharedMemoryWithSize; 71 struct SharedMemoryWithSize;
72 72
73 // IPC handlers. 73 // IPC handlers.
74 void PopulateCommonParams(SyncCompositorCommonRendererParams* params) const; 74 void PopulateCommonParams(SyncCompositorCommonRendererParams* params) const;
75 void OnComputeScroll(base::TimeTicks animation_time); 75 void OnComputeScroll(base::TimeTicks animation_time);
76 void DemandDrawHw(const SyncCompositorDemandDrawHwParams& params, 76 void DemandDrawHw(const SyncCompositorDemandDrawHwParams& params,
77 IPC::Message* reply_message); 77 IPC::Message* reply_message);
78 void SetSharedMemory( 78 void SetSharedMemory(
79 const SyncCompositorSetSharedMemoryParams& params, 79 const SyncCompositorSetSharedMemoryParams& params,
80 bool* success, 80 bool* success,
81 SyncCompositorCommonRendererParams* common_renderer_params); 81 SyncCompositorCommonRendererParams* common_renderer_params);
82 void ZeroSharedMemory(); 82 void ZeroSharedMemory();
83 void DemandDrawSw(const SyncCompositorDemandDrawSwParams& params, 83 void DemandDrawSw(const SyncCompositorDemandDrawSwParams& params,
84 IPC::Message* reply_message); 84 IPC::Message* reply_message);
85 void SynchronouslyZoomBy( 85 void SynchronouslyZoomBy(
86 float zoom_delta, 86 float zoom_delta,
87 const gfx::Point& anchor, 87 const gfx::Point& anchor,
88 SyncCompositorCommonRendererParams* common_renderer_params); 88 SyncCompositorCommonRendererParams* common_renderer_params);
89 void SetScroll(const gfx::ScrollOffset& total_scroll_offset); 89 void SetScroll(const gfx::ScrollOffset& total_scroll_offset);
90 90
91 void SwapBuffersHw(uint32_t output_surface_id, cc::CompositorFrame* frame); 91 void SwapBuffersHw(uint32_t output_surface_id, cc::CompositorFrame frame);
92 void SendDemandDrawHwReply(cc::CompositorFrame* frame, 92 void SendDemandDrawHwReply(cc::CompositorFrame frame,
93 uint32_t output_surface_id, 93 uint32_t output_surface_id,
94 IPC::Message* reply_message); 94 IPC::Message* reply_message);
95 void DoDemandDrawSw(const SyncCompositorDemandDrawSwParams& params); 95 void DoDemandDrawSw(const SyncCompositorDemandDrawSwParams& params);
96 void SwapBuffersSw(cc::CompositorFrame* frame); 96 void SwapBuffersSw(cc::CompositorFrame frame);
97 void SendDemandDrawSwReply(bool success, 97 void SendDemandDrawSwReply(bool success,
98 cc::CompositorFrame* frame, 98 cc::CompositorFrame frame,
99 IPC::Message* reply_message); 99 IPC::Message* reply_message);
100 void SendAsyncRendererStateIfNeeded(); 100 void SendAsyncRendererStateIfNeeded();
101 101
102 const int routing_id_; 102 const int routing_id_;
103 IPC::Sender* const sender_; 103 IPC::Sender* const sender_;
104 ui::SynchronousInputHandlerProxy* const input_handler_proxy_; 104 ui::SynchronousInputHandlerProxy* const input_handler_proxy_;
105 const bool use_in_process_zero_copy_software_draw_; 105 const bool use_in_process_zero_copy_software_draw_;
106 SynchronousCompositorOutputSurface* output_surface_; 106 SynchronousCompositorOutputSurface* output_surface_;
107 bool inside_receive_; 107 bool inside_receive_;
108 IPC::Message* hardware_draw_reply_; 108 IPC::Message* hardware_draw_reply_;
(...skipping 13 matching lines...) Expand all
122 bool need_animate_scroll_; 122 bool need_animate_scroll_;
123 uint32_t need_invalidate_count_; 123 uint32_t need_invalidate_count_;
124 uint32_t did_activate_pending_tree_count_; 124 uint32_t did_activate_pending_tree_count_;
125 125
126 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorProxy); 126 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorProxy);
127 }; 127 };
128 128
129 } // namespace content 129 } // namespace content
130 130
131 #endif // CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_PROXY_H_ 131 #endif // CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698