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

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

Issue 637913003: Revert of "Converted LayerImpl::bounds() to return SizeF." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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_impl.cc ('k') | cc/layers/ui_resource_layer_impl.cc » ('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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 TestSharedBitmapManager shared_bitmap_manager; 57 TestSharedBitmapManager shared_bitmap_manager;
58 FakeLayerTreeHostImpl host_impl( 58 FakeLayerTreeHostImpl host_impl(
59 ImplSidePaintingSettings(), &proxy, &shared_bitmap_manager); 59 ImplSidePaintingSettings(), &proxy, &shared_bitmap_manager);
60 host_impl.CreatePendingTree(); 60 host_impl.CreatePendingTree();
61 scoped_ptr<FakePictureLayerImpl> layer_impl = 61 scoped_ptr<FakePictureLayerImpl> layer_impl =
62 FakePictureLayerImpl::Create(host_impl.pending_tree(), 1); 62 FakePictureLayerImpl::Create(host_impl.pending_tree(), 1);
63 63
64 layer->PushPropertiesTo(layer_impl.get()); 64 layer->PushPropertiesTo(layer_impl.get());
65 EXPECT_FALSE(layer_impl->CanHaveTilings()); 65 EXPECT_FALSE(layer_impl->CanHaveTilings());
66 EXPECT_TRUE(layer_impl->bounds() == gfx::SizeF(0, 0)); 66 EXPECT_TRUE(layer_impl->bounds() == gfx::Size(0, 0));
67 EXPECT_EQ(gfx::Size(), layer_impl->pile()->tiling_size()); 67 EXPECT_EQ(gfx::Size(), layer_impl->pile()->tiling_size());
68 EXPECT_FALSE(layer_impl->pile()->HasRecordings()); 68 EXPECT_FALSE(layer_impl->pile()->HasRecordings());
69 } 69 }
70 } 70 }
71 71
72 TEST(PictureLayerTest, SuitableForGpuRasterization) { 72 TEST(PictureLayerTest, SuitableForGpuRasterization) {
73 MockContentLayerClient client; 73 MockContentLayerClient client;
74 scoped_refptr<PictureLayer> layer = PictureLayer::Create(&client); 74 scoped_refptr<PictureLayer> layer = PictureLayer::Create(&client);
75 PicturePile* pile = layer->GetPicturePileForTesting(); 75 PicturePile* pile = layer->GetPicturePileForTesting();
76 76
(...skipping 19 matching lines...) Expand all
96 EXPECT_EQ(Picture::RECORD_NORMALLY, layer->RecordingMode()); 96 EXPECT_EQ(Picture::RECORD_NORMALLY, layer->RecordingMode());
97 97
98 settings.recording_mode = LayerTreeSettings::RecordWithSkRecord; 98 settings.recording_mode = LayerTreeSettings::RecordWithSkRecord;
99 host = FakeLayerTreeHost::Create(&host_client, settings); 99 host = FakeLayerTreeHost::Create(&host_client, settings);
100 host->SetRootLayer(layer); 100 host->SetRootLayer(layer);
101 EXPECT_EQ(Picture::RECORD_WITH_SKRECORD, layer->RecordingMode()); 101 EXPECT_EQ(Picture::RECORD_WITH_SKRECORD, layer->RecordingMode());
102 } 102 }
103 103
104 } // namespace 104 } // namespace
105 } // namespace cc 105 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/picture_layer_impl.cc ('k') | cc/layers/ui_resource_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698