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

Issue 14884010: Mask orientation and layout correctly. (Closed)

Created:
7 years, 7 months ago by bungeman-skia
Modified:
7 years, 6 months ago
Reviewers:
clefru, reed1
CC:
skia-review_googelgroups.com
Visibility:
Public.

Description

Mask orientation and layout correctly. Committed: http://code.google.com/p/skia/source/detail?r=9022

Patch Set 1 #

Patch Set 2 : Better handling on Windows, new GM. #

Patch Set 3 : Our mac port doesn't support vertical or bgr either. #

Total comments: 2

Patch Set 4 : Add comment about CoreGraphics 'normal' hinting. #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+144 lines, -4 lines) Patch
A gm/deviceproperties.cpp View 1 1 chunk +113 lines, -0 lines 0 comments Download
M gyp/gmslides.gypi View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M include/core/SkDeviceProperties.h View 1 2 1 chunk +2 lines, -2 lines 3 comments Download
M src/ports/SkFontHost_mac.cpp View 1 2 3 1 chunk +15 lines, -2 lines 0 comments Download
M src/ports/SkFontHost_win.cpp View 1 2 1 chunk +7 lines, -0 lines 0 comments Download
M src/ports/SkFontHost_win_dw.cpp View 1 2 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
bungeman-skia
Fixes issue introduced with https://codereview.appspot.com/6499101/ .
7 years, 7 months ago (2013-05-06 14:48:38 UTC) #1
clefru
On 2013/05/06 14:48:38, bungeman1 wrote: > Fixes issue introduced with https://codereview.appspot.com/6499101/ . Please add unit ...
7 years, 7 months ago (2013-05-06 15:14:19 UTC) #2
bungeman-skia
Adds a gm to test vertical bgr so we don't regress in the future. >getOrientation ...
7 years, 7 months ago (2013-05-06 16:03:11 UTC) #3
bungeman-skia
Correct our mac port to devolve to A8 instead of using the wrong lcd order ...
7 years, 7 months ago (2013-05-06 17:34:37 UTC) #4
reed1
https://codereview.chromium.org/14884010/diff/6001/src/ports/SkFontHost_mac.cpp File src/ports/SkFontHost_mac.cpp (right): https://codereview.chromium.org/14884010/diff/6001/src/ports/SkFontHost_mac.cpp#newcode1839 src/ports/SkFontHost_mac.cpp:1839: rec->setHinting(SkPaint::kNormal_Hinting); why do we explicitly set hinting in this ...
7 years, 7 months ago (2013-05-06 18:02:12 UTC) #5
bungeman-skia
Added comment. https://codereview.chromium.org/14884010/diff/6001/src/ports/SkFontHost_mac.cpp File src/ports/SkFontHost_mac.cpp (right): https://codereview.chromium.org/14884010/diff/6001/src/ports/SkFontHost_mac.cpp#newcode1839 src/ports/SkFontHost_mac.cpp:1839: rec->setHinting(SkPaint::kNormal_Hinting); On 2013/05/06 18:02:12, reed1 wrote: > ...
7 years, 7 months ago (2013-05-06 18:16:10 UTC) #6
reed1
lgtm
7 years, 7 months ago (2013-05-06 18:19:00 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/bungeman@google.com/14884010/15001
7 years, 7 months ago (2013-05-06 22:00:56 UTC) #8
commit-bot: I haz the power
Change committed as 9022
7 years, 7 months ago (2013-05-06 22:23:11 UTC) #9
clefru
On 2013/05/06 16:03:11, bungeman1 wrote: > Adds a gm to test vertical bgr so we ...
7 years, 7 months ago (2013-05-07 13:32:07 UTC) #10
bungeman-skia
GM images added with revision 9032.
7 years, 7 months ago (2013-05-07 14:06:50 UTC) #11
clefru
https://codereview.chromium.org/14884010/diff/15001/include/core/SkDeviceProperties.h File include/core/SkDeviceProperties.h (right): https://codereview.chromium.org/14884010/diff/15001/include/core/SkDeviceProperties.h#newcode27 include/core/SkDeviceProperties.h:27: kHorizontal_Orientation = 0x2, //!< this is the default How ...
7 years, 7 months ago (2013-05-07 14:07:57 UTC) #12
bungeman-skia
To state this again, 'unknown' means 'unknown', not 'do something incorrect'. https://codereview.chromium.org/14884010/diff/15001/include/core/SkDeviceProperties.h File include/core/SkDeviceProperties.h (right): ...
7 years, 7 months ago (2013-05-07 14:24:31 UTC) #13
reed1
On 2013/05/07 14:24:31, bungeman1 wrote: > To state this again, 'unknown' means 'unknown', not 'do ...
7 years, 7 months ago (2013-05-07 14:56:54 UTC) #14
clefru
7 years, 6 months ago (2013-05-29 13:33:29 UTC) #15
Message was sent while issue was closed.
Requires more work.
(Also just for the sake of the etiquette, multiple reviewers mean multiple LGTMs
before submit.)

On 2013/05/07 14:24:31, bungeman1 wrote:
> To state this again, 'unknown' means 'unknown', not 'do something incorrect'.
> 
>
https://codereview.chromium.org/14884010/diff/15001/include/core/SkDeviceProp...
> File include/core/SkDeviceProperties.h (right):
> 
>
https://codereview.chromium.org/14884010/diff/15001/include/core/SkDeviceProp...
> include/core/SkDeviceProperties.h:27: kHorizontal_Orientation   = 0x2,  //!<
> this is the default
> On 2013/05/07 14:07:57, clefru wrote:
> > How is this "default", when we don't default to it in the case of an unknown
> > layout?
> 
> When you 'MakeDefault' this is the value you get. 

I can't see how this is true. MakeDefault calls out to
GetSubpixelOrientation/Order() wrapped in fromOldLayout/Orientation which both
end as default: kUnknown_*. 

> If you 'Make' one with
> 'kUnknown' there is nothing to default, the user stated that the geometry is
> unknown (or at least not one of the others). Otherwise we wouldn't call this
> 'kUnknown' we'd call it 'kDefault'. But it makes no sense to have such a
value,
> so it isn't provided.

Let me approach this from a different angle. How is the SkDeviceProperties
intended to behave from a caller perspective:

Is it 3-state, unknown/rgb/bgr?
Or is it 2x2 state, unknown/known, rgb/bgr?

I personally would advocate a latter design, where simple client can just query
the rgb/bgr and not care where it came from. Smarter clients could query whether
this value was set explicitly or a default. 

If you want something that explicitly turns off subpixel rendering you should
consider:
unknown/known, rgb/bgr/off.

Please add unit tests for SkDeviceProperties to document your semantics.

Powered by Google App Engine
This is Rietveld 408576698