Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3007)

Unified Diff: cc/test/fake_layer_tree_host_client.cc

Issue 2171143002: cc: Get rid of non-delegated rendering in most cc unit tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@killdirecttests
Patch Set: fakeoutputsurface: no-constructor Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/test/fake_layer_tree_host_client.h ('k') | cc/test/fake_output_surface.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 6de02bf6175e5c439f39c75a29359423e6a40d2b..7fd613875f13bc66170cef3c0976cba4bd422c19 100644
--- a/cc/test/fake_layer_tree_host_client.cc
+++ b/cc/test/fake_layer_tree_host_client.cc
@@ -12,33 +12,12 @@
namespace cc {
-FakeLayerTreeHostClient::FakeLayerTreeHostClient(RendererOptions options)
- : use_software_rendering_(options == DIRECT_SOFTWARE ||
- options == DELEGATED_SOFTWARE),
- use_delegating_renderer_(options == DELEGATED_3D ||
- options == DELEGATED_SOFTWARE),
- host_(NULL) {
-}
-
-FakeLayerTreeHostClient::~FakeLayerTreeHostClient() {}
+FakeLayerTreeHostClient::FakeLayerTreeHostClient() = default;
+FakeLayerTreeHostClient::~FakeLayerTreeHostClient() = default;
void FakeLayerTreeHostClient::RequestNewOutputSurface() {
DCHECK(host_);
- std::unique_ptr<OutputSurface> surface;
- if (use_software_rendering_) {
- if (use_delegating_renderer_) {
- surface = FakeOutputSurface::CreateDelegatingSoftware(
- base::WrapUnique(new SoftwareOutputDevice));
- } else {
- surface = FakeOutputSurface::CreateSoftware(
- base::WrapUnique(new SoftwareOutputDevice));
- }
- } else if (use_delegating_renderer_) {
- surface = FakeOutputSurface::CreateDelegating3d();
- } else {
- surface = FakeOutputSurface::Create3d();
- }
- host_->SetOutputSurface(std::move(surface));
+ host_->SetOutputSurface(FakeOutputSurface::CreateDelegating3d());
}
void FakeLayerTreeHostClient::DidFailToInitializeOutputSurface() {
« no previous file with comments | « cc/test/fake_layer_tree_host_client.h ('k') | cc/test/fake_output_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698