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

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

Issue 12426024: cc: Switch RenderingStats collection in Layer::Update() to RenderingStatsInstrumentation (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase to 190965 Created 7 years, 8 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/scrollbar_layer.cc ('k') | cc/layers/texture_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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/scrollbar_layer.h" 5 #include "cc/layers/scrollbar_layer.h"
6 6
7 #include "cc/animation/scrollbar_animation_controller.h" 7 #include "cc/animation/scrollbar_animation_controller.h"
8 #include "cc/layers/append_quads_data.h" 8 #include "cc/layers/append_quads_data.h"
9 #include "cc/layers/scrollbar_layer_impl.h" 9 #include "cc/layers/scrollbar_layer_impl.h"
10 #include "cc/quads/solid_color_draw_quad.h" 10 #include "cc/quads/solid_color_draw_quad.h"
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 385
386 testing::Mock::VerifyAndClearExpectations(layer_tree_host_.get()); 386 testing::Mock::VerifyAndClearExpectations(layer_tree_host_.get());
387 EXPECT_EQ(scrollbar_layer->layer_tree_host(), layer_tree_host_.get()); 387 EXPECT_EQ(scrollbar_layer->layer_tree_host(), layer_tree_host_.get());
388 388
389 PriorityCalculator calculator; 389 PriorityCalculator calculator;
390 ResourceUpdateQueue queue; 390 ResourceUpdateQueue queue;
391 OcclusionTracker occlusion_tracker(gfx::Rect(), false); 391 OcclusionTracker occlusion_tracker(gfx::Rect(), false);
392 392
393 scrollbar_layer->SetTexturePriorities(calculator); 393 scrollbar_layer->SetTexturePriorities(calculator);
394 layer_tree_host_->contents_texture_manager()->PrioritizeTextures(); 394 layer_tree_host_->contents_texture_manager()->PrioritizeTextures();
395 scrollbar_layer->Update(&queue, &occlusion_tracker, NULL); 395 scrollbar_layer->Update(&queue, &occlusion_tracker);
396 EXPECT_EQ(0, queue.FullUploadSize()); 396 EXPECT_EQ(0, queue.FullUploadSize());
397 EXPECT_EQ(expected_resources, queue.PartialUploadSize()); 397 EXPECT_EQ(expected_resources, queue.PartialUploadSize());
398 398
399 testing::Mock::VerifyAndClearExpectations(layer_tree_host_.get()); 399 testing::Mock::VerifyAndClearExpectations(layer_tree_host_.get());
400 } 400 }
401 401
402 protected: 402 protected:
403 FakeLayerTreeHostClient fake_client_; 403 FakeLayerTreeHostClient fake_client_;
404 LayerTreeSettings layer_tree_settings_; 404 LayerTreeSettings layer_tree_settings_;
405 scoped_ptr<MockLayerTreeHost> layer_tree_host_; 405 scoped_ptr<MockLayerTreeHost> layer_tree_host_;
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 EXPECT_EQ(10.f, pinch_zoom_horizontal->CurrentPos()); 476 EXPECT_EQ(10.f, pinch_zoom_horizontal->CurrentPos());
477 EXPECT_EQ(100, pinch_zoom_horizontal->TotalSize()); 477 EXPECT_EQ(100, pinch_zoom_horizontal->TotalSize());
478 EXPECT_EQ(30, pinch_zoom_horizontal->Maximum()); 478 EXPECT_EQ(30, pinch_zoom_horizontal->Maximum());
479 EXPECT_EQ(20.f, pinch_zoom_vertical->CurrentPos()); 479 EXPECT_EQ(20.f, pinch_zoom_vertical->CurrentPos());
480 EXPECT_EQ(200, pinch_zoom_vertical->TotalSize()); 480 EXPECT_EQ(200, pinch_zoom_vertical->TotalSize());
481 EXPECT_EQ(50, pinch_zoom_vertical->Maximum()); 481 EXPECT_EQ(50, pinch_zoom_vertical->Maximum());
482 } 482 }
483 483
484 } // namespace 484 } // namespace
485 } // namespace cc 485 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/scrollbar_layer.cc ('k') | cc/layers/texture_layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698