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

Issue 12093067: Handle ui::Layer's visibility using cc::Layer's m_isDrawable flag (Closed)

Created:
7 years, 10 months ago by ajuma
Modified:
7 years, 10 months ago
Reviewers:
piman
CC:
chromium-reviews, Ian Vollick, piman+watch_chromium.org, cc-bugs_chromium.org, jonathan.backer, piman, danakj
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Handle ui::Layer's visibility using cc::Layer's m_isDrawable flag Currently, ui::Layers make themselves invisible by setting the opacity of their corresponding cc::Layer to 0. This is problematic when we want to animate opacity on the compositor thread but we want to still allow visibility to concurrently be animated on the main thread. This CL makes ui::Layers handle visibility changes by recursively setting/ unsetting the m_isDrawable flag of all cc::Layers in the subtree rooted at the layer whose visibility changed. BUG=164206 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=180310

Patch Set 1 #

Total comments: 1

Patch Set 2 : Use the existing m_isDrawable flag #

Total comments: 4

Patch Set 3 : Address review comments #

Total comments: 4

Patch Set 4 : Fix nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+40 lines, -19 lines) Patch
M ui/compositor/layer.h View 1 2 3 2 chunks +5 lines, -0 lines 0 comments Download
M ui/compositor/layer.cc View 1 2 3 7 chunks +23 lines, -13 lines 0 comments Download
M ui/compositor/layer_unittest.cc View 1 2 chunks +12 lines, -6 lines 0 comments Download

Messages

Total messages: 21 (0 generated)
ajuma
7 years, 10 months ago (2013-01-30 19:04:05 UTC) #1
piman
I like the approach much better. https://chromiumcodereview.appspot.com/12093067/diff/1/cc/layer.h File cc/layer.h (right): https://chromiumcodereview.appspot.com/12093067/diff/1/cc/layer.h#newcode202 cc/layer.h:202: void setVisible(bool); Nit: ...
7 years, 10 months ago (2013-01-30 21:38:50 UTC) #2
enne (OOO)
I like the other approach way better and really would rather not add yet another ...
7 years, 10 months ago (2013-01-30 21:47:56 UTC) #3
piman
On Wed, Jan 30, 2013 at 1:47 PM, <enne@chromium.org> wrote: > I like the other ...
7 years, 10 months ago (2013-01-30 22:04:31 UTC) #4
enne (OOO)
Ok, so it's a performance optimization. Are you planning to potentially animate this property on ...
7 years, 10 months ago (2013-01-30 22:12:50 UTC) #5
piman
On Wed, Jan 30, 2013 at 2:12 PM, <enne@chromium.org> wrote: > Ok, so it's a ...
7 years, 10 months ago (2013-01-30 22:24:37 UTC) #6
enne (OOO)
Thanks for the extra explanation. I wasn't aware that the use case was "generally use ...
7 years, 10 months ago (2013-01-30 22:56:22 UTC) #7
piman
On Wed, Jan 30, 2013 at 2:56 PM, <enne@chromium.org> wrote: > Thanks for the extra ...
7 years, 10 months ago (2013-01-30 23:02:00 UTC) #8
ajuma
On 2013/01/30 22:56:22, enne wrote: > Alternatively, can you use the existing m_isDrawable flag and ...
7 years, 10 months ago (2013-01-31 16:25:18 UTC) #9
piman
The approach looks good. A couple of things. https://chromiumcodereview.appspot.com/12093067/diff/11001/ui/compositor/layer.cc File ui/compositor/layer.cc (right): https://chromiumcodereview.appspot.com/12093067/diff/11001/ui/compositor/layer.cc#newcode137 ui/compositor/layer.cc:137: child->OnParentIsDrawnChanged(IsDrawn(), ...
7 years, 10 months ago (2013-01-31 23:21:59 UTC) #10
ajuma
https://chromiumcodereview.appspot.com/12093067/diff/11001/ui/compositor/layer.cc File ui/compositor/layer.cc (right): https://chromiumcodereview.appspot.com/12093067/diff/11001/ui/compositor/layer.cc#newcode137 ui/compositor/layer.cc:137: child->OnParentIsDrawnChanged(IsDrawn(), true); On 2013/01/31 23:21:59, piman wrote: > If ...
7 years, 10 months ago (2013-02-01 16:04:06 UTC) #11
piman
LGTM + nits. Thanks for the work, this looks great now. https://chromiumcodereview.appspot.com/12093067/diff/10004/ui/compositor/layer.cc File ui/compositor/layer.cc (right): ...
7 years, 10 months ago (2013-02-01 18:06:55 UTC) #12
ajuma
https://chromiumcodereview.appspot.com/12093067/diff/10004/ui/compositor/layer.cc File ui/compositor/layer.cc (right): https://chromiumcodereview.appspot.com/12093067/diff/10004/ui/compositor/layer.cc#newcode659 ui/compositor/layer.cc:659: bool schedule_draw = (opacity != opacity_ && IsDrawn()); On ...
7 years, 10 months ago (2013-02-01 18:40:23 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ajuma@chromium.org/12093067/3007
7 years, 10 months ago (2013-02-01 18:46:23 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ajuma@chromium.org/12093067/3007
7 years, 10 months ago (2013-02-02 15:52:41 UTC) #15
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=107084
7 years, 10 months ago (2013-02-02 19:06:22 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ajuma@chromium.org/12093067/3007
7 years, 10 months ago (2013-02-02 19:10:11 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ajuma@chromium.org/12093067/3007
7 years, 10 months ago (2013-02-02 22:45:46 UTC) #18
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=107240
7 years, 10 months ago (2013-02-03 02:23:56 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ajuma@chromium.org/12093067/3007
7 years, 10 months ago (2013-02-03 15:14:13 UTC) #20
commit-bot: I haz the power
7 years, 10 months ago (2013-02-03 15:33:13 UTC) #21
Message was sent while issue was closed.
Change committed as 180310

Powered by Google App Engine
This is Rietveld 408576698