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

Side by Side Diff: cc/debug/picture_record_benchmark.cc

Issue 362073002: cc: Remove all traces of SkPicture cloning. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | cc/debug/rasterize_and_record_benchmark.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/debug/picture_record_benchmark.h" 5 #include "cc/debug/picture_record_benchmark.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 104
105 int y_limit = std::max(1, content_bounds.height() - height); 105 int y_limit = std::max(1, content_bounds.height() - height);
106 int x_limit = std::max(1, content_bounds.width() - width); 106 int x_limit = std::max(1, content_bounds.width() - width);
107 for (int y = 0; y < y_limit; y += kPositionIncrement) { 107 for (int y = 0; y < y_limit; y += kPositionIncrement) {
108 for (int x = 0; x < x_limit; x += kPositionIncrement) { 108 for (int x = 0; x < x_limit; x += kPositionIncrement) {
109 gfx::Rect rect = gfx::Rect(x, y, width, height); 109 gfx::Rect rect = gfx::Rect(x, y, width, height);
110 110
111 base::TimeTicks start = base::TimeTicks::HighResNow(); 111 base::TimeTicks start = base::TimeTicks::HighResNow();
112 112
113 scoped_refptr<Picture> picture = Picture::Create( 113 scoped_refptr<Picture> picture = Picture::Create(
114 rect, painter, tile_grid_info, false, 0, Picture::RECORD_NORMALLY); 114 rect, painter, tile_grid_info, false, Picture::RECORD_NORMALLY);
115 115
116 base::TimeTicks end = base::TimeTicks::HighResNow(); 116 base::TimeTicks end = base::TimeTicks::HighResNow();
117 base::TimeDelta duration = end - start; 117 base::TimeDelta duration = end - start;
118 TotalTime& total_time = times_[dimensions]; 118 TotalTime& total_time = times_[dimensions];
119 total_time.first += duration; 119 total_time.first += duration;
120 total_time.second++; 120 total_time.second++;
121 } 121 }
122 } 122 }
123 } 123 }
124 } 124 }
125 125
126 } // namespace cc 126 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/debug/rasterize_and_record_benchmark.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698