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

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

Issue 619843002: cc: Make separate interface for BeginFrame ipc from OutputSurface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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_external_begin_frame_source.h
diff --git a/content/browser/android/in_process/synchronous_compositor_external_begin_frame_source.h b/content/browser/android/in_process/synchronous_compositor_external_begin_frame_source.h
new file mode 100644
index 0000000000000000000000000000000000000000..7324bf5bbf36e841886c0a48fd8db4e19fb44994
--- /dev/null
+++ b/content/browser/android/in_process/synchronous_compositor_external_begin_frame_source.h
@@ -0,0 +1,44 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_EXTERNAL_BEGIN_FRAME_SOURCE_
+#define CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_EXTERNAL_BEGIN_FRAME_SOURCE_
+
+#include "base/basictypes.h"
+#include "base/compiler_specific.h"
+#include "cc/scheduler/begin_frame_source.h"
+
+namespace content {
+class SynchronousCompositorImpl;
+
+// Make sure that this is initialized and set to compositor before output
+// surface is bound to compositor.
+class SynchronousCompositorExternalBeginFrameSource
+ : public cc::BeginFrameSourceMixIn {
+ public:
+ explicit SynchronousCompositorExternalBeginFrameSource(int routing_id);
+ virtual ~SynchronousCompositorExternalBeginFrameSource();
+
+ void BeginFrame();
+
+ void SetCompositor(SynchronousCompositorImpl* compositor);
+
+ // cc::BeginFrameSourceMixIn implementation.
+ void OnNeedsBeginFramesChange(bool needs_begin_frames) override;
+ void SetClientReady() override;
+
+ private:
+ int routing_id_;
+
+ // Not owned. This can be null when compositor is gone first than BFS.
+ SynchronousCompositorImpl* compositor_;
+
+ bool CalledOnValidThread() const;
+
+ DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorExternalBeginFrameSource);
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_EXTERNAL_BEGIN_FRAME_SOURCE_
« no previous file with comments | « cc/trees/thread_proxy.cc ('k') | content/browser/android/in_process/synchronous_compositor_external_begin_frame_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698