summaryrefslogtreecommitdiffstats
path: root/cc/test/fake_output_surface.cc
diff options
context:
space:
mode:
authorjoth@chromium.org <joth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-19 05:17:18 +0000
committerjoth@chromium.org <joth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-19 05:17:18 +0000
commit5f07afcd9dc529b87cfa860ba8cbb526af214dec (patch)
tree5ae9ed998300679338518998b64b8972ab951350 /cc/test/fake_output_surface.cc
parentd12ffd8adf17f6442ed60900d14eaa84d0b4f027 (diff)
downloadchromium_src-5f07afcd9dc529b87cfa860ba8cbb526af214dec.zip
chromium_src-5f07afcd9dc529b87cfa860ba8cbb526af214dec.tar.gz
chromium_src-5f07afcd9dc529b87cfa860ba8cbb526af214dec.tar.bz2
Adds a new callback as this signal is required to pass up to the application
independent of whether the compositor is generating frames BUG=232944 Review URL: https://chromiumcodereview.appspot.com/16958012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212526 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test/fake_output_surface.cc')
-rw-r--r--cc/test/fake_output_surface.cc18
1 files changed, 18 insertions, 0 deletions
diff --git a/cc/test/fake_output_surface.cc b/cc/test/fake_output_surface.cc
index 6694b06..09af44c 100644
--- a/cc/test/fake_output_surface.cc
+++ b/cc/test/fake_output_surface.cc
@@ -16,6 +16,7 @@ FakeOutputSurface::FakeOutputSurface(
scoped_ptr<WebKit::WebGraphicsContext3D> context3d,
bool delegated_rendering)
: OutputSurface(context3d.Pass()),
+ client_(NULL),
num_sent_frames_(0),
needs_begin_frame_(false),
forced_draw_to_software_device_(false),
@@ -29,6 +30,7 @@ FakeOutputSurface::FakeOutputSurface(
FakeOutputSurface::FakeOutputSurface(
scoped_ptr<SoftwareOutputDevice> software_device, bool delegated_rendering)
: OutputSurface(software_device.Pass()),
+ client_(NULL),
num_sent_frames_(0),
forced_draw_to_software_device_(false),
fake_weak_ptr_factory_(this) {
@@ -43,6 +45,7 @@ FakeOutputSurface::FakeOutputSurface(
scoped_ptr<SoftwareOutputDevice> software_device,
bool delegated_rendering)
: OutputSurface(context3d.Pass(), software_device.Pass()),
+ client_(NULL),
num_sent_frames_(0),
forced_draw_to_software_device_(false),
fake_weak_ptr_factory_(this) {
@@ -91,6 +94,15 @@ bool FakeOutputSurface::ForcedDrawToSoftwareDevice() const {
return forced_draw_to_software_device_;
}
+bool FakeOutputSurface::BindToClient(OutputSurfaceClient* client) {
+ if (OutputSurface::BindToClient(client)) {
+ client_ = client;
+ return true;
+ } else {
+ return false;
+ }
+}
+
bool FakeOutputSurface::SetAndInitializeContext3D(
scoped_ptr<WebKit::WebGraphicsContext3D> context3d) {
context3d_.reset();
@@ -98,4 +110,10 @@ bool FakeOutputSurface::SetAndInitializeContext3D(
scoped_refptr<ContextProvider>());
}
+void FakeOutputSurface::SetTreeActivationCallback(
+ const base::Closure& callback) {
+ DCHECK(client_);
+ client_->SetTreeActivationCallback(callback);
+}
+
} // namespace cc