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

Unified Diff: cc/raster/tile_task_worker_pool.cc

Issue 1855273002: Update new Surface callsites (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: software_output_device was indirectly including skia::refptr, switch to sk_sp<> Created 4 years, 8 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/playback/display_item_list_unittest.cc ('k') | cc/resources/resource_provider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/raster/tile_task_worker_pool.cc
diff --git a/cc/raster/tile_task_worker_pool.cc b/cc/raster/tile_task_worker_pool.cc
index 510862af1f141d6faeafc803094b31268c14d6d1..2efd928b245913a1e35ebbf92442d66aadee2894 100644
--- a/cc/raster/tile_task_worker_pool.cc
+++ b/cc/raster/tile_task_worker_pool.cc
@@ -9,7 +9,6 @@
#include "base/trace_event/trace_event.h"
#include "cc/playback/raster_source.h"
#include "cc/raster/texture_compressor.h"
-#include "skia/ext/refptr.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkSurface.h"
@@ -92,8 +91,8 @@ void TileTaskWorkerPool::PlaybackToMemory(
switch (format) {
case RGBA_8888:
case BGRA_8888: {
- skia::RefPtr<SkSurface> surface = skia::AdoptRef(
- SkSurface::NewRasterDirect(info, memory, stride, &surface_props));
+ sk_sp<SkSurface> surface =
+ SkSurface::MakeRasterDirect(info, memory, stride, &surface_props);
raster_source->PlaybackToCanvas(surface->getCanvas(), canvas_bitmap_rect,
canvas_playback_rect, scale,
playback_settings);
@@ -101,8 +100,7 @@ void TileTaskWorkerPool::PlaybackToMemory(
}
case RGBA_4444:
case ETC1: {
- skia::RefPtr<SkSurface> surface =
- skia::AdoptRef(SkSurface::NewRaster(info, &surface_props));
+ sk_sp<SkSurface> surface = SkSurface::MakeRaster(info, &surface_props);
// TODO(reveman): Improve partial raster support by reducing the size of
// playback rect passed to PlaybackToCanvas. crbug.com/519070
raster_source->PlaybackToCanvas(surface->getCanvas(), canvas_bitmap_rect,
@@ -127,8 +125,7 @@ void TileTaskWorkerPool::PlaybackToMemory(
SkImageInfo dst_info = SkImageInfo::Make(
info.width(), info.height(), ResourceFormatToSkColorType(format),
info.alphaType(), info.profileType());
- bool rv =
- surface->getCanvas()->readPixels(dst_info, memory, stride, 0, 0);
+ bool rv = surface->readPixels(dst_info, memory, stride, 0, 0);
DCHECK(rv);
}
return;
« no previous file with comments | « cc/playback/display_item_list_unittest.cc ('k') | cc/resources/resource_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698