Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4277)

Unified Diff: cc/resources/tile_manager.cc

Issue 659563002: cc: Replace RasterBuffer::Acquire/ReleaseCanvas with Playback function. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add temporary size variable Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/resources/raster_worker_pool_unittest.cc ('k') | cc/resources/zero_copy_raster_worker_pool.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/tile_manager.cc
diff --git a/cc/resources/tile_manager.cc b/cc/resources/tile_manager.cc
index d7a61c7478949e0b28ab91459ccd79b3ef1dabc3..84a925f3c2bfdf575140d28a05fb09794547b508 100644
--- a/cc/resources/tile_manager.cc
+++ b/cc/resources/tile_manager.cc
@@ -20,8 +20,6 @@
#include "cc/resources/raster_buffer.h"
#include "cc/resources/rasterizer.h"
#include "cc/resources/tile.h"
-#include "third_party/skia/include/core/SkBitmap.h"
-#include "third_party/skia/include/core/SkPixelRef.h"
#include "ui/gfx/rect_conversions.h"
namespace cc {
@@ -114,9 +112,6 @@ class RasterTaskImpl : public RasterTask {
devtools_instrumentation::ScopedLayerTask layer_task(
devtools_instrumentation::kRasterTask, layer_id_);
- skia::RefPtr<SkCanvas> canvas = raster_buffer_->AcquireSkCanvas();
- DCHECK(canvas);
-
base::TimeDelta prev_rasterize_time =
rendering_stats_->impl_thread_rendering_stats().rasterize_time;
@@ -127,8 +122,9 @@ class RasterTaskImpl : public RasterTask {
RenderingStatsInstrumentation* stats =
tile_resolution_ == HIGH_RESOLUTION ? rendering_stats_ : NULL;
DCHECK(picture_pile);
- picture_pile->RasterToBitmap(
- canvas.get(), content_rect_, contents_scale_, stats);
+
+ raster_buffer_->Playback(
+ picture_pile_.get(), content_rect_, contents_scale_, stats);
if (rendering_stats_->record_rendering_stats()) {
base::TimeDelta current_rasterize_time =
@@ -140,8 +136,6 @@ class RasterTaskImpl : public RasterTask {
100000,
100);
}
-
- raster_buffer_->ReleaseSkCanvas(canvas);
}
PicturePileImpl::Analysis analysis_;
« no previous file with comments | « cc/resources/raster_worker_pool_unittest.cc ('k') | cc/resources/zero_copy_raster_worker_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698