viz: Move BeginFrameSource to components/viz/common/frame_sinks

This commit is contained in:
Aleksei Kuzmin 2017-12-05 00:34:15 +03:00 committed by Cheng Zhao
parent 76683c0af5
commit abc6003640
2 changed files with 6 additions and 6 deletions

View file

@ -14,7 +14,7 @@
#include "base/memory/ptr_util.h" #include "base/memory/ptr_util.h"
#include "base/single_thread_task_runner.h" #include "base/single_thread_task_runner.h"
#include "base/time/time.h" #include "base/time/time.h"
#include "cc/scheduler/delay_based_time_source.h" #include "components/viz/common/frame_sinks/delay_based_time_source.h"
#include "components/viz/common/gl_helper.h" #include "components/viz/common/gl_helper.h"
#include "components/viz/common/quads/copy_output_request.h" #include "components/viz/common/quads/copy_output_request.h"
#include "content/browser/renderer_host/compositor_resize_lock.h" #include "content/browser/renderer_host/compositor_resize_lock.h"
@ -214,12 +214,12 @@ class AtomCopyFrameGenerator {
DISALLOW_COPY_AND_ASSIGN(AtomCopyFrameGenerator); DISALLOW_COPY_AND_ASSIGN(AtomCopyFrameGenerator);
}; };
class AtomBeginFrameTimer : public cc::DelayBasedTimeSourceClient { class AtomBeginFrameTimer : public viz::DelayBasedTimeSourceClient {
public: public:
AtomBeginFrameTimer(int frame_rate_threshold_us, AtomBeginFrameTimer(int frame_rate_threshold_us,
const base::Closure& callback) const base::Closure& callback)
: callback_(callback) { : callback_(callback) {
time_source_.reset(new cc::DelayBasedTimeSource( time_source_.reset(new viz::DelayBasedTimeSource(
content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::GetTaskRunnerForThread(
content::BrowserThread::UI).get())); content::BrowserThread::UI).get()));
time_source_->SetTimebaseAndInterval( time_source_->SetTimebaseAndInterval(
@ -248,7 +248,7 @@ class AtomBeginFrameTimer : public cc::DelayBasedTimeSourceClient {
} }
const base::Closure callback_; const base::Closure callback_;
std::unique_ptr<cc::DelayBasedTimeSource> time_source_; std::unique_ptr<viz::DelayBasedTimeSource> time_source_;
DISALLOW_COPY_AND_ASSIGN(AtomBeginFrameTimer); DISALLOW_COPY_AND_ASSIGN(AtomBeginFrameTimer);
}; };

View file

@ -21,7 +21,7 @@
#include "base/threading/thread.h" #include "base/threading/thread.h"
#include "base/time/time.h" #include "base/time/time.h"
#include "cc/output/compositor_frame.h" #include "cc/output/compositor_frame.h"
#include "cc/scheduler/begin_frame_source.h" #include "components/viz/common/frame_sinks/begin_frame_source.h"
#include "content/browser/frame_host/render_widget_host_view_guest.h" #include "content/browser/frame_host/render_widget_host_view_guest.h"
#include "content/browser/renderer_host/compositor_resize_lock.h" #include "content/browser/renderer_host/compositor_resize_lock.h"
#include "content/browser/renderer_host/delegated_frame_host.h" #include "content/browser/renderer_host/delegated_frame_host.h"
@ -327,7 +327,7 @@ class OffScreenRenderWidgetHostView
std::unique_ptr<AtomBeginFrameTimer> begin_frame_timer_; std::unique_ptr<AtomBeginFrameTimer> begin_frame_timer_;
// Provides |source_id| for BeginFrameArgs that we create. // Provides |source_id| for BeginFrameArgs that we create.
cc::StubBeginFrameSource begin_frame_source_; viz::StubBeginFrameSource begin_frame_source_;
uint64_t begin_frame_number_ = cc::BeginFrameArgs::kStartingFrameNumber; uint64_t begin_frame_number_ = cc::BeginFrameArgs::kStartingFrameNumber;
#if defined(OS_MACOSX) #if defined(OS_MACOSX)