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/resources/raster_worker_pool.h" | 5 #include "cc/resources/raster_worker_pool.h" |
6 | 6 |
7 #include "base/json/json_writer.h" | 7 #include "base/json/json_writer.h" |
8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "cc/debug/benchmark_instrumentation.h" | 10 #include "cc/debug/benchmark_instrumentation.h" |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 skia::RefPtr<SkDrawFilter> draw_filter; | 115 skia::RefPtr<SkDrawFilter> draw_filter; |
116 switch (raster_mode_) { | 116 switch (raster_mode_) { |
117 case LOW_QUALITY_RASTER_MODE: | 117 case LOW_QUALITY_RASTER_MODE: |
118 draw_filter = skia::AdoptRef(new skia::PaintSimplifier); | 118 draw_filter = skia::AdoptRef(new skia::PaintSimplifier); |
119 break; | 119 break; |
120 case HIGH_QUALITY_NO_LCD_RASTER_MODE: | 120 case HIGH_QUALITY_NO_LCD_RASTER_MODE: |
121 draw_filter = skia::AdoptRef(new DisableLCDTextFilter); | 121 draw_filter = skia::AdoptRef(new DisableLCDTextFilter); |
122 break; | 122 break; |
123 case HIGH_QUALITY_RASTER_MODE: | 123 case HIGH_QUALITY_RASTER_MODE: |
124 break; | 124 break; |
125 case NUM_RASTER_MODES: | |
126 default: | |
127 NOTREACHED(); | |
128 } | 125 } |
129 | 126 |
130 canvas.setDrawFilter(draw_filter.get()); | 127 canvas.setDrawFilter(draw_filter.get()); |
131 | 128 |
132 if (rendering_stats_->record_rendering_stats()) { | 129 if (rendering_stats_->record_rendering_stats()) { |
133 PicturePileImpl::RasterStats raster_stats; | 130 PicturePileImpl::RasterStats raster_stats; |
134 picture_clone->RasterToBitmap( | 131 picture_clone->RasterToBitmap( |
135 &canvas, content_rect_, contents_scale_, &raster_stats); | 132 &canvas, content_rect_, contents_scale_, &raster_stats); |
136 rendering_stats_->AddRaster( | 133 rendering_stats_->AddRaster( |
137 raster_stats.total_rasterize_time, | 134 raster_stats.total_rasterize_time, |
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
534 | 531 |
535 internal::GraphNode* decode_node = CreateGraphNodeForTask( | 532 internal::GraphNode* decode_node = CreateGraphNodeForTask( |
536 decode_task, priority, graph); | 533 decode_task, priority, graph); |
537 decode_node->add_dependent(raster_node); | 534 decode_node->add_dependent(raster_node); |
538 } | 535 } |
539 | 536 |
540 return raster_node; | 537 return raster_node; |
541 } | 538 } |
542 | 539 |
543 } // namespace cc | 540 } // namespace cc |
OLD | NEW |