summaryrefslogtreecommitdiffstats
path: root/cc/test/fake_output_surface.h
diff options
context:
space:
mode:
authorpiman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-08 16:02:38 +0000
committerpiman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-08 16:02:38 +0000
commit2ae13edf5976610500da81d2b29ba5315dba5ff1 (patch)
treeb38b82917a0f116cec9670709681f39bda40903f /cc/test/fake_output_surface.h
parent9dffa619d6e1dd3647e811eb984bb89ee2ef8754 (diff)
downloadchromium_src-2ae13edf5976610500da81d2b29ba5315dba5ff1.zip
chromium_src-2ae13edf5976610500da81d2b29ba5315dba5ff1.tar.gz
chromium_src-2ae13edf5976610500da81d2b29ba5315dba5ff1.tar.bz2
DelegatingRenderer: send frame on SwapBuffers instead of DrawFrame
CompositeAndReadback, though not implemented, should stay consistent. If we send the frame on DrawFrame, we will get an Ack from the browser, even though the frame rate controller doesn't expect one in that case. If that happens, num_frames_pending_ becomes negative and the frame rate throttling doesn't work any more, causing bad frames. Instead, be consistent with GLRenderer and send the frame on SwapBuffers. BUG=123444 TEST=LayerTreeHostTestNumFramesPending Review URL: https://chromiumcodereview.appspot.com/14941005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@198913 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test/fake_output_surface.h')
-rw-r--r--cc/test/fake_output_surface.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/cc/test/fake_output_surface.h b/cc/test/fake_output_surface.h
index 8af8709..f7ca21d 100644
--- a/cc/test/fake_output_surface.h
+++ b/cc/test/fake_output_surface.h
@@ -5,6 +5,7 @@
#ifndef CC_TEST_FAKE_OUTPUT_SURFACE_H_
#define CC_TEST_FAKE_OUTPUT_SURFACE_H_
+#include "base/memory/weak_ptr.h"
#include "base/time.h"
#include "cc/output/compositor_frame.h"
#include "cc/output/output_surface.h"
@@ -76,9 +77,12 @@ class FakeOutputSurface : public OutputSurface {
scoped_ptr<SoftwareOutputDevice> software_device,
bool has_parent);
+ void SendFrameAck();
+
CompositorFrame last_sent_frame_;
size_t num_sent_frames_;
bool vsync_notification_enabled_;
+ base::WeakPtrFactory<FakeOutputSurface> weak_ptr_factory_;
};
static inline scoped_ptr<cc::OutputSurface> CreateFakeOutputSurface() {