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

Unified Diff: blimp/engine/renderer/engine_image_serialization_processor.cc

Issue 1889763002: blimp: Reduce WebP encoding time on the engine. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated comment 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/engine/renderer/engine_image_serialization_processor.cc
diff --git a/blimp/engine/renderer/engine_image_serialization_processor.cc b/blimp/engine/renderer/engine_image_serialization_processor.cc
index 8d1f2bb5f05310f481cd3fab66ac312ee8da584a..870939ea2971f65174d56cccec4e6353ea2ecab8 100644
--- a/blimp/engine/renderer/engine_image_serialization_processor.cc
+++ b/blimp/engine/renderer/engine_image_serialization_processor.cc
@@ -67,7 +67,12 @@ class WebPImageEncoder : public SkPixelSerializer {
// the same as the default configuration for WebP, but since any change in
// the WebP defaults would invalidate all caches they are hard coded.
config.quality = 75.0; // between 0 (smallest file) and 100 (biggest).
- config.method = 4; // quality/speed trade-off (0=fast, 6=slower-better).
+
+ // TODO(nyquist): Move image encoding to a different thread when
+ // asynchronous loading of images is possible. The encode work currently
+ // blocks the render thread so we are dropping the method down to 0.
+ // crbug.com/603643.
+ config.method = 0; // quality/speed trade-off (0=fast, 6=slower-better).
// Encode the picture using the given configuration.
bool success = WebPEncode(&config, &picture);
« 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