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

Side by Side Diff: cc/tiles/checker_image_tracker.cc

Issue 2926513003: Use PaintImage in cc QueueImageDecode
Patch Set: rebase 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 unified diff | Download patch
« no previous file with comments | « no previous file | cc/tiles/checker_image_tracker_unittest.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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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/tiles/checker_image_tracker.h" 5 #include "cc/tiles/checker_image_tracker.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/trace_event/trace_event.h" 10 #include "base/trace_event/trace_event.h"
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 DCHECK(image_decode_queue_.empty()); 202 DCHECK(image_decode_queue_.empty());
203 return; 203 return;
204 } 204 }
205 205
206 PaintImage::Id image_id = outstanding_image_decode_.value().stable_id(); 206 PaintImage::Id image_id = outstanding_image_decode_.value().stable_id();
207 DCHECK_EQ(image_id_to_decode_.count(image_id), 0u); 207 DCHECK_EQ(image_id_to_decode_.count(image_id), 0u);
208 TRACE_EVENT_ASYNC_BEGIN0("cc", "CheckerImageTracker::DeferImageDecode", 208 TRACE_EVENT_ASYNC_BEGIN0("cc", "CheckerImageTracker::DeferImageDecode",
209 image_id); 209 image_id);
210 ImageController::ImageDecodeRequestId request_id = 210 ImageController::ImageDecodeRequestId request_id =
211 image_controller_->QueueImageDecode( 211 image_controller_->QueueImageDecode(
212 outstanding_image_decode_.value().sk_image(), 212 outstanding_image_decode_.value(),
213 base::Bind(&CheckerImageTracker::DidFinishImageDecode, 213 base::Bind(&CheckerImageTracker::DidFinishImageDecode,
214 weak_factory_.GetWeakPtr(), image_id)); 214 weak_factory_.GetWeakPtr(), image_id));
215 215
216 image_id_to_decode_.emplace(image_id, base::MakeUnique<ScopedDecodeHolder>( 216 image_id_to_decode_.emplace(image_id, base::MakeUnique<ScopedDecodeHolder>(
217 image_controller_, request_id)); 217 image_controller_, request_id));
218 } 218 }
219 219
220 } // namespace cc 220 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/tiles/checker_image_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698