Add signalSyncPoint to the WebGraphicsContext3D command buffer impls.
[chromium-blink-merge.git] / cc / test / fake_output_surface.cc
blob2fe4b5a6eab857937fc9dcbae777ff6f18321b5e
1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "cc/test/fake_output_surface.h"
7 #include "cc/output/output_surface_client.h"
9 namespace cc {
11 FakeOutputSurface::FakeOutputSurface(
12 scoped_ptr<WebKit::WebGraphicsContext3D> context3d, bool has_parent)
13 : OutputSurface(context3d.Pass()),
14 num_sent_frames_(0),
15 vsync_notification_enabled_(false) {
16 capabilities_.has_parent_compositor = has_parent;
19 FakeOutputSurface::FakeOutputSurface(
20 scoped_ptr<SoftwareOutputDevice> software_device, bool has_parent)
21 : OutputSurface(software_device.Pass()),
22 num_sent_frames_(0) {
23 capabilities_.has_parent_compositor = has_parent;
26 FakeOutputSurface::~FakeOutputSurface() {}
28 void FakeOutputSurface::SendFrameToParentCompositor(
29 CompositorFrame* frame) {
30 frame->AssignTo(&last_sent_frame_);
31 ++num_sent_frames_;
34 void FakeOutputSurface::EnableVSyncNotification(bool enable) {
35 vsync_notification_enabled_ = enable;
38 void FakeOutputSurface::DidVSync(base::TimeTicks frame_time) {
39 client_->DidVSync(frame_time);
42 } // namespace cc