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

Unified Diff: cc/tiles/gpu_image_decode_cache.cc

Issue 2939413002: Reland: Decode/Upload GPU images to tile color type (support 4444) (Closed)
Patch Set: Created 3 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/tiles/gpu_image_decode_cache.cc
diff --git a/cc/tiles/gpu_image_decode_cache.cc b/cc/tiles/gpu_image_decode_cache.cc
index a194751219e178254beae8ea24132f487ea9b835..d11384f3dd79c5323a710244e8c92e0b2ad3bac3 100644
--- a/cc/tiles/gpu_image_decode_cache.cc
+++ b/cc/tiles/gpu_image_decode_cache.cc
@@ -1123,7 +1123,8 @@ void GpuImageDecodeCache::DecodeImageIfNecessary(const DrawImage& draw_image,
// DCHECKs here to enforce this.
if (!draw_image.image()->getDeferredTextureImageData(
*context_threadsafe_proxy_.get(), &image_data->upload_params, 1,
- backing_memory->data(), nullptr)) {
+ backing_memory->data(), nullptr,
+ ResourceFormatToClosestSkColorType(format_))) {
DLOG(ERROR) << "getDeferredTextureImageData failed despite params "
<< "having validated.";
backing_memory->Unlock();
@@ -1223,7 +1224,8 @@ GpuImageDecodeCache::CreateImageData(const DrawImage& draw_image) {
draw_image.matrix(), CalculateUploadScaleFilterQuality(draw_image),
upload_scale_mip_level);
size_t data_size = draw_image.image()->getDeferredTextureImageData(
- *context_threadsafe_proxy_.get(), &params, 1, nullptr, nullptr);
+ *context_threadsafe_proxy_.get(), &params, 1, nullptr, nullptr,
+ ResourceFormatToClosestSkColorType(format_));
if (data_size == 0) {
// Can't upload image, too large or other failure. Try to use SW fallback.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698