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

Unified Diff: cc/surfaces/surface_aggregator.cc

Issue 669813003: Update from chromium https://crrev.com/301725/ (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 2 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 | « cc/surfaces/display.cc ('k') | cc/test/data/blue_yellow_flipped.png » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/surface_aggregator.cc
diff --git a/cc/surfaces/surface_aggregator.cc b/cc/surfaces/surface_aggregator.cc
index e3574e552e55154d35be3db1eb365101b5b8c080..ae0fce01a6fd7470afb973b9210ffdb41727ccbf 100644
--- a/cc/surfaces/surface_aggregator.cc
+++ b/cc/surfaces/surface_aggregator.cc
@@ -91,8 +91,8 @@ int SurfaceAggregator::ChildIdForSurface(Surface* surface) {
SurfaceToResourceChildIdMap::iterator it =
surface_id_to_resource_child_id_.find(surface->surface_id());
if (it == surface_id_to_resource_child_id_.end()) {
- int child_id = provider_->CreateChild(
- base::Bind(&UnrefHelper, surface->factory()->AsWeakPtr()));
+ int child_id =
+ provider_->CreateChild(base::Bind(&UnrefHelper, surface->factory()));
surface_id_to_resource_child_id_[surface->surface_id()] = child_id;
return child_id;
} else {
@@ -127,7 +127,8 @@ bool SurfaceAggregator::TakeResources(Surface* surface,
int child_id = ChildIdForSurface(surface);
provider_->ReceiveFromChild(child_id, frame_data->resource_list);
- surface->factory()->RefResources(frame_data->resource_list);
+ if (surface->factory())
+ surface->factory()->RefResources(frame_data->resource_list);
typedef ResourceProvider::ResourceIdArray IdArray;
IdArray referenced_resources;
« no previous file with comments | « cc/surfaces/display.cc ('k') | cc/test/data/blue_yellow_flipped.png » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698