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

Unified Diff: content/browser/android/in_process/synchronous_compositor_impl.h

Issue 817603002: cc: Make scheduling be driven by vsync for android webview. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix rebase compile errors. Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/android/in_process/synchronous_compositor_impl.h
diff --git a/content/browser/android/in_process/synchronous_compositor_impl.h b/content/browser/android/in_process/synchronous_compositor_impl.h
index d6cacf0dee66e8e0865d2695d988d97dc4dbd4c6..ee5acc11e7910ee6fb76a04125d570b7494acc54 100644
--- a/content/browser/android/in_process/synchronous_compositor_impl.h
+++ b/content/browser/android/in_process/synchronous_compositor_impl.h
@@ -18,7 +18,7 @@
#include "ipc/ipc_message.h"
namespace cc {
-class BeginFrameSource;
+struct BeginFrameArgs;
class InputHandler;
}
@@ -56,7 +56,13 @@ class SynchronousCompositorImpl
void DidDestroyRendererObjects();
// Called by SynchronousCompositorExternalBeginFrameSource.
- void NeedsBeginFramesChanged() const;
+ void OnNeedsBeginFramesChange(bool needs_begin_frames);
+
+ // Called by SynchronousCompositorOutputSurface.
+ void PostInvalidate();
+
+ // Called by RenderWidgetHostViewAndroid.
+ void BeginFrame(const cc::BeginFrameArgs& args);
// SynchronousCompositor
bool InitializeHwDraw() override;
@@ -72,6 +78,7 @@ class SynchronousCompositorImpl
void ReturnResources(const cc::CompositorFrameAck& frame_ack) override;
void SetMemoryPolicy(size_t bytes_limit) override;
void DidChangeRootLayerScrollOffset() override;
+ void SetIsActive(bool is_active) override;
// LayerScrollOffsetDelegate
gfx::ScrollOffset GetTotalScrollOffset() override;
@@ -99,6 +106,7 @@ class SynchronousCompositorImpl
void DidActivatePendingTree();
void DeliverMessages();
bool CalledOnValidThread() const;
+ void UpdateNeedsBeginFrames();
SynchronousCompositorClient* compositor_client_;
SynchronousCompositorOutputSurface* output_surface_;
@@ -106,7 +114,8 @@ class SynchronousCompositorImpl
WebContents* contents_;
const int routing_id_;
cc::InputHandler* input_handler_;
- bool invoking_composite_;
+ bool is_active_;
+ bool renderer_needs_begin_frames_;
base::WeakPtrFactory<SynchronousCompositorImpl> weak_ptr_factory_;

Powered by Google App Engine
This is Rietveld 408576698