| Index: cc/debug/rasterize_and_record_benchmark.cc
|
| diff --git a/cc/debug/rasterize_and_record_benchmark.cc b/cc/debug/rasterize_and_record_benchmark.cc
|
| index 5babc0edca6a11a1450da3e780d0721ec0a06e88..e3d870330364166fd396d90cfa77af67aef9a8ec 100644
|
| --- a/cc/debug/rasterize_and_record_benchmark.cc
|
| +++ b/cc/debug/rasterize_and_record_benchmark.cc
|
| @@ -17,9 +17,7 @@
|
| #include "cc/debug/rasterize_and_record_benchmark_impl.h"
|
| #include "cc/layers/content_layer_client.h"
|
| #include "cc/layers/layer.h"
|
| -#include "cc/layers/picture_layer.h"
|
| #include "cc/playback/display_item_list.h"
|
| -#include "cc/playback/recording_source.h"
|
| #include "cc/trees/layer_tree_host.h"
|
| #include "cc/trees/layer_tree_host_common.h"
|
| #include "skia/ext/analysis_canvas.h"
|
| @@ -37,7 +35,7 @@ const int kTimeLimitMillis = 1;
|
| const int kWarmupRuns = 0;
|
| const int kTimeCheckInterval = 1;
|
|
|
| -const char* kModeSuffixes[RecordingSource::RECORDING_MODE_COUNT] = {
|
| +const char* kModeSuffixes[PictureLayer::RECORDING_MODE_COUNT] = {
|
| "",
|
| "_sk_null_canvas",
|
| "_painting_disabled",
|
| @@ -80,7 +78,7 @@ void RasterizeAndRecordBenchmark::DidUpdateLayers(LayerTreeHost* host) {
|
| results_->SetInteger("picture_memory_usage",
|
| static_cast<int>(record_results_.bytes_used));
|
|
|
| - for (int i = 0; i < RecordingSource::RECORDING_MODE_COUNT; i++) {
|
| + for (int i = 0; i < PictureLayer::RECORDING_MODE_COUNT; i++) {
|
| std::string name = base::StringPrintf("record_time%s_ms", kModeSuffixes[i]);
|
| results_->SetDouble(name,
|
| record_results_.total_best_time[i].InMillisecondsF());
|
| @@ -118,28 +116,28 @@ void RasterizeAndRecordBenchmark::RunOnLayer(PictureLayer* layer) {
|
|
|
| ContentLayerClient* painter = layer->client();
|
|
|
| - for (int mode_index = 0; mode_index < RecordingSource::RECORDING_MODE_COUNT;
|
| + for (int mode_index = 0; mode_index < PictureLayer::RECORDING_MODE_COUNT;
|
| mode_index++) {
|
| ContentLayerClient::PaintingControlSetting painting_control =
|
| ContentLayerClient::PAINTING_BEHAVIOR_NORMAL_FOR_TEST;
|
| - switch (static_cast<RecordingSource::RecordingMode>(mode_index)) {
|
| - case RecordingSource::RECORD_NORMALLY:
|
| + switch (static_cast<PictureLayer::RecordingMode>(mode_index)) {
|
| + case PictureLayer::RECORD_NORMALLY:
|
| // Already setup for normal recording.
|
| break;
|
| - case RecordingSource::RECORD_WITH_SK_NULL_CANVAS:
|
| + case PictureLayer::RECORD_WITH_SK_NULL_CANVAS:
|
| // Not supported for Display List recording.
|
| continue;
|
| - case RecordingSource::RECORD_WITH_PAINTING_DISABLED:
|
| + case PictureLayer::RECORD_WITH_PAINTING_DISABLED:
|
| painting_control = ContentLayerClient::DISPLAY_LIST_PAINTING_DISABLED;
|
| break;
|
| - case RecordingSource::RECORD_WITH_CACHING_DISABLED:
|
| + case PictureLayer::RECORD_WITH_CACHING_DISABLED:
|
| painting_control = ContentLayerClient::DISPLAY_LIST_CACHING_DISABLED;
|
| break;
|
| - case RecordingSource::RECORD_WITH_CONSTRUCTION_DISABLED:
|
| + case PictureLayer::RECORD_WITH_CONSTRUCTION_DISABLED:
|
| painting_control =
|
| ContentLayerClient::DISPLAY_LIST_CONSTRUCTION_DISABLED;
|
| break;
|
| - case RecordingSource::RECORD_WITH_SUBSEQUENCE_CACHING_DISABLED:
|
| + case PictureLayer::RECORD_WITH_SUBSEQUENCE_CACHING_DISABLED:
|
| painting_control = ContentLayerClient::SUBSEQUENCE_CACHING_DISABLED;
|
| break;
|
| default:
|
| @@ -179,7 +177,7 @@ void RasterizeAndRecordBenchmark::RunOnLayer(PictureLayer* layer) {
|
| min_time = duration;
|
| }
|
|
|
| - if (mode_index == RecordingSource::RECORD_NORMALLY) {
|
| + if (mode_index == PictureLayer::RECORD_NORMALLY) {
|
| record_results_.bytes_used +=
|
| memory_used + painter->GetApproximateUnsharedMemoryUsage();
|
| record_results_.pixels_recorded += painter->PaintableRegion().width() *
|
|
|