Chromium Code Reviews| 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..a9bb61ea95517622f33ee62dd51957a47e8e2e0f |
| --- /dev/null |
| +++ b/content/browser/android/in_process/synchronous_compositor_external_begin_frame_source.h |
| @@ -0,0 +1,38 @@ |
| +// 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; |
| + |
| +class SynchronousCompositorExternalBeginFrameSource |
| + : public cc::BeginFrameSourceMixIn { |
| + public: |
| + explicit SynchronousCompositorExternalBeginFrameSource(int routing_id); |
| + virtual ~SynchronousCompositorExternalBeginFrameSource(); |
| + |
| + void BeginFrame(); |
| + |
| + // cc::BeginFrameSourceMixIn implementation. |
| + void SetNeedsBeginFrames(bool needs_begin_frames) override; |
|
brianderson
2014/10/23 02:12:44
Note: The BeginFrameSourceMixIn expects you to imp
simonhong
2014/10/24 14:30:18
Done.
|
| + void SetClientReady() override; |
| + |
| + private: |
| + int routing_id_; |
| + SynchronousCompositorImpl* compositor_; |
| + |
| + bool CalledOnValidThread() const; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorExternalBeginFrameSource); |
| +}; |
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_EXTERNAL_BEGIN_FRAME_SOURCE_ |