diff options
author | enne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-08 21:31:22 +0000 |
---|---|---|
committer | enne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-08 21:31:22 +0000 |
commit | 49304bde71a1acd64cb21cfde6314abb9c1710e1 (patch) | |
tree | 48add9e688cea95faee62d524227c950da1e0fb4 /cc/test/fake_content_layer.cc | |
parent | b7c0fb6db7ae85f1c9ce1190edf5176b2eaa371b (diff) | |
download | chromium_src-49304bde71a1acd64cb21cfde6314abb9c1710e1.zip chromium_src-49304bde71a1acd64cb21cfde6314abb9c1710e1.tar.gz chromium_src-49304bde71a1acd64cb21cfde6314abb9c1710e1.tar.bz2 |
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
Diffstat (limited to 'cc/test/fake_content_layer.cc')
-rw-r--r-- | cc/test/fake_content_layer.cc | 5 |
1 files changed, 3 insertions, 2 deletions
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<LayerImpl> FakeContentLayer::CreateLayerImpl( return FakeContentLayerImpl::Create(tree_impl, layer_id_).PassAs<LayerImpl>(); } -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) { |