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

Issue 385123005: Change ui::wm::Shadow to use cc::NinePatchLayer. (Closed)

Created:
6 years, 5 months ago by hshi1
Modified:
6 years, 5 months ago
CC:
chromium-reviews, Ian Vollick, sievers+watch_chromium.org, jbauman+watch_chromium.org, oshima+watch_chromium.org, kalyank, piman+watch_chromium.org, danakj+watch_chromium.org, cc-bugs_chromium.org, Ken Russell (switch to Gerrit)
Project:
chromium
Visibility:
Public.

Description

Change ui::wm::Shadow to use cc::NinePatchLayer. Added combined shadow assets used by the class ui::wm::Shadow and remove the unneeded assets for individual shadow patches. BUG=377319 TEST=run 1.0x, 1.25x and 2.0x scale factor and verify all shadows are rendered correctly. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=283558

Patch Set 1 #

Total comments: 1

Patch Set 2 : Separate aperture/border and inset values. #

Total comments: 2

Patch Set 3 : Adding comments for nits. #

Total comments: 13

Patch Set 4 : sky's comments. #

Patch Set 5 : Rebased on trunk@283064. #

Total comments: 6

Patch Set 6 : More comments. Rebased at trunk. #

Patch Set 7 : Make an immutable copy of input bitmap; fix check failure. #

Patch Set 8 : Separate update functions for Bitmap/Border. The border needs to be clamped to stay within layer bo… #

Unified diffs Side-by-side diffs Delta from patch set Stats (+125 lines, -83 lines) Patch
M ui/compositor/debug_utils.cc View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M ui/compositor/layer.h View 1 2 3 4 5 6 7 3 chunks +11 lines, -0 lines 0 comments Download
M ui/compositor/layer.cc View 1 2 3 4 5 6 7 3 chunks +27 lines, -1 line 0 comments Download
M ui/compositor/layer_type.h View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
D ui/resources/default_100_percent/common/window_shadow_active_bottom.png View Binary file 0 comments Download
D ui/resources/default_100_percent/common/window_shadow_active_bottom_left.png View Binary file 0 comments Download
D ui/resources/default_100_percent/common/window_shadow_active_bottom_right.png View Binary file 0 comments Download
D ui/resources/default_100_percent/common/window_shadow_active_left.png View Binary file 0 comments Download
D ui/resources/default_100_percent/common/window_shadow_active_right.png View Binary file 0 comments Download
D ui/resources/default_100_percent/common/window_shadow_active_top.png View Binary file 0 comments Download
D ui/resources/default_100_percent/common/window_shadow_active_top_left.png View Binary file 0 comments Download
D ui/resources/default_100_percent/common/window_shadow_active_top_right.png View Binary file 0 comments Download
D ui/resources/default_100_percent/common/window_shadow_inactive_bottom.png View Binary file 0 comments Download
D ui/resources/default_100_percent/common/window_shadow_inactive_bottom_left.png View Binary file 0 comments Download
D ui/resources/default_100_percent/common/window_shadow_inactive_bottom_right.png View Binary file 0 comments Download
D ui/resources/default_100_percent/common/window_shadow_inactive_left.png View Binary file 0 comments Download
D ui/resources/default_100_percent/common/window_shadow_inactive_right.png View Binary file 0 comments Download
D ui/resources/default_100_percent/common/window_shadow_inactive_top.png View Binary file 0 comments Download
D ui/resources/default_100_percent/common/window_shadow_inactive_top_left.png View Binary file 0 comments Download
D ui/resources/default_100_percent/common/window_shadow_inactive_top_right.png View Binary file 0 comments Download
D ui/resources/default_200_percent/common/window_shadow_active_bottom.png View Binary file 0 comments Download
D ui/resources/default_200_percent/common/window_shadow_active_bottom_left.png View Binary file 0 comments Download
D ui/resources/default_200_percent/common/window_shadow_active_bottom_right.png View Binary file 0 comments Download
D ui/resources/default_200_percent/common/window_shadow_active_left.png View Binary file 0 comments Download
D ui/resources/default_200_percent/common/window_shadow_active_right.png View Binary file 0 comments Download
D ui/resources/default_200_percent/common/window_shadow_active_top.png View Binary file 0 comments Download
D ui/resources/default_200_percent/common/window_shadow_active_top_left.png View Binary file 0 comments Download
D ui/resources/default_200_percent/common/window_shadow_active_top_right.png View Binary file 0 comments Download
D ui/resources/default_200_percent/common/window_shadow_inactive_bottom.png View Binary file 0 comments Download
D ui/resources/default_200_percent/common/window_shadow_inactive_bottom_left.png View Binary file 0 comments Download
D ui/resources/default_200_percent/common/window_shadow_inactive_bottom_right.png View Binary file 0 comments Download
D ui/resources/default_200_percent/common/window_shadow_inactive_left.png View Binary file 0 comments Download
D ui/resources/default_200_percent/common/window_shadow_inactive_right.png View Binary file 0 comments Download
D ui/resources/default_200_percent/common/window_shadow_inactive_top.png View Binary file 0 comments Download
D ui/resources/default_200_percent/common/window_shadow_inactive_top_left.png View Binary file 0 comments Download
D ui/resources/default_200_percent/common/window_shadow_inactive_top_right.png View Binary file 0 comments Download
M ui/resources/ui_resources.grd View 2 chunks +3 lines, -16 lines 0 comments Download
M ui/wm/core/shadow.h View 1 2 3 3 chunks +11 lines, -13 lines 0 comments Download
M ui/wm/core/shadow.cc View 1 2 3 4 5 6 7 8 chunks +67 lines, -53 lines 0 comments Download

Messages

Total messages: 23 (0 generated)
hshi1
PTAL
6 years, 5 months ago (2014-07-11 20:59:40 UTC) #1
hshi1
PTAL patch set #2. I talked to oshima@ and realized that the aperture/border needs to ...
6 years, 5 months ago (2014-07-11 22:47:40 UTC) #2
oshima
thanks. lgtm with a nit. https://codereview.chromium.org/385123005/diff/1/ui/resources/ui_resources.grd File ui/resources/ui_resources.grd (right): https://codereview.chromium.org/385123005/diff/1/ui/resources/ui_resources.grd#newcode106 ui/resources/ui_resources.grd:106: <structure type="chrome_scaled_image" name="IDR_AURA_SHADOW_INACTIVE" file="common/window_shadow_inactive.png" ...
6 years, 5 months ago (2014-07-11 23:03:41 UTC) #3
hshi1
+sky (OWNERS of ui/) https://codereview.chromium.org/385123005/diff/20001/ui/wm/core/shadow.cc File ui/wm/core/shadow.cc (right): https://codereview.chromium.org/385123005/diff/20001/ui/wm/core/shadow.cc#newcode20 ui/wm/core/shadow.cc:20: // Shadow aperture for different ...
6 years, 5 months ago (2014-07-11 23:18:03 UTC) #4
sky
https://codereview.chromium.org/385123005/diff/40001/ui/compositor/layer.cc File ui/compositor/layer.cc (right): https://codereview.chromium.org/385123005/diff/40001/ui/compositor/layer.cc#newcode592 ui/compositor/layer.cc:592: SetFillsBoundsOpaquely(false); Why the SetFillsBoundsOpaquely here? Isn't that separate from ...
6 years, 5 months ago (2014-07-14 15:30:06 UTC) #5
ccameron
This lgtm w sky's remarks.
6 years, 5 months ago (2014-07-14 17:32:06 UTC) #6
hshi1
https://codereview.chromium.org/385123005/diff/40001/ui/compositor/layer.cc File ui/compositor/layer.cc (right): https://codereview.chromium.org/385123005/diff/40001/ui/compositor/layer.cc#newcode592 ui/compositor/layer.cc:592: SetFillsBoundsOpaquely(false); On 2014/07/14 15:30:06, sky wrote: > Why the ...
6 years, 5 months ago (2014-07-14 21:23:38 UTC) #7
oshima
https://codereview.chromium.org/385123005/diff/40001/ui/wm/core/shadow.cc File ui/wm/core/shadow.cc (left): https://codereview.chromium.org/385123005/diff/40001/ui/wm/core/shadow.cc#oldcode140 ui/wm/core/shadow.cc:140: &res.GetImageNamed(IDR_AURA_SHADOW_ACTIVE_TOP_LEFT), On 2014/07/14 21:23:37, hshi1 wrote: > On 2014/07/14 ...
6 years, 5 months ago (2014-07-14 22:02:32 UTC) #8
sky
On Mon, Jul 14, 2014 at 3:02 PM, <oshima@chromium.org> wrote: > > https://codereview.chromium.org/385123005/diff/40001/ui/wm/core/shadow.cc > File ...
6 years, 5 months ago (2014-07-15 04:11:11 UTC) #9
hshi1
On 2014/07/15 04:11:11, sky wrote: > On Mon, Jul 14, 2014 at 3:02 PM, <mailto:oshima@chromium.org> ...
6 years, 5 months ago (2014-07-15 16:41:43 UTC) #10
hshi1
per sgabriel (see bug comments) this is an acceptable solution for designers. thanks!
6 years, 5 months ago (2014-07-15 17:05:49 UTC) #11
oshima
On 2014/07/15 16:41:43, hshi1 wrote: > On 2014/07/15 04:11:11, sky wrote: > > On Mon, ...
6 years, 5 months ago (2014-07-15 17:20:38 UTC) #12
sky
https://codereview.chromium.org/385123005/diff/80001/ui/compositor/layer.cc File ui/compositor/layer.cc (right): https://codereview.chromium.org/385123005/diff/80001/ui/compositor/layer.cc#newcode602 ui/compositor/layer.cc:602: if (type_ == LAYER_SOLID_COLOR || (!delegate_ && !mailbox_.IsValid())) Should ...
6 years, 5 months ago (2014-07-15 17:52:20 UTC) #13
danakj
https://codereview.chromium.org/385123005/diff/80001/ui/compositor/layer.cc File ui/compositor/layer.cc (right): https://codereview.chromium.org/385123005/diff/80001/ui/compositor/layer.cc#newcode591 ui/compositor/layer.cc:591: if (!nine_patch_layer_.get()) You DCHECK'd this won't happen, so please ...
6 years, 5 months ago (2014-07-15 17:53:34 UTC) #14
sky
https://codereview.chromium.org/385123005/diff/80001/ui/compositor/layer.cc File ui/compositor/layer.cc (right): https://codereview.chromium.org/385123005/diff/80001/ui/compositor/layer.cc#newcode591 ui/compositor/layer.cc:591: if (!nine_patch_layer_.get()) On 2014/07/15 17:53:34, danakj wrote: > You ...
6 years, 5 months ago (2014-07-15 17:55:19 UTC) #15
hshi1
https://codereview.chromium.org/385123005/diff/80001/ui/compositor/layer.cc File ui/compositor/layer.cc (right): https://codereview.chromium.org/385123005/diff/80001/ui/compositor/layer.cc#newcode591 ui/compositor/layer.cc:591: if (!nine_patch_layer_.get()) On 2014/07/15 17:55:18, sky wrote: > On ...
6 years, 5 months ago (2014-07-15 18:16:39 UTC) #16
Ken Russell (switch to Gerrit)
Note: the WebGLContextLostFromSelectElement failure looks real, and related to this patch. It stresses context loss ...
6 years, 5 months ago (2014-07-15 19:04:35 UTC) #17
hshi1
On 2014/07/15 19:04:35, Ken Russell wrote: > Note: the WebGLContextLostFromSelectElement failure looks real, and related ...
6 years, 5 months ago (2014-07-15 19:13:09 UTC) #18
hshi1
sky: PTAL - I believe PS#8 has eliminated the last few DCHECK failures in tests.
6 years, 5 months ago (2014-07-16 18:16:30 UTC) #19
sky
LGTM
6 years, 5 months ago (2014-07-16 19:33:30 UTC) #20
hshi1
The CQ bit was checked by hshi@chromium.org
6 years, 5 months ago (2014-07-16 20:13:58 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hshi@chromium.org/385123005/140001
6 years, 5 months ago (2014-07-16 20:16:38 UTC) #22
hshi1
6 years, 5 months ago (2014-07-16 22:52:24 UTC) #23
The CQ bit was unchecked by hshi@chromium.org

Powered by Google App Engine
This is Rietveld 408576698