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

Unified Diff: cc/layers/picture_layer_unittest.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/layers/picture_layer_impl_unittest.cc ('k') | cc/layers/render_surface_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/picture_layer_unittest.cc
diff --git a/cc/layers/picture_layer_unittest.cc b/cc/layers/picture_layer_unittest.cc
index 0b14eb46167115c2604c8f34b8ae312d8e13d031..d20f6a1c21fdc06bcc3bd3319082871671155aee 100644
--- a/cc/layers/picture_layer_unittest.cc
+++ b/cc/layers/picture_layer_unittest.cc
@@ -129,7 +129,7 @@ class TestSerializationPictureLayer : public PictureLayer {
namespace {
TEST(PictureLayerTest, TestSetAllPropsSerializationDeserialization) {
- FakeLayerTreeHostClient host_client(FakeLayerTreeHostClient::DIRECT_3D);
+ FakeLayerTreeHostClient host_client;
TestTaskGraphRunner task_graph_runner;
LayerTreeSettings settings;
std::unique_ptr<FakeImageSerializationProcessor>
@@ -163,7 +163,7 @@ TEST(PictureLayerTest, TestSetAllPropsSerializationDeserialization) {
}
TEST(PictureLayerTest, TestSerializationDeserialization) {
- FakeLayerTreeHostClient host_client(FakeLayerTreeHostClient::DIRECT_3D);
+ FakeLayerTreeHostClient host_client;
TestTaskGraphRunner task_graph_runner;
std::unique_ptr<FakeImageSerializationProcessor>
fake_image_serialization_processor =
@@ -194,7 +194,7 @@ TEST(PictureLayerTest, TestEmptySerializationDeserialization) {
std::unique_ptr<FakeImageSerializationProcessor>
fake_image_serialization_processor =
base::WrapUnique(new FakeImageSerializationProcessor);
- FakeLayerTreeHostClient host_client(FakeLayerTreeHostClient::DIRECT_3D);
+ FakeLayerTreeHostClient host_client;
TestTaskGraphRunner task_graph_runner;
std::unique_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create(
&host_client, &task_graph_runner, LayerTreeSettings(),
@@ -215,7 +215,7 @@ TEST(PictureLayerTest, NoTilesIfEmptyBounds) {
scoped_refptr<PictureLayer> layer = PictureLayer::Create(client);
layer->SetBounds(gfx::Size(10, 10));
- FakeLayerTreeHostClient host_client(FakeLayerTreeHostClient::DIRECT_3D);
+ FakeLayerTreeHostClient host_client;
TestTaskGraphRunner task_graph_runner;
std::unique_ptr<FakeLayerTreeHost> host =
FakeLayerTreeHost::Create(&host_client, &task_graph_runner);
@@ -261,7 +261,7 @@ TEST(PictureLayerTest, InvalidateRasterAfterUpdate) {
scoped_refptr<PictureLayer> layer = PictureLayer::Create(&client);
layer->SetBounds(gfx::Size(50, 50));
- FakeLayerTreeHostClient host_client(FakeLayerTreeHostClient::DIRECT_3D);
+ FakeLayerTreeHostClient host_client;
TestTaskGraphRunner task_graph_runner;
std::unique_ptr<FakeLayerTreeHost> host =
FakeLayerTreeHost::Create(&host_client, &task_graph_runner);
@@ -278,7 +278,8 @@ TEST(PictureLayerTest, InvalidateRasterAfterUpdate) {
host->CommitComplete();
FakeImplTaskRunnerProvider impl_task_runner_provider;
TestSharedBitmapManager shared_bitmap_manager;
- std::unique_ptr<OutputSurface> output_surface(FakeOutputSurface::Create3d());
+ std::unique_ptr<OutputSurface> output_surface(
+ FakeOutputSurface::CreateDelegating3d());
LayerTreeSettings layer_tree_settings = LayerTreeSettings();
layer_tree_settings.image_decode_tasks_enabled = true;
FakeLayerTreeHostImpl host_impl(layer_tree_settings,
@@ -305,7 +306,7 @@ TEST(PictureLayerTest, InvalidateRasterWithoutUpdate) {
scoped_refptr<PictureLayer> layer = PictureLayer::Create(&client);
layer->SetBounds(gfx::Size(50, 50));
- FakeLayerTreeHostClient host_client(FakeLayerTreeHostClient::DIRECT_3D);
+ FakeLayerTreeHostClient host_client;
TestTaskGraphRunner task_graph_runner;
std::unique_ptr<FakeLayerTreeHost> host =
FakeLayerTreeHost::Create(&host_client, &task_graph_runner);
@@ -321,7 +322,8 @@ TEST(PictureLayerTest, InvalidateRasterWithoutUpdate) {
host->CommitComplete();
FakeImplTaskRunnerProvider impl_task_runner_provider;
TestSharedBitmapManager shared_bitmap_manager;
- std::unique_ptr<OutputSurface> output_surface(FakeOutputSurface::Create3d());
+ std::unique_ptr<OutputSurface> output_surface(
+ FakeOutputSurface::CreateDelegating3d());
LayerTreeSettings layer_tree_settings = LayerTreeSettings();
layer_tree_settings.image_decode_tasks_enabled = true;
FakeLayerTreeHostImpl host_impl(layer_tree_settings,
@@ -349,7 +351,7 @@ TEST(PictureLayerTest, ClearVisibleRectWhenNoTiling) {
scoped_refptr<PictureLayer> layer = PictureLayer::Create(&client);
layer->SetBounds(gfx::Size(10, 10));
- FakeLayerTreeHostClient host_client(FakeLayerTreeHostClient::DIRECT_3D);
+ FakeLayerTreeHostClient host_client;
TestTaskGraphRunner task_graph_runner;
std::unique_ptr<FakeLayerTreeHost> host =
FakeLayerTreeHost::Create(&host_client, &task_graph_runner);
@@ -368,7 +370,8 @@ TEST(PictureLayerTest, ClearVisibleRectWhenNoTiling) {
FakeImplTaskRunnerProvider impl_task_runner_provider;
TestSharedBitmapManager shared_bitmap_manager;
- std::unique_ptr<OutputSurface> output_surface(FakeOutputSurface::Create3d());
+ std::unique_ptr<OutputSurface> output_surface(
+ FakeOutputSurface::CreateDelegating3d());
LayerTreeSettings layer_tree_settings = LayerTreeSettingsForTesting();
layer_tree_settings.image_decode_tasks_enabled = true;
FakeLayerTreeHostImpl host_impl(layer_tree_settings,
@@ -430,7 +433,7 @@ TEST(PictureLayerTest, SuitableForGpuRasterization) {
FakePictureLayer::CreateWithRecordingSource(
client, std::move(recording_source_owned));
- FakeLayerTreeHostClient host_client(FakeLayerTreeHostClient::DIRECT_3D);
+ FakeLayerTreeHostClient host_client;
TestTaskGraphRunner task_graph_runner;
std::unique_ptr<FakeLayerTreeHost> host =
FakeLayerTreeHost::Create(&host_client, &task_graph_runner);
@@ -464,8 +467,8 @@ TEST(PictureLayerTest, NonMonotonicSourceFrameNumber) {
settings.verify_clip_tree_calculations = true;
settings.verify_transform_tree_calculations = true;
- FakeLayerTreeHostClient host_client1(FakeLayerTreeHostClient::DIRECT_3D);
- FakeLayerTreeHostClient host_client2(FakeLayerTreeHostClient::DIRECT_3D);
+ FakeLayerTreeHostClient host_client1;
+ FakeLayerTreeHostClient host_client2;
TestSharedBitmapManager shared_bitmap_manager;
TestTaskGraphRunner task_graph_runner;
« no previous file with comments | « cc/layers/picture_layer_impl_unittest.cc ('k') | cc/layers/render_surface_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698