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

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

Issue 1186393004: gpu: Remove async texture uploads. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 3 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/cc.gyp ('k') | cc/layers/scrollbar_layer_unittest.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 "base/thread_task_runner_handle.h" 7 #include "base/thread_task_runner_handle.h"
8 #include "cc/layers/content_layer_client.h" 8 #include "cc/layers/content_layer_client.h"
9 #include "cc/layers/picture_layer_impl.h" 9 #include "cc/layers/picture_layer_impl.h"
10 #include "cc/test/fake_layer_tree_host.h" 10 #include "cc/test/fake_layer_tree_host.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 } 119 }
120 120
121 // PicturePile uses the source frame number as a unit for measuring invalidation 121 // PicturePile uses the source frame number as a unit for measuring invalidation
122 // frequency. When a pile moves between compositors, the frame number increases 122 // frequency. When a pile moves between compositors, the frame number increases
123 // non-monotonically. This executes that code path under this scenario allowing 123 // non-monotonically. This executes that code path under this scenario allowing
124 // for the code to verify correctness with DCHECKs. 124 // for the code to verify correctness with DCHECKs.
125 TEST(PictureLayerTest, NonMonotonicSourceFrameNumber) { 125 TEST(PictureLayerTest, NonMonotonicSourceFrameNumber) {
126 LayerTreeSettings settings; 126 LayerTreeSettings settings;
127 settings.single_thread_proxy_scheduler = false; 127 settings.single_thread_proxy_scheduler = false;
128 settings.use_zero_copy = true; 128 settings.use_zero_copy = true;
129 settings.use_one_copy = false;
130 129
131 FakeLayerTreeHostClient host_client1(FakeLayerTreeHostClient::DIRECT_3D); 130 FakeLayerTreeHostClient host_client1(FakeLayerTreeHostClient::DIRECT_3D);
132 FakeLayerTreeHostClient host_client2(FakeLayerTreeHostClient::DIRECT_3D); 131 FakeLayerTreeHostClient host_client2(FakeLayerTreeHostClient::DIRECT_3D);
133 TestSharedBitmapManager shared_bitmap_manager; 132 TestSharedBitmapManager shared_bitmap_manager;
134 TestTaskGraphRunner task_graph_runner; 133 TestTaskGraphRunner task_graph_runner;
135 134
136 MockContentLayerClient client; 135 MockContentLayerClient client;
137 scoped_refptr<FakePictureLayer> layer = 136 scoped_refptr<FakePictureLayer> layer =
138 FakePictureLayer::Create(LayerSettings(), &client); 137 FakePictureLayer::Create(LayerSettings(), &client);
139 138
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 // Do a main frame, record the picture layers. The frame number has changed 173 // Do a main frame, record the picture layers. The frame number has changed
175 // non-monotonically. 174 // non-monotonically.
176 layer->SetNeedsDisplay(); 175 layer->SetNeedsDisplay();
177 host2->Composite(base::TimeTicks::Now()); 176 host2->Composite(base::TimeTicks::Now());
178 EXPECT_EQ(3, layer->update_count()); 177 EXPECT_EQ(3, layer->update_count());
179 EXPECT_EQ(1, host2->source_frame_number()); 178 EXPECT_EQ(1, host2->source_frame_number());
180 } 179 }
181 180
182 } // namespace 181 } // namespace
183 } // namespace cc 182 } // namespace cc
OLDNEW
« no previous file with comments | « cc/cc.gyp ('k') | cc/layers/scrollbar_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698