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

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

Issue 1832573004: Gpu Image Decode Controller (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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.cc ('k') | cc/resources/resource_format.h » ('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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 std::unique_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 =
126 info.width(), info.height(), ResourceFormatToSkColorType(format), 126 SkImageInfo::Make(info.width(), info.height(),
127 info.alphaType(), info.profileType()); 127 ResourceFormatToClosestSkColorType(format),
128 info.alphaType(), info.profileType());
128 bool rv = surface->readPixels(dst_info, memory, stride, 0, 0); 129 bool rv = surface->readPixels(dst_info, memory, stride, 0, 0);
129 DCHECK(rv); 130 DCHECK(rv);
130 } 131 }
131 return; 132 return;
132 } 133 }
133 case ALPHA_8: 134 case ALPHA_8:
134 case LUMINANCE_8: 135 case LUMINANCE_8:
135 case RGB_565: 136 case RGB_565:
136 case RED_8: 137 case RED_8:
137 case LUMINANCE_F16: 138 case LUMINANCE_F16:
138 NOTREACHED(); 139 NOTREACHED();
139 return; 140 return;
140 } 141 }
141 142
142 NOTREACHED(); 143 NOTREACHED();
143 } 144 }
144 145
145 } // namespace cc 146 } // namespace cc
OLDNEW
« no previous file with comments | « cc/raster/tile_task_runner.cc ('k') | cc/resources/resource_format.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698