Chromium Code Reviews

Unified Diff: cc/test/fake_layer_tree_host_client.cc

Issue 606113003: Revert of Make cc output surface creation async (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « cc/test/fake_layer_tree_host_client.h ('k') | cc/test/fake_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/fake_layer_tree_host_client.cc
diff --git a/cc/test/fake_layer_tree_host_client.cc b/cc/test/fake_layer_tree_host_client.cc
index 087cbb150e239f5f4b00a66e692eb33295edc843..975f6878cc5dff1ffa499b4271aec19359222f78 100644
--- a/cc/test/fake_layer_tree_host_client.cc
+++ b/cc/test/fake_layer_tree_host_client.cc
@@ -7,7 +7,6 @@
#include "cc/output/context_provider.h"
#include "cc/test/fake_output_surface.h"
#include "cc/test/test_web_graphics_context_3d.h"
-#include "cc/trees/layer_tree_host.h"
namespace cc {
@@ -15,31 +14,25 @@
: use_software_rendering_(options == DIRECT_SOFTWARE ||
options == DELEGATED_SOFTWARE),
use_delegating_renderer_(options == DELEGATED_3D ||
- options == DELEGATED_SOFTWARE),
- host_(NULL) {
-}
+ options == DELEGATED_SOFTWARE) {}
FakeLayerTreeHostClient::~FakeLayerTreeHostClient() {}
-void FakeLayerTreeHostClient::RequestNewOutputSurface(bool fallback) {
- DCHECK(host_);
- scoped_ptr<OutputSurface> surface;
+scoped_ptr<OutputSurface> FakeLayerTreeHostClient::CreateOutputSurface(
+ bool fallback) {
if (use_software_rendering_) {
if (use_delegating_renderer_) {
- surface = FakeOutputSurface::CreateDelegatingSoftware(
- make_scoped_ptr(new SoftwareOutputDevice))
- .PassAs<OutputSurface>();
- } else {
- surface = FakeOutputSurface::CreateSoftware(
- make_scoped_ptr(new SoftwareOutputDevice))
- .PassAs<OutputSurface>();
+ return FakeOutputSurface::CreateDelegatingSoftware(
+ make_scoped_ptr(new SoftwareOutputDevice)).PassAs<OutputSurface>();
}
- } else if (use_delegating_renderer_) {
- surface = FakeOutputSurface::CreateDelegating3d().PassAs<OutputSurface>();
- } else {
- surface = FakeOutputSurface::Create3d().PassAs<OutputSurface>();
+
+ return FakeOutputSurface::CreateSoftware(
+ make_scoped_ptr(new SoftwareOutputDevice)).PassAs<OutputSurface>();
}
- host_->SetOutputSurface(surface.Pass());
+
+ if (use_delegating_renderer_)
+ return FakeOutputSurface::CreateDelegating3d().PassAs<OutputSurface>();
+ return FakeOutputSurface::Create3d().PassAs<OutputSurface>();
}
} // namespace cc
« no previous file with comments | « cc/test/fake_layer_tree_host_client.h ('k') | cc/test/fake_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine