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

Issue 14921006: Fix LabelButtonBorder image blending. (Closed)

Created:
7 years, 7 months ago by msw
Modified:
7 years, 6 months ago
Reviewers:
sky, reed1
CC:
chromium-reviews, tfarina, benwells, Stephen White, Alexei Svitkine (slow), bsalomon
Visibility:
Public.

Description

Fix LabelButtonBorder image blending. Use Skia's new SkLerpXfermode added for this purpose! (linearly interpolates between src and dst image data) Restore native style animation pre- http://crrev.com/199342 (paint background at full alpha, not 1-<animation alpha>) Add support for Views Painters to use a custom SkPaint. Move unfocused fallback to LabelButtonBorder::GetPainter. BUG=239121, 155363 TEST=New button animations never let the background bleed through (see about:crash's reload button for an example). R=reed@google.com,sky@chromium.org Abandoned / On-Hold pending NativeTheme button painting.

Patch Set 1 #

Patch Set 2 : Use SkBitmapOperations::CreateBlendedBitmap. #

Patch Set 3 : Working on a ImageBlendPainter. #

Patch Set 4 : Blending fixes and debugging. #

Patch Set 5 : Cleanup. #

Patch Set 6 : Use SkLerpXfermode for image blending. #

Patch Set 7 : Restore old native animation code; move unfocused fallback; etc. #

Total comments: 4

Patch Set 8 : Use a skia::RefPtr to free the SkXfermode after use. #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+69 lines, -40 lines) Patch
M ui/views/controls/button/blue_button.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -1 line 0 comments Download
M ui/views/controls/button/blue_button.cc View 1 2 3 4 5 6 1 chunk +0 lines, -6 lines 0 comments Download
M ui/views/controls/button/label_button_border.cc View 1 2 3 4 5 6 7 5 chunks +33 lines, -21 lines 1 comment Download
M ui/views/painter.h View 1 2 3 4 5 2 chunks +6 lines, -0 lines 2 comments Download
M ui/views/painter.cc View 1 2 3 4 5 6 chunks +30 lines, -12 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
reed1
brian (gpu backend lead) and I think a custom xfermode would be doable in the ...
7 years, 7 months ago (2013-05-15 13:42:22 UTC) #1
reed1
7 years, 7 months ago (2013-05-15 13:43:06 UTC) #2
msw
Hey Scott, please take a look; thanks! Mike, can you check my xfer mode usage?
7 years, 6 months ago (2013-06-12 19:30:31 UTC) #3
reed1
https://codereview.chromium.org/14921006/diff/14001/ui/views/controls/button/label_button_border.cc File ui/views/controls/button/label_button_border.cc (right): https://codereview.chromium.org/14921006/diff/14001/ui/views/controls/button/label_button_border.cc#newcode117 ui/views/controls/button/label_button_border.cc:117: canvas->SaveLayerAlpha(static_cast<uint8>(alpha)); Does this guy *not* actually create a layer ...
7 years, 6 months ago (2013-06-12 20:05:09 UTC) #4
msw
Comments addressed, but now I'm seeing some awful remote behavior. This worked great locally yesterday, ...
7 years, 6 months ago (2013-06-12 22:10:54 UTC) #5
reed1
> Would you like me to file a bug? Should Create return a skia::RefPtr? Better ...
7 years, 6 months ago (2013-06-13 13:27:43 UTC) #6
sky
https://codereview.chromium.org/14921006/diff/27001/ui/views/controls/button/label_button_border.cc File ui/views/controls/button/label_button_border.cc (right): https://codereview.chromium.org/14921006/diff/27001/ui/views/controls/button/label_button_border.cc#newcode112 ui/views/controls/button/label_button_border.cc:112: ui::NativeTheme::State fore = delegate->GetForegroundThemeState(&extra); foreground, or fg. https://codereview.chromium.org/14921006/diff/27001/ui/views/painter.h File ...
7 years, 6 months ago (2013-06-13 16:22:04 UTC) #7
msw
https://codereview.chromium.org/14921006/diff/27001/ui/views/painter.h File ui/views/painter.h (right): https://codereview.chromium.org/14921006/diff/27001/ui/views/painter.h#newcode77 ui/views/painter.h:77: virtual void PaintWithSkPaint(gfx::Canvas* canvas, On 2013/06/13 16:22:04, sky wrote: ...
7 years, 6 months ago (2013-06-13 17:29:49 UTC) #8
msw
7 years, 6 months ago (2013-06-13 18:43:40 UTC) #9
Message was sent while issue was closed.
Sorry for the wasted time here. I'm going to put this CL on hold while I work
towards painting the new button style through NativeTheme. As an aside, I'm
seeing the black fill of the transparent button areas locally too now. I have no
clue what I changed to cause this. :(

Powered by Google App Engine
This is Rietveld 408576698