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

Issue 770383002: Replace use of deprecated CG methods. (Closed)

Created:
6 years ago by bungeman-skia
Modified:
6 years ago
Reviewers:
mtklein, reed1
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Project:
skia
Visibility:
Public.

Description

Replace use of deprecated CG methods. OSX10.9 and iOS7.0 deprecated CGContextShowGlyphsAtPoint so a new API should be used. OSX10.7 and iOS4.2 replace CGContextShowGlyphsAtPoint with CTFontDrawGlyphs. OSX10.5 and iOS2.0 have CGContextShowGlyphsAtPositions which works similarly to CTFontDrawGlyphs and has not yet been deprecated. This change allows the use of CTFontDrawGlyphs when it is available, falling back to CGContextShowGlyphsAtPositions when it isn't. Committed: https://skia.googlesource.com/skia/+/3490263287e9432119c501884e45840de4d986bc

Patch Set 1 : CGPointApplyAffineTransform #

Patch Set 2 : CTFontDrawGlyphs #

Patch Set 3 : Somewhat working. #

Patch Set 4 : Mostly working. #

Patch Set 5 : Make 10.7 happy. #

Patch Set 6 : Clean up code. (121 failures.) #

Total comments: 2

Patch Set 7 : Address comments, possible better stability. (Down to 40 failures.) #

Patch Set 8 : Another 'optimization' for correctness. (Didn't change anything.) #

Patch Set 9 : Handle singular matrices. #

Patch Set 10 : Fix inverted text. #

Patch Set 11 : Verbose explanation of singular detection. #

Patch Set 12 : Use the right sign. #

Patch Set 13 : Remove example code. #

Patch Set 14 : Remove no longer required include. #

Total comments: 2

Patch Set 15 : Address comments. #

Patch Set 16 : Add expectations. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+255 lines, -217 lines) Patch
M expectations/gm/Test-Mac10.7-MacMini4.1-GeForce320M-x86_64-Debug/expected-results.json View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 7 chunks +11 lines, -9 lines 0 comments Download
M expectations/gm/Test-Mac10.7-MacMini4.1-GeForce320M-x86_64-Release/expected-results.json View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 7 chunks +11 lines, -9 lines 0 comments Download
M expectations/gm/Test-Mac10.8-MacMini4.1-GeForce320M-x86_64-Debug/expected-results.json View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 14 chunks +43 lines, -67 lines 0 comments Download
M expectations/gm/Test-Mac10.8-MacMini4.1-GeForce320M-x86_64-Release/expected-results.json View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 14 chunks +43 lines, -67 lines 0 comments Download
M expectations/gm/Test-Win8-ShuttleA-GTX660-x86-Debug/expected-results.json View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +4 lines, -4 lines 0 comments Download
M expectations/gm/Test-Win8-ShuttleA-GTX660-x86-Release/expected-results.json View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +4 lines, -4 lines 0 comments Download
M expectations/gm/Test-Win8-ShuttleA-HD7770-x86_64-Debug/expected-results.json View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +4 lines, -4 lines 0 comments Download
M src/core/SkScalerContext.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +32 lines, -3 lines 0 comments Download
M src/ports/SkFontHost_mac.cpp View 1 2 3 4 5 6 7 8 20 chunks +103 lines, -50 lines 0 comments Download

Messages

Total messages: 12 (2 generated)
bungeman-skia
At PS6 this 'works' in the sense that the results would be acceptable if we ...
6 years ago (2014-12-08 21:17:24 UTC) #2
reed1
at some point we might factor some of the helper functions out -- the file ...
6 years ago (2014-12-08 21:24:44 UTC) #3
bungeman-skia
Yep, this file is big and needs to be split into a SkFontMgr, SkTypeface, and ...
6 years ago (2014-12-08 21:33:23 UTC) #4
reed1
On 2014/12/08 21:33:23, bungeman1 wrote: > Yep, this file is big and needs to be ...
6 years ago (2014-12-08 21:48:21 UTC) #5
bungeman-skia
Please take a look, this is down to 42 Skia GM changes (2 Windows, 40 ...
6 years ago (2014-12-10 16:16:23 UTC) #6
reed1
https://codereview.chromium.org/770383002/diff/260001/src/core/SkScalerContext.cpp File src/core/SkScalerContext.cpp (right): https://codereview.chromium.org/770383002/diff/260001/src/core/SkScalerContext.cpp#newcode746 src/core/SkScalerContext.cpp:746: if (diag[0].lengthSqd() < SK_ScalarNearlyZero || diag[1].lengthSqd() < SK_ScalarNearlyZero) { ...
6 years ago (2014-12-10 16:45:17 UTC) #7
bungeman-skia
https://codereview.chromium.org/770383002/diff/260001/src/core/SkScalerContext.cpp File src/core/SkScalerContext.cpp (right): https://codereview.chromium.org/770383002/diff/260001/src/core/SkScalerContext.cpp#newcode746 src/core/SkScalerContext.cpp:746: if (diag[0].lengthSqd() < SK_ScalarNearlyZero || diag[1].lengthSqd() < SK_ScalarNearlyZero) { ...
6 years ago (2014-12-10 17:06:16 UTC) #8
reed1
lgtm
6 years ago (2014-12-10 18:16:09 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/770383002/300001
6 years ago (2014-12-11 05:34:24 UTC) #11
commit-bot: I haz the power
6 years ago (2014-12-11 05:43:35 UTC) #12
Message was sent while issue was closed.
Committed patchset #16 (id:300001) as
https://skia.googlesource.com/skia/+/3490263287e9432119c501884e45840de4d986bc

Powered by Google App Engine
This is Rietveld 408576698