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

Side by Side Diff: cc/raster/tile_task_worker_pool.cc

Issue 1866203004: Convert //cc from scoped_ptr to std::unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptrcc: rebase 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 unified diff | Download patch
« no previous file with comments | « cc/raster/tile_task_runner.h ('k') | cc/raster/tile_task_worker_pool_perftest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/raster/tile_task_worker_pool.h" 5 #include "cc/raster/tile_task_worker_pool.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/trace_event/trace_event.h" 9 #include "base/trace_event/trace_event.h"
10 #include "cc/playback/raster_source.h" 10 #include "cc/playback/raster_source.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 // playback rect passed to PlaybackToCanvas. crbug.com/519070 105 // playback rect passed to PlaybackToCanvas. crbug.com/519070
106 raster_source->PlaybackToCanvas(surface->getCanvas(), canvas_bitmap_rect, 106 raster_source->PlaybackToCanvas(surface->getCanvas(), canvas_bitmap_rect,
107 canvas_bitmap_rect, scale, 107 canvas_bitmap_rect, scale,
108 playback_settings); 108 playback_settings);
109 109
110 if (format == ETC1) { 110 if (format == ETC1) {
111 TRACE_EVENT0("cc", 111 TRACE_EVENT0("cc",
112 "TileTaskWorkerPool::PlaybackToMemory::CompressETC1"); 112 "TileTaskWorkerPool::PlaybackToMemory::CompressETC1");
113 DCHECK_EQ(size.width() % 4, 0); 113 DCHECK_EQ(size.width() % 4, 0);
114 DCHECK_EQ(size.height() % 4, 0); 114 DCHECK_EQ(size.height() % 4, 0);
115 scoped_ptr<TextureCompressor> texture_compressor = 115 std::unique_ptr<TextureCompressor> texture_compressor =
116 TextureCompressor::Create(TextureCompressor::kFormatETC1); 116 TextureCompressor::Create(TextureCompressor::kFormatETC1);
117 texture_compressor->Compress(reinterpret_cast<const uint8_t*>( 117 texture_compressor->Compress(reinterpret_cast<const uint8_t*>(
118 surface->peekPixels(nullptr, nullptr)), 118 surface->peekPixels(nullptr, nullptr)),
119 reinterpret_cast<uint8_t*>(memory), 119 reinterpret_cast<uint8_t*>(memory),
120 size.width(), size.height(), 120 size.width(), size.height(),
121 TextureCompressor::kQualityHigh); 121 TextureCompressor::kQualityHigh);
122 } else { 122 } else {
123 TRACE_EVENT0("cc", 123 TRACE_EVENT0("cc",
124 "TileTaskWorkerPool::PlaybackToMemory::ConvertRGBA4444"); 124 "TileTaskWorkerPool::PlaybackToMemory::ConvertRGBA4444");
125 SkImageInfo dst_info = SkImageInfo::Make( 125 SkImageInfo dst_info = SkImageInfo::Make(
(...skipping 10 matching lines...) Expand all
136 case RED_8: 136 case RED_8:
137 case LUMINANCE_F16: 137 case LUMINANCE_F16:
138 NOTREACHED(); 138 NOTREACHED();
139 return; 139 return;
140 } 140 }
141 141
142 NOTREACHED(); 142 NOTREACHED();
143 } 143 }
144 144
145 } // namespace cc 145 } // namespace cc
OLDNEW
« no previous file with comments | « cc/raster/tile_task_runner.h ('k') | cc/raster/tile_task_worker_pool_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698