Skip to content

Commit

Permalink
Fix background show logic for UI compositor
Browse files Browse the repository at this point in the history
The logic that determined whether or not to show the background
of the root layer is no longer applicable due to the toolbar layer
always being a parent to the content. This change updates the
background visibility logic in for StaticTabSceneLayer to look at
the root layer.

BUG=615365

Review-Url: https://codereview.chromium.org/2040513002
Cr-Commit-Position: refs/heads/master@{#399311}
(cherry picked from commit ab5f51e)

Review URL: https://codereview.chromium.org/2060653002 .

Cr-Commit-Position: refs/branch-heads/2743@{crosswalk-project#325}
Cr-Branched-From: 2b3ae3b-refs/heads/master@{#394939}
  • Loading branch information
iotitan committed Jun 11, 2016
1 parent 3bab3bd commit a94f6a6
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ StaticTabSceneLayer::~StaticTabSceneLayer() {
}

bool StaticTabSceneLayer::ShouldShowBackground() {
scoped_refptr<cc::Layer> parent = layer_->parent();
return parent.get() && parent->bounds() != layer_->bounds();
scoped_refptr<cc::Layer> root = layer_->RootLayer();
return root && root->bounds() != layer_->bounds();
}

SkColor StaticTabSceneLayer::GetBackgroundColor() {
Expand Down

0 comments on commit a94f6a6

Please sign in to comment.