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

Unified Diff: cc/tiles/gpu_image_decode_controller.cc

Issue 1910663002: Fix ImageUploadTaskImpl with null dependencies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@skskp
Patch Set: feedback 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 | cc/tiles/gpu_image_decode_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/tiles/gpu_image_decode_controller.cc
diff --git a/cc/tiles/gpu_image_decode_controller.cc b/cc/tiles/gpu_image_decode_controller.cc
index 04a25a33fe87c1acaf02dadc9db3672dcd1456bf..2205a2752e0d27243b7f201cd629d1a6575f648c 100644
--- a/cc/tiles/gpu_image_decode_controller.cc
+++ b/cc/tiles/gpu_image_decode_controller.cc
@@ -110,7 +110,10 @@ class ImageUploadTaskImpl : public TileTask {
image_ref_(draw_image.image()),
source_prepare_tiles_id_(source_prepare_tiles_id) {
DCHECK(!SkipImage(draw_image));
- dependencies_.push_back(std::move(decode_dependency));
+ // If an image is already decoded and locked, we will not generate a
+ // decode task.
+ if (decode_dependency)
prashant.n 2016/04/21 21:57:51 Add DCHECK(decode_dependency) here.
ericrk 2016/04/21 23:06:39 We can have legitimate cases where an upload task
+ dependencies_.push_back(std::move(decode_dependency));
}
// Override from Task:
« no previous file with comments | « no previous file | cc/tiles/gpu_image_decode_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698