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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_android.h

Issue 2096493002: Make cc::CompositorFrames movable [Part 1 of 2] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reduce android_webview changes Created 4 years, 5 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 InputEventAckState ack_result) override; 141 InputEventAckState ack_result) override;
142 InputEventAckState FilterInputEvent( 142 InputEventAckState FilterInputEvent(
143 const blink::WebInputEvent& input_event) override; 143 const blink::WebInputEvent& input_event) override;
144 void OnSetNeedsFlushInput() override; 144 void OnSetNeedsFlushInput() override;
145 void GestureEventAck(const blink::WebGestureEvent& event, 145 void GestureEventAck(const blink::WebGestureEvent& event,
146 InputEventAckState ack_result) override; 146 InputEventAckState ack_result) override;
147 BrowserAccessibilityManager* CreateBrowserAccessibilityManager( 147 BrowserAccessibilityManager* CreateBrowserAccessibilityManager(
148 BrowserAccessibilityDelegate* delegate, bool for_root_frame) override; 148 BrowserAccessibilityDelegate* delegate, bool for_root_frame) override;
149 bool LockMouse() override; 149 bool LockMouse() override;
150 void UnlockMouse() override; 150 void UnlockMouse() override;
151 void OnSwapCompositorFrame( 151 void OnSwapCompositorFrame(uint32_t output_surface_id,
152 uint32_t output_surface_id, 152 cc::CompositorFrame frame) override;
153 std::unique_ptr<cc::CompositorFrame> frame) override;
154 void ClearCompositorFrame() override; 153 void ClearCompositorFrame() override;
155 void DidOverscroll(const DidOverscrollParams& params) override; 154 void DidOverscroll(const DidOverscrollParams& params) override;
156 void DidStopFlinging() override; 155 void DidStopFlinging() override;
157 uint32_t GetSurfaceIdNamespace() override; 156 uint32_t GetSurfaceIdNamespace() override;
158 void ShowDisambiguationPopup(const gfx::Rect& rect_pixels, 157 void ShowDisambiguationPopup(const gfx::Rect& rect_pixels,
159 const SkBitmap& zoomed_bitmap) override; 158 const SkBitmap& zoomed_bitmap) override;
160 std::unique_ptr<SyntheticGestureTarget> CreateSyntheticGestureTarget() 159 std::unique_ptr<SyntheticGestureTarget> CreateSyntheticGestureTarget()
161 override; 160 override;
162 void LockCompositingSurface() override; 161 void LockCompositingSurface() override;
163 void UnlockCompositingSurface() override; 162 void UnlockCompositingSurface() override;
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 void SetTextSurroundingSelectionCallback( 257 void SetTextSurroundingSelectionCallback(
259 const TextSurroundingSelectionCallback& callback); 258 const TextSurroundingSelectionCallback& callback);
260 259
261 static void OnContextLost(); 260 static void OnContextLost();
262 261
263 private: 262 private:
264 void RunAckCallbacks(cc::SurfaceDrawStatus status); 263 void RunAckCallbacks(cc::SurfaceDrawStatus status);
265 264
266 void DestroyDelegatedContent(); 265 void DestroyDelegatedContent();
267 void CheckOutputSurfaceChanged(uint32_t output_surface_id); 266 void CheckOutputSurfaceChanged(uint32_t output_surface_id);
268 void SubmitCompositorFrame(std::unique_ptr<cc::CompositorFrame> frame_data); 267 void SubmitCompositorFrame(cc::CompositorFrame frame_data);
269 void SwapDelegatedFrame(uint32_t output_surface_id, 268 void SwapDelegatedFrame(uint32_t output_surface_id,
270 std::unique_ptr<cc::CompositorFrame> frame_data); 269 cc::CompositorFrame frame_data);
271 void SendDelegatedFrameAck(uint32_t output_surface_id); 270 void SendDelegatedFrameAck(uint32_t output_surface_id);
272 void SendReturnedDelegatedResources(uint32_t output_surface_id); 271 void SendReturnedDelegatedResources(uint32_t output_surface_id);
273 272
274 void OnFrameMetadataUpdated( 273 void OnFrameMetadataUpdated(
275 const cc::CompositorFrameMetadata& frame_metadata); 274 const cc::CompositorFrameMetadata& frame_metadata);
276 275
277 void ShowInternal(); 276 void ShowInternal();
278 void HideInternal(); 277 void HideInternal();
279 void AttachLayers(); 278 void AttachLayers();
280 void RemoveLayers(); 279 void RemoveLayers();
(...skipping 16 matching lines...) Expand all
297 const ReadbackRequestCallback& callback, 296 const ReadbackRequestCallback& callback,
298 const SkColorType color_type); 297 const SkColorType color_type);
299 298
300 // If we have locks on a frame during a ContentViewCore swap or a context 299 // If we have locks on a frame during a ContentViewCore swap or a context
301 // lost, the frame is no longer valid and we can safely release all the locks. 300 // lost, the frame is no longer valid and we can safely release all the locks.
302 // Use this method to release all the locks. 301 // Use this method to release all the locks.
303 void ReleaseLocksOnSurface(); 302 void ReleaseLocksOnSurface();
304 303
305 // Drop any incoming frames from the renderer when there are locks on the 304 // Drop any incoming frames from the renderer when there are locks on the
306 // current frame. 305 // current frame.
307 void RetainFrame(uint32_t output_surface_id, 306 void RetainFrame(uint32_t output_surface_id, cc::CompositorFrame frame);
308 std::unique_ptr<cc::CompositorFrame> frame);
309 307
310 void InternalSwapCompositorFrame(uint32_t output_surface_id, 308 void InternalSwapCompositorFrame(uint32_t output_surface_id,
311 std::unique_ptr<cc::CompositorFrame> frame); 309 cc::CompositorFrame frame);
312 void OnLostResources(); 310 void OnLostResources();
313 311
314 enum VSyncRequestType { 312 enum VSyncRequestType {
315 FLUSH_INPUT = 1 << 0, 313 FLUSH_INPUT = 1 << 0,
316 BEGIN_FRAME = 1 << 1, 314 BEGIN_FRAME = 1 << 1,
317 PERSISTENT_BEGIN_FRAME = 1 << 2 315 PERSISTENT_BEGIN_FRAME = 1 << 2
318 }; 316 };
319 void RequestVSyncUpdate(uint32_t requests); 317 void RequestVSyncUpdate(uint32_t requests);
320 void StartObservingRootWindow(); 318 void StartObservingRootWindow();
321 void StopObservingRootWindow(); 319 void StopObservingRootWindow();
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 383
386 const bool using_browser_compositor_; 384 const bool using_browser_compositor_;
387 std::unique_ptr<SynchronousCompositorHost> sync_compositor_; 385 std::unique_ptr<SynchronousCompositorHost> sync_compositor_;
388 386
389 std::unique_ptr<DelegatedFrameEvictor> frame_evictor_; 387 std::unique_ptr<DelegatedFrameEvictor> frame_evictor_;
390 388
391 size_t locks_on_frame_count_; 389 size_t locks_on_frame_count_;
392 bool observing_root_window_; 390 bool observing_root_window_;
393 391
394 struct LastFrameInfo { 392 struct LastFrameInfo {
395 LastFrameInfo(uint32_t output_id, 393 LastFrameInfo(uint32_t output_id, cc::CompositorFrame output_frame);
396 std::unique_ptr<cc::CompositorFrame> output_frame);
397 ~LastFrameInfo(); 394 ~LastFrameInfo();
398 uint32_t output_surface_id; 395 uint32_t output_surface_id;
399 std::unique_ptr<cc::CompositorFrame> frame; 396 cc::CompositorFrame frame;
400 }; 397 };
401 398
402 std::unique_ptr<LastFrameInfo> last_frame_info_; 399 std::unique_ptr<LastFrameInfo> last_frame_info_;
403 400
404 TextSurroundingSelectionCallback text_surrounding_selection_callback_; 401 TextSurroundingSelectionCallback text_surrounding_selection_callback_;
405 402
406 // The last scroll offset of the view. 403 // The last scroll offset of the view.
407 gfx::Vector2dF last_scroll_offset_; 404 gfx::Vector2dF last_scroll_offset_;
408 405
409 base::WeakPtrFactory<RenderWidgetHostViewAndroid> weak_ptr_factory_; 406 base::WeakPtrFactory<RenderWidgetHostViewAndroid> weak_ptr_factory_;
410 407
411 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); 408 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid);
412 }; 409 };
413 410
414 } // namespace content 411 } // namespace content
415 412
416 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ 413 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698