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

Side by Side Diff: cc/layers/picture_layer_unittest.cc

Issue 664583002: Remove obsolete SkRecord preview code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update r&r micro, and format Created 6 years, 2 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 unified diff | Download patch
« no previous file with comments | « cc/layers/picture_layer.cc ('k') | cc/resources/picture.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/layers/picture_layer.h" 5 #include "cc/layers/picture_layer.h"
6 6
7 #include "cc/layers/content_layer_client.h" 7 #include "cc/layers/content_layer_client.h"
8 #include "cc/layers/picture_layer_impl.h" 8 #include "cc/layers/picture_layer_impl.h"
9 #include "cc/resources/resource_update_queue.h" 9 #include "cc/resources/resource_update_queue.h"
10 #include "cc/test/fake_layer_tree_host.h" 10 #include "cc/test/fake_layer_tree_host.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 // Layer is suitable for gpu rasterization by default. 77 // Layer is suitable for gpu rasterization by default.
78 EXPECT_TRUE(pile->is_suitable_for_gpu_rasterization()); 78 EXPECT_TRUE(pile->is_suitable_for_gpu_rasterization());
79 EXPECT_TRUE(layer->IsSuitableForGpuRasterization()); 79 EXPECT_TRUE(layer->IsSuitableForGpuRasterization());
80 80
81 // Veto gpu rasterization. 81 // Veto gpu rasterization.
82 pile->SetUnsuitableForGpuRasterizationForTesting(); 82 pile->SetUnsuitableForGpuRasterizationForTesting();
83 EXPECT_FALSE(pile->is_suitable_for_gpu_rasterization()); 83 EXPECT_FALSE(pile->is_suitable_for_gpu_rasterization());
84 EXPECT_FALSE(layer->IsSuitableForGpuRasterization()); 84 EXPECT_FALSE(layer->IsSuitableForGpuRasterization());
85 } 85 }
86 86
87 TEST(PictureLayerTest, RecordingModes) {
88 MockContentLayerClient client;
89 scoped_refptr<PictureLayer> layer = PictureLayer::Create(&client);
90
91 LayerTreeSettings settings;
92 FakeLayerTreeHostClient host_client(FakeLayerTreeHostClient::DIRECT_3D);
93 scoped_ptr<FakeLayerTreeHost> host =
94 FakeLayerTreeHost::Create(&host_client, settings);
95 host->SetRootLayer(layer);
96 EXPECT_EQ(Picture::RECORD_NORMALLY, layer->RecordingMode());
97
98 settings.recording_mode = LayerTreeSettings::RecordWithSkRecord;
99 host = FakeLayerTreeHost::Create(&host_client, settings);
100 host->SetRootLayer(layer);
101 EXPECT_EQ(Picture::RECORD_WITH_SKRECORD, layer->RecordingMode());
102 }
103
104 } // namespace 87 } // namespace
105 } // namespace cc 88 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/picture_layer.cc ('k') | cc/resources/picture.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698