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

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

Issue 225023031: Hack SkRecord in as an alternate recording mode in cc/resources/picture. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase? Created 6 years, 7 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 | « no previous file | cc/resources/picture.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 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/rasterize_and_record_benchmark.h" 5 #include "cc/debug/rasterize_and_record_benchmark.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <string> 9 #include <string>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/strings/stringprintf.h" 12 #include "base/strings/stringprintf.h"
13 #include "base/values.h" 13 #include "base/values.h"
14 #include "cc/debug/rasterize_and_record_benchmark_impl.h" 14 #include "cc/debug/rasterize_and_record_benchmark_impl.h"
15 #include "cc/layers/layer.h" 15 #include "cc/layers/layer.h"
16 #include "cc/layers/picture_layer.h" 16 #include "cc/layers/picture_layer.h"
17 #include "cc/trees/layer_tree_host.h" 17 #include "cc/trees/layer_tree_host.h"
18 #include "cc/trees/layer_tree_host_common.h" 18 #include "cc/trees/layer_tree_host_common.h"
19 #include "ui/gfx/rect.h" 19 #include "ui/gfx/rect.h"
20 20
21 namespace cc { 21 namespace cc {
22 22
23 namespace { 23 namespace {
24 24
25 const int kDefaultRecordRepeatCount = 100; 25 const int kDefaultRecordRepeatCount = 100;
26 26
27 const char* kModeSuffixes[Picture::RECORDING_MODE_COUNT] = { 27 const char* kModeSuffixes[Picture::RECORDING_MODE_COUNT] = {
28 "", "_sk_null_canvas", "_painting_disabled"}; 28 "", "_sk_null_canvas", "_painting_disabled", "_skrecord"};
29 29
30 base::TimeTicks Now() { 30 base::TimeTicks Now() {
31 return base::TimeTicks::IsThreadNowSupported() 31 return base::TimeTicks::IsThreadNowSupported()
32 ? base::TimeTicks::ThreadNow() 32 ? base::TimeTicks::ThreadNow()
33 : base::TimeTicks::HighResNow(); 33 : base::TimeTicks::HighResNow();
34 } 34 }
35 35
36 } // namespace 36 } // namespace
37 37
38 RasterizeAndRecordBenchmark::RasterizeAndRecordBenchmark( 38 RasterizeAndRecordBenchmark::RasterizeAndRecordBenchmark(
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 record_results_.total_best_time[mode_index] += min_time; 138 record_results_.total_best_time[mode_index] += min_time;
139 } 139 }
140 } 140 }
141 141
142 RasterizeAndRecordBenchmark::RecordResults::RecordResults() 142 RasterizeAndRecordBenchmark::RecordResults::RecordResults()
143 : pixels_recorded(0) {} 143 : pixels_recorded(0) {}
144 144
145 RasterizeAndRecordBenchmark::RecordResults::~RecordResults() {} 145 RasterizeAndRecordBenchmark::RecordResults::~RecordResults() {}
146 146
147 } // namespace cc 147 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/resources/picture.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698