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

Unified Diff: cc/layers/layer.cc

Issue 2652343003: Replace source pointer in cc::CopyOutputRequest with a base::UnguessableToken (Closed)
Patch Set: c Created 3 years, 11 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/layers/layer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer.cc
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
index f8f5a194ff40c490fdee39df7c6e5d45ba2af4a9..e8524bb8f85a8c6edd49d79063b7241bafb1978f 100644
--- a/cc/layers/layer.cc
+++ b/cc/layers/layer.cc
@@ -352,11 +352,12 @@ bool Layer::HasAncestor(const Layer* ancestor) const {
void Layer::RequestCopyOfOutput(std::unique_ptr<CopyOutputRequest> request) {
DCHECK(IsPropertyChangeAllowed());
- if (void* source = request->source()) {
+ if (request->has_source()) {
+ const base::UnguessableToken& source = request->source();
auto it =
std::find_if(inputs_.copy_requests.begin(), inputs_.copy_requests.end(),
- [source](const std::unique_ptr<CopyOutputRequest>& x) {
- return x->source() == source;
+ [&source](const std::unique_ptr<CopyOutputRequest>& x) {
+ return x->has_source() && x->source() == source;
});
if (it != inputs_.copy_requests.end())
inputs_.copy_requests.erase(it);
« no previous file with comments | « no previous file | cc/layers/layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698