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

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: Accommodate WebView... 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
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_view_android.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 StartObservingRootWindow();
342 void StopObservingRootWindow();
343 void SendBeginFrame(base::TimeTicks frame_time, base::TimeDelta vsync_period);
335 bool Animate(base::TimeTicks frame_time); 344 bool Animate(base::TimeTicks frame_time);
336 345
337 void OnContentScrollingChange(); 346 void OnContentScrollingChange();
338 bool IsContentScrolling() const; 347 bool IsContentScrolling() const;
339 348
340 float GetDpiScale() const; 349 float GetDpiScale() const;
341 350
342 // Handles all unprocessed and pending readback requests. 351 // Handles all unprocessed and pending readback requests.
343 void AbortPendingReadbackRequests(); 352 void AbortPendingReadbackRequests();
344 353
345 // The model object. 354 // The model object.
346 RenderWidgetHostImpl* host_; 355 RenderWidgetHostImpl* host_;
347 356
348 // Used to track whether this render widget needs a BeginFrame. 357 // Used to control action dispatch at the next |OnVSync()| call.
349 bool needs_begin_frame_; 358 uint32 outstanding_vsync_requests_;
350 359
351 bool is_showing_; 360 bool is_showing_;
352 361
353 // ContentViewCoreImpl is our interface to the view system. 362 // ContentViewCoreImpl is our interface to the view system.
354 ContentViewCoreImpl* content_view_core_; 363 ContentViewCoreImpl* content_view_core_;
355 364
356 ImeAdapterAndroid ime_adapter_android_; 365 ImeAdapterAndroid ime_adapter_android_;
357 366
358 // Body background color of the underlying document. 367 // Body background color of the underlying document.
359 SkColor cached_background_color_; 368 SkColor cached_background_color_;
(...skipping 25 matching lines...) Expand all
385 394
386 // Handles gesture based text selection 395 // Handles gesture based text selection
387 GestureTextSelector gesture_text_selector_; 396 GestureTextSelector gesture_text_selector_;
388 397
389 // Manages selection handle rendering and manipulation. 398 // Manages selection handle rendering and manipulation.
390 // This will always be NULL if |content_view_core_| is NULL. 399 // This will always be NULL if |content_view_core_| is NULL.
391 scoped_ptr<TouchSelectionController> selection_controller_; 400 scoped_ptr<TouchSelectionController> selection_controller_;
392 bool touch_scrolling_; 401 bool touch_scrolling_;
393 size_t potentially_active_fling_count_; 402 size_t potentially_active_fling_count_;
394 403
395 bool flush_input_requested_;
396
397 int accelerated_surface_route_id_; 404 int accelerated_surface_route_id_;
398 405
399 // Size to use if we have no backing ContentViewCore 406 // Size to use if we have no backing ContentViewCore
400 gfx::Size default_size_; 407 gfx::Size default_size_;
401 408
402 const bool using_synchronous_compositor_; 409 const bool using_synchronous_compositor_;
403 410
404 scoped_ptr<DelegatedFrameEvictor> frame_evictor_; 411 scoped_ptr<DelegatedFrameEvictor> frame_evictor_;
405 412
406 size_t locks_on_frame_count_; 413 size_t locks_on_frame_count_;
(...skipping 13 matching lines...) Expand all
420 427
421 // List of readbackrequests waiting for arrival of a valid frame. 428 // List of readbackrequests waiting for arrival of a valid frame.
422 std::queue<ReadbackRequest> readbacks_waiting_for_frame_; 429 std::queue<ReadbackRequest> readbacks_waiting_for_frame_;
423 430
424 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); 431 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid);
425 }; 432 };
426 433
427 } // namespace content 434 } // namespace content
428 435
429 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ 436 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_view_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698