From ddb87659a302889628e47e32da38f448601695d3 Mon Sep 17 00:00:00 2001 From: hendrikw Date: Tue, 6 Oct 2015 13:23:37 -0700 Subject: cc: remove recording source base class This base class is no longer needed, removing BUG=536104 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1383073002 Cr-Commit-Position: refs/heads/master@{#352676} --- cc/debug/rasterize_and_record_benchmark.cc | 28 ++++++++++++++-------------- cc/debug/rasterize_and_record_benchmark.h | 5 +++-- 2 files changed, 17 insertions(+), 16 deletions(-) (limited to 'cc/debug') diff --git a/cc/debug/rasterize_and_record_benchmark.cc b/cc/debug/rasterize_and_record_benchmark.cc index 9b958d3..9083fe9 100644 --- a/cc/debug/rasterize_and_record_benchmark.cc +++ b/cc/debug/rasterize_and_record_benchmark.cc @@ -17,6 +17,7 @@ #include "cc/layers/layer.h" #include "cc/layers/picture_layer.h" #include "cc/playback/display_item_list.h" +#include "cc/playback/display_list_recording_source.h" #include "cc/trees/layer_tree_host.h" #include "cc/trees/layer_tree_host_common.h" #include "skia/ext/analysis_canvas.h" @@ -34,11 +35,8 @@ const int kTimeLimitMillis = 1; const int kWarmupRuns = 0; const int kTimeCheckInterval = 1; -const char* kModeSuffixes[RecordingSource::RECORDING_MODE_COUNT] = { - "", - "_sk_null_canvas", - "_painting_disabled", - "_caching_disabled", +const char* kModeSuffixes[DisplayListRecordingSource::RECORDING_MODE_COUNT] = { + "", "_sk_null_canvas", "_painting_disabled", "_caching_disabled", "_construction_disabled"}; } // namespace @@ -77,7 +75,7 @@ void RasterizeAndRecordBenchmark::DidUpdateLayers(LayerTreeHost* host) { results_->SetInteger("picture_memory_usage", static_cast(record_results_.bytes_used)); - for (int i = 0; i < RecordingSource::RECORDING_MODE_COUNT; i++) { + for (int i = 0; i < DisplayListRecordingSource::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()); @@ -121,24 +119,26 @@ void RasterizeAndRecordBenchmark::RunOnDisplayListLayer( const gfx::Rect& visible_layer_rect) { ContentLayerClient* painter = layer->client(); - for (int mode_index = 0; mode_index < RecordingSource::RECORDING_MODE_COUNT; + for (int mode_index = 0; + mode_index < DisplayListRecordingSource::RECORDING_MODE_COUNT; mode_index++) { ContentLayerClient::PaintingControlSetting painting_control = ContentLayerClient::PAINTING_BEHAVIOR_NORMAL; - switch (static_cast(mode_index)) { - case RecordingSource::RECORD_NORMALLY: + switch ( + static_cast(mode_index)) { + case DisplayListRecordingSource::RECORD_NORMALLY: // Already setup for normal recording. break; - case RecordingSource::RECORD_WITH_SK_NULL_CANVAS: + case DisplayListRecordingSource::RECORD_WITH_SK_NULL_CANVAS: // Not supported for Display List recording. continue; - case RecordingSource::RECORD_WITH_PAINTING_DISABLED: + case DisplayListRecordingSource::RECORD_WITH_PAINTING_DISABLED: painting_control = ContentLayerClient::DISPLAY_LIST_PAINTING_DISABLED; break; - case RecordingSource::RECORD_WITH_CACHING_DISABLED: + case DisplayListRecordingSource::RECORD_WITH_CACHING_DISABLED: painting_control = ContentLayerClient::DISPLAY_LIST_CACHING_DISABLED; break; - case RecordingSource::RECORD_WITH_CONSTRUCTION_DISABLED: + case DisplayListRecordingSource::RECORD_WITH_CONSTRUCTION_DISABLED: painting_control = ContentLayerClient::DISPLAY_LIST_CONSTRUCTION_DISABLED; break; @@ -180,7 +180,7 @@ void RasterizeAndRecordBenchmark::RunOnDisplayListLayer( min_time = duration; } - if (mode_index == RecordingSource::RECORD_NORMALLY) { + if (mode_index == DisplayListRecordingSource::RECORD_NORMALLY) { record_results_.bytes_used += memory_used + painter->GetApproximateUnsharedMemoryUsage(); record_results_.pixels_recorded += diff --git a/cc/debug/rasterize_and_record_benchmark.h b/cc/debug/rasterize_and_record_benchmark.h index 97cecb1..1e69851 100644 --- a/cc/debug/rasterize_and_record_benchmark.h +++ b/cc/debug/rasterize_and_record_benchmark.h @@ -13,7 +13,7 @@ #include "base/single_thread_task_runner.h" #include "base/time/time.h" #include "cc/debug/micro_benchmark_controller.h" -#include "cc/playback/recording_source.h" +#include "cc/playback/display_list_recording_source.h" #include "ui/gfx/geometry/rect.h" namespace base { @@ -50,7 +50,8 @@ class RasterizeAndRecordBenchmark : public MicroBenchmark { int pixels_recorded; size_t bytes_used; - base::TimeDelta total_best_time[RecordingSource::RECORDING_MODE_COUNT]; + base::TimeDelta + total_best_time[DisplayListRecordingSource::RECORDING_MODE_COUNT]; }; RecordResults record_results_; -- cgit v1.1