OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/gpu_rasterizer.h" | 5 #include "cc/resources/gpu_rasterizer.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 | 116 |
117 // Playback picture into resource. | 117 // Playback picture into resource. |
118 { | 118 { |
119 ScopedGpuRaster gpu_raster(GetContextProvider(use_worker_context)); | 119 ScopedGpuRaster gpu_raster(GetContextProvider(use_worker_context)); |
120 write_lock->InitSkSurface(use_worker_context, use_distance_field_text, | 120 write_lock->InitSkSurface(use_worker_context, use_distance_field_text, |
121 raster_source->CanUseLCDText(), | 121 raster_source->CanUseLCDText(), |
122 msaa_sample_count_); | 122 msaa_sample_count_); |
123 SkMultiPictureDraw multi_picture_draw; | 123 SkMultiPictureDraw multi_picture_draw; |
124 multi_picture_draw.add(write_lock->sk_surface()->getCanvas(), | 124 multi_picture_draw.add(write_lock->sk_surface()->getCanvas(), |
125 picture.get()); | 125 picture.get()); |
126 multi_picture_draw.draw(msaa_sample_count_ > 0); | 126 multi_picture_draw.draw(false); |
127 write_lock->ReleaseSkSurface(); | 127 write_lock->ReleaseSkSurface(); |
128 } | 128 } |
129 } | 129 } |
130 | 130 |
131 void GpuRasterizer::PerformSolidColorAnalysis( | 131 void GpuRasterizer::PerformSolidColorAnalysis( |
132 const Tile* tile, | 132 const Tile* tile, |
133 RasterSource::SolidColorAnalysis* analysis) { | 133 RasterSource::SolidColorAnalysis* analysis) { |
134 const void* tile_id = static_cast<const void*>(tile); | 134 const void* tile_id = static_cast<const void*>(tile); |
135 frame_viewer_instrumentation::ScopedAnalyzeTask analyze_task( | 135 frame_viewer_instrumentation::ScopedAnalyzeTask analyze_task( |
136 tile_id, tile->combined_priority().resolution, | 136 tile_id, tile->combined_priority().resolution, |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 tile->raster_source()->PlaybackToCanvas(canvas.get(), tile->content_rect(), | 185 tile->raster_source()->PlaybackToCanvas(canvas.get(), tile->content_rect(), |
186 tile->contents_scale()); | 186 tile->contents_scale()); |
187 canvas->restore(); | 187 canvas->restore(); |
188 | 188 |
189 // Add the canvas and recorded picture to |multi_picture_draw_|. | 189 // Add the canvas and recorded picture to |multi_picture_draw_|. |
190 skia::RefPtr<SkPicture> picture = skia::AdoptRef(recorder.endRecording()); | 190 skia::RefPtr<SkPicture> picture = skia::AdoptRef(recorder.endRecording()); |
191 multi_picture_draw_.add(sk_surface->getCanvas(), picture.get()); | 191 multi_picture_draw_.add(sk_surface->getCanvas(), picture.get()); |
192 } | 192 } |
193 | 193 |
194 } // namespace cc | 194 } // namespace cc |
OLD | NEW |