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

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

Issue 479083006: Revert of [Android] Consolidate vsync request logic in RWHVAndroid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« 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);
344 bool Animate(base::TimeTicks frame_time); 335 bool Animate(base::TimeTicks frame_time);
345 336
346 void OnContentScrollingChange(); 337 void OnContentScrollingChange();
347 bool IsContentScrolling() const; 338 bool IsContentScrolling() const;
348 339
349 float GetDpiScale() const; 340 float GetDpiScale() const;
350 341
351 // Handles all unprocessed and pending readback requests. 342 // Handles all unprocessed and pending readback requests.
352 void AbortPendingReadbackRequests(); 343 void AbortPendingReadbackRequests();
353 344
354 // The model object. 345 // The model object.
355 RenderWidgetHostImpl* host_; 346 RenderWidgetHostImpl* host_;
356 347
357 // Used to control action dispatch at the next |OnVSync()| call. 348 // Used to track whether this render widget needs a BeginFrame.
358 uint32 outstanding_vsync_requests_; 349 bool needs_begin_frame_;
359 350
360 bool is_showing_; 351 bool is_showing_;
361 352
362 // ContentViewCoreImpl is our interface to the view system. 353 // ContentViewCoreImpl is our interface to the view system.
363 ContentViewCoreImpl* content_view_core_; 354 ContentViewCoreImpl* content_view_core_;
364 355
365 ImeAdapterAndroid ime_adapter_android_; 356 ImeAdapterAndroid ime_adapter_android_;
366 357
367 // Body background color of the underlying document. 358 // Body background color of the underlying document.
368 SkColor cached_background_color_; 359 SkColor cached_background_color_;
(...skipping 25 matching lines...) Expand all
394 385
395 // Handles gesture based text selection 386 // Handles gesture based text selection
396 GestureTextSelector gesture_text_selector_; 387 GestureTextSelector gesture_text_selector_;
397 388
398 // Manages selection handle rendering and manipulation. 389 // Manages selection handle rendering and manipulation.
399 // This will always be NULL if |content_view_core_| is NULL. 390 // This will always be NULL if |content_view_core_| is NULL.
400 scoped_ptr<TouchSelectionController> selection_controller_; 391 scoped_ptr<TouchSelectionController> selection_controller_;
401 bool touch_scrolling_; 392 bool touch_scrolling_;
402 size_t potentially_active_fling_count_; 393 size_t potentially_active_fling_count_;
403 394
395 bool flush_input_requested_;
396
404 int accelerated_surface_route_id_; 397 int accelerated_surface_route_id_;
405 398
406 // Size to use if we have no backing ContentViewCore 399 // Size to use if we have no backing ContentViewCore
407 gfx::Size default_size_; 400 gfx::Size default_size_;
408 401
409 const bool using_synchronous_compositor_; 402 const bool using_synchronous_compositor_;
410 403
411 scoped_ptr<DelegatedFrameEvictor> frame_evictor_; 404 scoped_ptr<DelegatedFrameEvictor> frame_evictor_;
412 405
413 size_t locks_on_frame_count_; 406 size_t locks_on_frame_count_;
(...skipping 13 matching lines...) Expand all
427 420
428 // List of readbackrequests waiting for arrival of a valid frame. 421 // List of readbackrequests waiting for arrival of a valid frame.
429 std::queue<ReadbackRequest> readbacks_waiting_for_frame_; 422 std::queue<ReadbackRequest> readbacks_waiting_for_frame_;
430 423
431 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); 424 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid);
432 }; 425 };
433 426
434 } // namespace content 427 } // namespace content
435 428
436 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ 429 #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