summaryrefslogtreecommitdiffstats
path: root/cc/test/fake_output_surface.cc
diff options
context:
space:
mode:
authordanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-16 03:41:00 +0000
committerdanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-16 03:41:00 +0000
commit05469638c90c61f273420773ab3139d4286a7fb0 (patch)
tree06c32018843396f67cc7e71ef7ffecde9faec103 /cc/test/fake_output_surface.cc
parent658ce05d1f2ec2717f3c00c9b21934373010ca35 (diff)
downloadchromium_src-05469638c90c61f273420773ab3139d4286a7fb0.zip
chromium_src-05469638c90c61f273420773ab3139d4286a7fb0.tar.gz
chromium_src-05469638c90c61f273420773ab3139d4286a7fb0.tar.bz2
cc: Implement DelegatingRender::drawFrame() method.
The method sends the render passes it is given to the parent compositor via the output surface. It should include a valid frame metadata with it. Tests: DelegatingRendererTestDraw.runSingleThread DelegatingRendererTestDraw.runMultiThread DelegatingRendererTestResources.runSingleThread DelegatingRendererTestResources.runMultiThread R=piman BUG=123444 Review URL: https://codereview.chromium.org/11777025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@177073 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test/fake_output_surface.cc')
-rw-r--r--cc/test/fake_output_surface.cc12
1 files changed, 9 insertions, 3 deletions
diff --git a/cc/test/fake_output_surface.cc b/cc/test/fake_output_surface.cc
index a312041..ebbe783 100644
--- a/cc/test/fake_output_surface.cc
+++ b/cc/test/fake_output_surface.cc
@@ -7,13 +7,15 @@
namespace cc {
FakeOutputSurface::FakeOutputSurface(
- scoped_ptr<WebKit::WebGraphicsContext3D> context3d, bool has_parent) {
+ scoped_ptr<WebKit::WebGraphicsContext3D> context3d, bool has_parent)
+ : num_sent_frames_(0) {
context3d_ = context3d.Pass();
capabilities_.has_parent_compositor = has_parent;
}
FakeOutputSurface::FakeOutputSurface(
- scoped_ptr<SoftwareOutputDevice> software_device, bool has_parent) {
+ scoped_ptr<SoftwareOutputDevice> software_device, bool has_parent)
+ : num_sent_frames_(0) {
software_device_ = software_device.Pass();
capabilities_.has_parent_compositor = has_parent;
}
@@ -43,6 +45,10 @@ SoftwareOutputDevice* FakeOutputSurface::SoftwareDevice() const {
return software_device_.get();
}
-void FakeOutputSurface::SendFrameToParentCompositor(const CompositorFrame&) {}
+void FakeOutputSurface::SendFrameToParentCompositor(
+ CompositorFrame* frame) {
+ frame->AssignTo(&last_sent_frame_);
+ ++num_sent_frames_;
+}
} // namespace cc