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

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

Issue 706203003: Update from https://crrev.com/303153 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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_unittest.cc ('k') | cc/layers/surface_layer.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 25 matching lines...) Expand all
36 FakeLayerTreeHostClient host_client(FakeLayerTreeHostClient::DIRECT_3D); 36 FakeLayerTreeHostClient host_client(FakeLayerTreeHostClient::DIRECT_3D);
37 scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create(&host_client); 37 scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create(&host_client);
38 host->SetRootLayer(layer); 38 host->SetRootLayer(layer);
39 layer->SetIsDrawable(true); 39 layer->SetIsDrawable(true);
40 layer->SavePaintProperties(); 40 layer->SavePaintProperties();
41 41
42 OcclusionTracker<Layer> occlusion(gfx::Rect(0, 0, 1000, 1000)); 42 OcclusionTracker<Layer> occlusion(gfx::Rect(0, 0, 1000, 1000));
43 scoped_ptr<ResourceUpdateQueue> queue(new ResourceUpdateQueue); 43 scoped_ptr<ResourceUpdateQueue> queue(new ResourceUpdateQueue);
44 layer->Update(queue.get(), &occlusion); 44 layer->Update(queue.get(), &occlusion);
45 45
46 EXPECT_EQ(0, host->source_frame_number());
47 host->CommitComplete();
48 EXPECT_EQ(1, host->source_frame_number());
49
46 layer->SetBounds(gfx::Size(0, 0)); 50 layer->SetBounds(gfx::Size(0, 0));
47 layer->SavePaintProperties(); 51 layer->SavePaintProperties();
48 // Intentionally skipping Update since it would normally be skipped on 52 // Intentionally skipping Update since it would normally be skipped on
49 // a layer with empty bounds. 53 // a layer with empty bounds.
50 54
51 FakeProxy proxy; 55 FakeProxy proxy;
52 { 56 {
53 DebugScopedSetImplThread impl_thread(&proxy); 57 DebugScopedSetImplThread impl_thread(&proxy);
54 58
55 TestSharedBitmapManager shared_bitmap_manager; 59 TestSharedBitmapManager shared_bitmap_manager;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 99
96 // Tile-grid is set according to its setting. 100 // Tile-grid is set according to its setting.
97 SkTileGridFactory::TileGridInfo info = 101 SkTileGridFactory::TileGridInfo info =
98 layer->GetPicturePileForTesting()->GetTileGridInfoForTesting(); 102 layer->GetPicturePileForTesting()->GetTileGridInfoForTesting();
99 EXPECT_EQ(info.fTileInterval.width(), 123 - 2 * info.fMargin.width()); 103 EXPECT_EQ(info.fTileInterval.width(), 123 - 2 * info.fMargin.width());
100 EXPECT_EQ(info.fTileInterval.height(), 123 - 2 * info.fMargin.height()); 104 EXPECT_EQ(info.fTileInterval.height(), 123 - 2 * info.fMargin.height());
101 } 105 }
102 106
103 } // namespace 107 } // namespace
104 } // namespace cc 108 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/picture_layer_impl_unittest.cc ('k') | cc/layers/surface_layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698