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

Side by Side Diff: content/browser/frame_host/render_widget_host_view_child_frame.h

Issue 2337913003: Fork cc::OutputSurface into cc::CompositorFrameSink. (Closed)
Patch Set: cfsfork: android-vulkan Created 4 years, 3 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 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 CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_CHILD_FRAME_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_CHILD_FRAME_H_
6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_CHILD_FRAME_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_CHILD_FRAME_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 const ReadbackRequestCallback& callback, 105 const ReadbackRequestCallback& callback,
106 const SkColorType preferred_color_type) override; 106 const SkColorType preferred_color_type) override;
107 void CopyFromCompositingSurfaceToVideoFrame( 107 void CopyFromCompositingSurfaceToVideoFrame(
108 const gfx::Rect& src_subrect, 108 const gfx::Rect& src_subrect,
109 const scoped_refptr<media::VideoFrame>& target, 109 const scoped_refptr<media::VideoFrame>& target,
110 const base::Callback<void(const gfx::Rect&, bool)>& callback) override; 110 const base::Callback<void(const gfx::Rect&, bool)>& callback) override;
111 bool CanCopyToVideoFrame() const override; 111 bool CanCopyToVideoFrame() const override;
112 bool HasAcceleratedSurface(const gfx::Size& desired_size) override; 112 bool HasAcceleratedSurface(const gfx::Size& desired_size) override;
113 void GestureEventAck(const blink::WebGestureEvent& event, 113 void GestureEventAck(const blink::WebGestureEvent& event,
114 InputEventAckState ack_result) override; 114 InputEventAckState ack_result) override;
115 void OnSwapCompositorFrame(uint32_t output_surface_id, 115 void OnSwapCompositorFrame(uint32_t compositor_frame_sink_id,
116 cc::CompositorFrame frame) override; 116 cc::CompositorFrame frame) override;
117 // Since the URL of content rendered by this class is not displayed in 117 // Since the URL of content rendered by this class is not displayed in
118 // the URL bar, this method does not need an implementation. 118 // the URL bar, this method does not need an implementation.
119 void ClearCompositorFrame() override {} 119 void ClearCompositorFrame() override {}
120 gfx::Rect GetBoundsInRootWindow() override; 120 gfx::Rect GetBoundsInRootWindow() override;
121 void ProcessAckedTouchEvent(const TouchEventWithLatencyInfo& touch, 121 void ProcessAckedTouchEvent(const TouchEventWithLatencyInfo& touch,
122 InputEventAckState ack_result) override; 122 InputEventAckState ack_result) override;
123 bool LockMouse() override; 123 bool LockMouse() override;
124 void UnlockMouse() override; 124 void UnlockMouse() override;
125 uint32_t GetSurfaceClientId() override; 125 uint32_t GetSurfaceClientId() override;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 void ReturnResources(const cc::ReturnedResourceArray& resources) override; 164 void ReturnResources(const cc::ReturnedResourceArray& resources) override;
165 void SetBeginFrameSource(cc::BeginFrameSource* source) override; 165 void SetBeginFrameSource(cc::BeginFrameSource* source) override;
166 166
167 // cc::BeginFrameObserver implementation. 167 // cc::BeginFrameObserver implementation.
168 void OnBeginFrame(const cc::BeginFrameArgs& args) override; 168 void OnBeginFrame(const cc::BeginFrameArgs& args) override;
169 const cc::BeginFrameArgs& LastUsedBeginFrameArgs() const override; 169 const cc::BeginFrameArgs& LastUsedBeginFrameArgs() const override;
170 void OnBeginFrameSourcePausedChanged(bool paused) override; 170 void OnBeginFrameSourcePausedChanged(bool paused) override;
171 171
172 // Declared 'public' instead of 'protected' here to allow derived classes 172 // Declared 'public' instead of 'protected' here to allow derived classes
173 // to Bind() to it. 173 // to Bind() to it.
174 void SurfaceDrawn(uint32_t output_surface_id); 174 void SurfaceDrawn(uint32_t compositor_frame_sink_id);
175 175
176 // Exposed for tests. 176 // Exposed for tests.
177 bool IsChildFrameForTesting() const override; 177 bool IsChildFrameForTesting() const override;
178 cc::SurfaceId SurfaceIdForTesting() const override; 178 cc::SurfaceId SurfaceIdForTesting() const override;
179 CrossProcessFrameConnector* FrameConnectorForTesting() const { 179 CrossProcessFrameConnector* FrameConnectorForTesting() const {
180 return frame_connector_; 180 return frame_connector_;
181 } 181 }
182 182
183 // Returns the current surface scale factor. 183 // Returns the current surface scale factor.
184 float current_surface_scale_factor() { return current_surface_scale_factor_; } 184 float current_surface_scale_factor() { return current_surface_scale_factor_; }
(...skipping 21 matching lines...) Expand all
206 206
207 // Members will become private when RenderWidgetHostViewGuest is removed. 207 // Members will become private when RenderWidgetHostViewGuest is removed.
208 // The model object. 208 // The model object.
209 RenderWidgetHostImpl* host_; 209 RenderWidgetHostImpl* host_;
210 210
211 // Surface-related state. 211 // Surface-related state.
212 std::unique_ptr<cc::SurfaceIdAllocator> id_allocator_; 212 std::unique_ptr<cc::SurfaceIdAllocator> id_allocator_;
213 std::unique_ptr<cc::SurfaceFactory> surface_factory_; 213 std::unique_ptr<cc::SurfaceFactory> surface_factory_;
214 cc::SurfaceId surface_id_; 214 cc::SurfaceId surface_id_;
215 uint32_t next_surface_sequence_; 215 uint32_t next_surface_sequence_;
216 uint32_t last_output_surface_id_; 216 uint32_t last_compositor_frame_sink_id_;
217 gfx::Size current_surface_size_; 217 gfx::Size current_surface_size_;
218 float current_surface_scale_factor_; 218 float current_surface_scale_factor_;
219 gfx::Rect last_screen_rect_; 219 gfx::Rect last_screen_rect_;
220 uint32_t ack_pending_count_; 220 uint32_t ack_pending_count_;
221 cc::ReturnedResourceArray surface_returned_resources_; 221 cc::ReturnedResourceArray surface_returned_resources_;
222 222
223 // frame_connector_ provides a platform abstraction. Messages 223 // frame_connector_ provides a platform abstraction. Messages
224 // sent through it are routed to the embedding renderer process. 224 // sent through it are routed to the embedding renderer process.
225 CrossProcessFrameConnector* frame_connector_; 225 CrossProcessFrameConnector* frame_connector_;
226 226
(...skipping 18 matching lines...) Expand all
245 // The surface client ID of the parent RenderWidgetHostView. 0 if none. 245 // The surface client ID of the parent RenderWidgetHostView. 0 if none.
246 uint32_t parent_surface_client_id_; 246 uint32_t parent_surface_client_id_;
247 247
248 base::WeakPtrFactory<RenderWidgetHostViewChildFrame> weak_factory_; 248 base::WeakPtrFactory<RenderWidgetHostViewChildFrame> weak_factory_;
249 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewChildFrame); 249 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewChildFrame);
250 }; 250 };
251 251
252 } // namespace content 252 } // namespace content
253 253
254 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_CHILD_FRAME_H_ 254 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_CHILD_FRAME_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698