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

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

Issue 492923002: [Android] Consolidate vsync request logic in RWHVAndroid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More cleanup Created 6 years, 4 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 <map> 8 #include <map>
9 #include <queue> 9 #include <queue>
10 10
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 void ReleaseLocksOnSurface(); 325 void ReleaseLocksOnSurface();
326 326
327 // Drop any incoming frames from the renderer when there are locks on the 327 // Drop any incoming frames from the renderer when there are locks on the
328 // current frame. 328 // current frame.
329 void RetainFrame(uint32 output_surface_id, 329 void RetainFrame(uint32 output_surface_id,
330 scoped_ptr<cc::CompositorFrame> frame); 330 scoped_ptr<cc::CompositorFrame> frame);
331 331
332 void InternalSwapCompositorFrame(uint32 output_surface_id, 332 void InternalSwapCompositorFrame(uint32 output_surface_id,
333 scoped_ptr<cc::CompositorFrame> frame); 333 scoped_ptr<cc::CompositorFrame> frame);
334 334
335 enum VSyncRequestType {
336 FLUSH_INPUT = 1 << 0,
337 BEGIN_FRAME = 1 << 1,
338 PERSISTENT_BEGIN_FRAME = 1 << 2
339 };
340 void RequestVSyncUpdate(uint32 requests);
341 void SendBeginFrame(base::TimeTicks frame_time, base::TimeDelta vsync_period);
335 bool Animate(base::TimeTicks frame_time); 342 bool Animate(base::TimeTicks frame_time);
336 343
337 void OnContentScrollingChange(); 344 void OnContentScrollingChange();
338 bool IsContentScrolling() const; 345 bool IsContentScrolling() const;
339 346
340 float GetDpiScale() const; 347 float GetDpiScale() const;
341 348
342 // Handles all unprocessed and pending readback requests. 349 // Handles all unprocessed and pending readback requests.
343 void AbortPendingReadbackRequests(); 350 void AbortPendingReadbackRequests();
344 351
345 // The model object. 352 // The model object.
346 RenderWidgetHostImpl* host_; 353 RenderWidgetHostImpl* host_;
347 354
348 // Used to track whether this render widget needs a BeginFrame. 355 // Used to control action dispatch at the next |OnVSync()| call.
349 bool needs_begin_frame_; 356 uint32 outstanding_vsync_requests_;
350 357
351 bool is_showing_; 358 bool is_showing_;
352 359
353 // ContentViewCoreImpl is our interface to the view system. 360 // ContentViewCoreImpl is our interface to the view system.
354 ContentViewCoreImpl* content_view_core_; 361 ContentViewCoreImpl* content_view_core_;
355 362
356 ImeAdapterAndroid ime_adapter_android_; 363 ImeAdapterAndroid ime_adapter_android_;
357 364
358 // Body background color of the underlying document. 365 // Body background color of the underlying document.
359 SkColor cached_background_color_; 366 SkColor cached_background_color_;
(...skipping 25 matching lines...) Expand all
385 392
386 // Handles gesture based text selection 393 // Handles gesture based text selection
387 GestureTextSelector gesture_text_selector_; 394 GestureTextSelector gesture_text_selector_;
388 395
389 // Manages selection handle rendering and manipulation. 396 // Manages selection handle rendering and manipulation.
390 // This will always be NULL if |content_view_core_| is NULL. 397 // This will always be NULL if |content_view_core_| is NULL.
391 scoped_ptr<TouchSelectionController> selection_controller_; 398 scoped_ptr<TouchSelectionController> selection_controller_;
392 bool touch_scrolling_; 399 bool touch_scrolling_;
393 size_t potentially_active_fling_count_; 400 size_t potentially_active_fling_count_;
394 401
395 bool flush_input_requested_;
396
397 int accelerated_surface_route_id_; 402 int accelerated_surface_route_id_;
398 403
399 // Size to use if we have no backing ContentViewCore 404 // Size to use if we have no backing ContentViewCore
400 gfx::Size default_size_; 405 gfx::Size default_size_;
401 406
402 const bool using_synchronous_compositor_; 407 const bool using_synchronous_compositor_;
403 408
404 scoped_ptr<DelegatedFrameEvictor> frame_evictor_; 409 scoped_ptr<DelegatedFrameEvictor> frame_evictor_;
405 410
406 size_t locks_on_frame_count_; 411 size_t locks_on_frame_count_;
(...skipping 13 matching lines...) Expand all
420 425
421 // List of readbackrequests waiting for arrival of a valid frame. 426 // List of readbackrequests waiting for arrival of a valid frame.
422 std::queue<ReadbackRequest> readbacks_waiting_for_frame_; 427 std::queue<ReadbackRequest> readbacks_waiting_for_frame_;
423 428
424 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); 429 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid);
425 }; 430 };
426 431
427 } // namespace content 432 } // namespace content
428 433
429 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ 434 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698