summaryrefslogtreecommitdiffstats
path: root/cc/test/fake_output_surface.h
diff options
context:
space:
mode:
authorboliu@chromium.org <boliu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-30 18:47:07 +0000
committerboliu@chromium.org <boliu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-30 18:47:07 +0000
commit6133cc23dc8e0ec802aa427c55b7b5eebf687205 (patch)
tree86e68cb48654ef240e16c90cb7a5a571c87bad47 /cc/test/fake_output_surface.h
parenta925782fb5e9134c3d7db45aa767da37e0221da0 (diff)
downloadchromium_src-6133cc23dc8e0ec802aa427c55b7b5eebf687205.zip
chromium_src-6133cc23dc8e0ec802aa427c55b7b5eebf687205.tar.gz
chromium_src-6133cc23dc8e0ec802aa427c55b7b5eebf687205.tar.bz2
cc: draw_and_swap_full_viewport_every_frame OS cap
This OutputSurface Capability is used if the compositor need to guarantee that each BeginFrame leads to a draw and swap, even if the resulting frame may not be ideal. Conditions that used to avoid drawing include: Invalid viewport Recently purged textures Impl animation The case of having no active root layer is not covered yet. BUG=261809, 250909 R=danakj@chromium.org, enne@chromium.org, jamesr@chromium.org, joth@chromium.org Review URL: https://codereview.chromium.org/19779003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@214403 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test/fake_output_surface.h')
-rw-r--r--cc/test/fake_output_surface.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/cc/test/fake_output_surface.h b/cc/test/fake_output_surface.h
index 18759ec..dfd4db5 100644
--- a/cc/test/fake_output_surface.h
+++ b/cc/test/fake_output_surface.h
@@ -56,6 +56,7 @@ class FakeOutputSurface : public OutputSurface {
new FakeOutputSurface(software_device.Pass(), true));
}
+ // TODO(boliu): Use a general factory that takes Capabilities arg.
static scoped_ptr<FakeOutputSurface> CreateDeferredGL(
scoped_ptr<SoftwareOutputDevice> software_device) {
scoped_ptr<FakeOutputSurface> result(
@@ -64,6 +65,12 @@ class FakeOutputSurface : public OutputSurface {
return result.Pass();
}
+ static scoped_ptr<FakeOutputSurface> CreateAlwaysDrawAndSwap3d() {
+ scoped_ptr<FakeOutputSurface> result(Create3d());
+ result->capabilities_.draw_and_swap_full_viewport_every_frame = true;
+ return result.Pass();
+ }
+
CompositorFrame& last_sent_frame() { return last_sent_frame_; }
size_t num_sent_frames() { return num_sent_frames_; }