Chromium Code Reviews| 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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 184 canvas->save(); | 184 canvas->save(); |
| 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 void GpuRasterizer::ClearCache() { | |
| 195 GrContext* gr_context = GetContextProvider(false)->GrContext(); | |
|
vmiura
2015/03/19 21:20:35
For threaded GPU raster we need to take a lock on
sohanjg
2015/03/23 10:34:38
Done.
| |
| 196 DCHECK(gr_context); | |
| 197 gr_context->setResourceCacheLimits(0, 0); | |
| 198 } | |
| 199 | |
| 194 } // namespace cc | 200 } // namespace cc |
| OLD | NEW |