| OLD | NEW |
| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <limits> | 10 #include <limits> |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 gfx::Rect visible_layer_rect = layer->visible_layer_rect(); | 118 gfx::Rect visible_layer_rect = layer->visible_layer_rect(); |
| 119 if (visible_layer_rect.IsEmpty()) | 119 if (visible_layer_rect.IsEmpty()) |
| 120 return; | 120 return; |
| 121 | 121 |
| 122 ContentLayerClient* painter = layer->client(); | 122 ContentLayerClient* painter = layer->client(); |
| 123 | 123 |
| 124 for (int mode_index = 0; | 124 for (int mode_index = 0; |
| 125 mode_index < DisplayListRecordingSource::RECORDING_MODE_COUNT; | 125 mode_index < DisplayListRecordingSource::RECORDING_MODE_COUNT; |
| 126 mode_index++) { | 126 mode_index++) { |
| 127 ContentLayerClient::PaintingControlSetting painting_control = | 127 ContentLayerClient::PaintingControlSetting painting_control = |
| 128 ContentLayerClient::PAINTING_BEHAVIOR_NORMAL; | 128 ContentLayerClient::PAINTING_BEHAVIOR_NORMAL_FOR_TEST; |
| 129 switch ( | 129 switch ( |
| 130 static_cast<DisplayListRecordingSource::RecordingMode>(mode_index)) { | 130 static_cast<DisplayListRecordingSource::RecordingMode>(mode_index)) { |
| 131 case DisplayListRecordingSource::RECORD_NORMALLY: | 131 case DisplayListRecordingSource::RECORD_NORMALLY: |
| 132 // Already setup for normal recording. | 132 // Already setup for normal recording. |
| 133 break; | 133 break; |
| 134 case DisplayListRecordingSource::RECORD_WITH_SK_NULL_CANVAS: | 134 case DisplayListRecordingSource::RECORD_WITH_SK_NULL_CANVAS: |
| 135 // Not supported for Display List recording. | 135 // Not supported for Display List recording. |
| 136 continue; | 136 continue; |
| 137 case DisplayListRecordingSource::RECORD_WITH_PAINTING_DISABLED: | 137 case DisplayListRecordingSource::RECORD_WITH_PAINTING_DISABLED: |
| 138 painting_control = ContentLayerClient::DISPLAY_LIST_PAINTING_DISABLED; | 138 painting_control = ContentLayerClient::DISPLAY_LIST_PAINTING_DISABLED; |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 } | 194 } |
| 195 } | 195 } |
| 196 | 196 |
| 197 RasterizeAndRecordBenchmark::RecordResults::RecordResults() | 197 RasterizeAndRecordBenchmark::RecordResults::RecordResults() |
| 198 : pixels_recorded(0), bytes_used(0) { | 198 : pixels_recorded(0), bytes_used(0) { |
| 199 } | 199 } |
| 200 | 200 |
| 201 RasterizeAndRecordBenchmark::RecordResults::~RecordResults() {} | 201 RasterizeAndRecordBenchmark::RecordResults::~RecordResults() {} |
| 202 | 202 |
| 203 } // namespace cc | 203 } // namespace cc |
| OLD | NEW |