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

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

Issue 25284005: cc: Add best_record_time to rendering stats. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. 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
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" 10 #include "cc/test/fake_rendering_stats_instrumentation.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 EXPECT_LT(y, tiling_.num_tiles_y()); 59 EXPECT_LT(y, tiling_.num_tiles_y());
60 60
61 if (HasRecordingAt(x, y)) 61 if (HasRecordingAt(x, y))
62 return; 62 return;
63 gfx::Rect bounds(tiling().TileBounds(x, y)); 63 gfx::Rect bounds(tiling().TileBounds(x, y));
64 bounds.Inset(-buffer_pixels(), -buffer_pixels()); 64 bounds.Inset(-buffer_pixels(), -buffer_pixels());
65 65
66 FakeRenderingStatsInstrumentation stats_instrumentation; 66 FakeRenderingStatsInstrumentation stats_instrumentation;
67 67
68 scoped_refptr<Picture> picture(Picture::Create(bounds)); 68 scoped_refptr<Picture> picture(Picture::Create(bounds));
69 picture->Record(&client_, tile_grid_info_, &stats_instrumentation); 69 picture->Record(&client_, tile_grid_info_);
70 picture->GatherPixelRefs(tile_grid_info_, &stats_instrumentation); 70 picture->GatherPixelRefs(tile_grid_info_, &stats_instrumentation);
71 picture_list_map_[std::pair<int, int>(x, y)].push_back(picture); 71 picture_list_map_[std::pair<int, int>(x, y)].push_back(picture);
72 EXPECT_TRUE(HasRecordingAt(x, y)); 72 EXPECT_TRUE(HasRecordingAt(x, y));
73 73
74 UpdateRecordedRegion(); 74 UpdateRecordedRegion();
75 } 75 }
76 76
77 void FakePicturePileImpl::AddPictureToRecording( 77 void FakePicturePileImpl::AddPictureToRecording(
78 int x, 78 int x,
79 int y, 79 int y,
(...skipping 18 matching lines...) Expand all
98 void FakePicturePileImpl::RerecordPile() { 98 void FakePicturePileImpl::RerecordPile() {
99 for (int y = 0; y < num_tiles_y(); ++y) { 99 for (int y = 0; y < num_tiles_y(); ++y) {
100 for (int x = 0; x < num_tiles_x(); ++x) { 100 for (int x = 0; x < num_tiles_x(); ++x) {
101 RemoveRecordingAt(x, y); 101 RemoveRecordingAt(x, y);
102 AddRecordingAt(x, y); 102 AddRecordingAt(x, y);
103 } 103 }
104 } 104 }
105 } 105 }
106 106
107 } // namespace cc 107 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/skpicture_content_layer_updater.cc ('k') | tools/perf/measurements/rasterize_and_record.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698