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

Issue 9129001: Adjust the CoreGraphics context for offscreen layers. (Closed)

Created:
8 years, 11 months ago by caryclark
Modified:
8 years, 11 months ago
Reviewers:
_cary, Stephen White, reed1
CC:
chromium-reviews
Visibility:
Public.

Description

Adjust the CoreGraphics context for offscreen layers. UI elements like buttons are drawn on Mac by pointing the CoreGraphics context at the Skia bitmap associated with the current device. If the elements are drawn in a transparent context, Skia creates an offscreen layer to capture the draw, then applies the transparency. CoreGraphics does not know that it is drawing to an offscreen, so the clip and matrix need to be adjusted by the offscreen's origin, which is its position on the device. Also, use getTopDevice() instead of getDevice() to obtain the bitmap. Normally, they will return the same SkDevice (and in that case, getOrigin() will return (0,0)) but if there's a layer present, getDevice() will return the actual device instead of the tempoary offscreen. BUG:108767 TEST:http://jsfiddle.net/casaschi/JWkfA/ Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=117217

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -4 lines) Patch
M skia/ext/skia_utils_mac.mm View 3 chunks +7 lines, -4 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
_cary
8 years, 11 months ago (2012-01-06 15:10:28 UTC) #1
reed1
lgtm
8 years, 11 months ago (2012-01-06 15:28:05 UTC) #2
_cary
This is pending Skia revision 2970, so it is not ready to land yet.
8 years, 11 months ago (2012-01-06 15:30:25 UTC) #3
_cary
On 2012/01/06 15:30:25, _cary wrote: > This is pending Skia revision 2970, so it is ...
8 years, 11 months ago (2012-01-10 22:01:58 UTC) #4
Stephen White
lgtm
8 years, 11 months ago (2012-01-10 22:25:40 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/caryclark@google.com/9129001/1
8 years, 11 months ago (2012-01-11 12:59:00 UTC) #6
commit-bot: I haz the power
8 years, 11 months ago (2012-01-11 14:50:41 UTC) #7
Change committed as 117217

Powered by Google App Engine
This is Rietveld 408576698