From 49304bde71a1acd64cb21cfde6314abb9c1710e1 Mon Sep 17 00:00:00 2001 From: "enne@chromium.org" Date: Mon, 8 Jul 2013 21:31:22 +0000 Subject: cc: Make Layer::Update return a bool As part of an optimization to prevent needless commits, add a return value from Update to say whether or not any resources were updated as a part of the call. Other layer property updates (bounds changes, etc) that happen during Update are covered through the normal SetNeedsCommit mechanism. This will allow a future patch to make SetNeedsDisplay/SetScrollOffsetFromImplThread only cause an update but not necessarily cause a commit. R=danakj@chromium.org BUG=256381 Review URL: https://chromiumcodereview.appspot.com/18454003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210424 0039d316-1c4b-4281-b951-d872f2087c98 --- cc/test/fake_content_layer.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'cc/test/fake_content_layer.cc') diff --git a/cc/test/fake_content_layer.cc b/cc/test/fake_content_layer.cc index a30ea95..5d452ea 100644 --- a/cc/test/fake_content_layer.cc +++ b/cc/test/fake_content_layer.cc @@ -24,10 +24,11 @@ scoped_ptr FakeContentLayer::CreateLayerImpl( return FakeContentLayerImpl::Create(tree_impl, layer_id_).PassAs(); } -void FakeContentLayer::Update(ResourceUpdateQueue* queue, +bool FakeContentLayer::Update(ResourceUpdateQueue* queue, const OcclusionTracker* occlusion) { - ContentLayer::Update(queue, occlusion); + bool updated = ContentLayer::Update(queue, occlusion); update_count_++; + return updated; } bool FakeContentLayer::HaveBackingAt(int i, int j) { -- cgit v1.1