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

Side by Side Diff: cc/test/fake_picture_pile_impl.cc

Issue 26031002: cc: Remove unused metrics from RenderingStats. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed raster_worker_pool_perftest.cc Created 7 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/resources/tile_manager.cc ('k') | cc/trees/layer_tree_host.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/test/fake_picture_pile_impl.h" 5 #include "cc/test/fake_picture_pile_impl.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <utility> 8 #include <utility>
9 9
10 #include "cc/test/fake_rendering_stats_instrumentation.h"
11 #include "cc/test/impl_side_painting_settings.h" 10 #include "cc/test/impl_side_painting_settings.h"
12 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
13 12
14 namespace cc { 13 namespace cc {
15 14
16 FakePicturePileImpl::FakePicturePileImpl() {} 15 FakePicturePileImpl::FakePicturePileImpl() {}
17 16
18 FakePicturePileImpl::~FakePicturePileImpl() {} 17 FakePicturePileImpl::~FakePicturePileImpl() {}
19 18
20 scoped_refptr<FakePicturePileImpl> FakePicturePileImpl::CreateFilledPile( 19 scoped_refptr<FakePicturePileImpl> FakePicturePileImpl::CreateFilledPile(
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 EXPECT_GE(x, 0); 55 EXPECT_GE(x, 0);
57 EXPECT_GE(y, 0); 56 EXPECT_GE(y, 0);
58 EXPECT_LT(x, tiling_.num_tiles_x()); 57 EXPECT_LT(x, tiling_.num_tiles_x());
59 EXPECT_LT(y, tiling_.num_tiles_y()); 58 EXPECT_LT(y, tiling_.num_tiles_y());
60 59
61 if (HasRecordingAt(x, y)) 60 if (HasRecordingAt(x, y))
62 return; 61 return;
63 gfx::Rect bounds(tiling().TileBounds(x, y)); 62 gfx::Rect bounds(tiling().TileBounds(x, y));
64 bounds.Inset(-buffer_pixels(), -buffer_pixels()); 63 bounds.Inset(-buffer_pixels(), -buffer_pixels());
65 64
66 FakeRenderingStatsInstrumentation stats_instrumentation;
67
68 scoped_refptr<Picture> picture(Picture::Create(bounds)); 65 scoped_refptr<Picture> picture(Picture::Create(bounds));
69 picture->Record(&client_, tile_grid_info_); 66 picture->Record(&client_, tile_grid_info_);
70 picture->GatherPixelRefs(tile_grid_info_, &stats_instrumentation); 67 picture->GatherPixelRefs(tile_grid_info_);
71 picture_list_map_[std::pair<int, int>(x, y)].push_back(picture); 68 picture_list_map_[std::pair<int, int>(x, y)].push_back(picture);
72 EXPECT_TRUE(HasRecordingAt(x, y)); 69 EXPECT_TRUE(HasRecordingAt(x, y));
73 70
74 UpdateRecordedRegion(); 71 UpdateRecordedRegion();
75 } 72 }
76 73
77 void FakePicturePileImpl::AddPictureToRecording( 74 void FakePicturePileImpl::AddPictureToRecording(
78 int x, 75 int x,
79 int y, 76 int y,
80 scoped_refptr<Picture> picture) { 77 scoped_refptr<Picture> picture) {
(...skipping 17 matching lines...) Expand all
98 void FakePicturePileImpl::RerecordPile() { 95 void FakePicturePileImpl::RerecordPile() {
99 for (int y = 0; y < num_tiles_y(); ++y) { 96 for (int y = 0; y < num_tiles_y(); ++y) {
100 for (int x = 0; x < num_tiles_x(); ++x) { 97 for (int x = 0; x < num_tiles_x(); ++x) {
101 RemoveRecordingAt(x, y); 98 RemoveRecordingAt(x, y);
102 AddRecordingAt(x, y); 99 AddRecordingAt(x, y);
103 } 100 }
104 } 101 }
105 } 102 }
106 103
107 } // namespace cc 104 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/tile_manager.cc ('k') | cc/trees/layer_tree_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698