Commit Graph

99 Commits

Author SHA1 Message Date
mtklein
a64c48f4f9 Move sync code to include/, switch from using platform define to a proxy header in core/
This fixes two problems:
  1)  #include SK_SOME_DEFINE doesn't work well for all our clients.
  2)  Things in include/ are #including things in src/, which we don't like.

TBR=reed@google.com

BUG=skia:

Review URL: https://codereview.chromium.org/862983002
2015-01-21 13:13:31 -08:00
mtklein
72c9faab45 Fix up all the easy virtual ... SK_OVERRIDE cases.
This fixes every case where virtual and SK_OVERRIDE were on the same line,
which should be the bulk of cases.  We'll have to manually clean up the rest
over time unless I level up in regexes.

for f in (find . -type f); perl -p -i -e 's/virtual (.*)SK_OVERRIDE/\1SK_OVERRIDE/g' $f; end

BUG=skia:

Review URL: https://codereview.chromium.org/806653007
2015-01-09 10:06:40 -08:00
djsollen
c87dd2ce96 Enable unused param checking for public includes.
This CL cleans up the existing violations and enables the
build time check to ensure that we don't regress.

The motiviation behind this change is to allow clients who include
our headers to be able to build with this warning enabled.

Review URL: https://codereview.chromium.org/726923002
2014-11-14 11:11:46 -08:00
djsollen
33068c19f1 Enforce pure virtual behavior for onMatchFamilyStyleCharacter
All impls that previously did not define the functions have been
updated to return NULL.

NOTRY=true

Review URL: https://codereview.chromium.org/728873002
2014-11-14 10:52:53 -08:00
bungeman
c9232dcda0 Remove SK_FM_NEW_MATCH_FAMILY_STYLE_CHARACTER.
This removes the old guarded code and enables the new api
introduced with "Update fontMgr to take list of bcp47 language tags."
c20386e393 . Blink on Android is
already using the new code.

Review URL: https://codereview.chromium.org/705843004
2014-11-10 13:29:33 -08:00
bungeman
c20386e393 Update fontMgr to take list of bcp47 language tags.
This will enable clients to pass more than one bcp47 tag to ensure
that the most appropriate font is selected.

BUG=chromium:422180

Review URL: https://codereview.chromium.org/670243002
2014-10-23 07:08:06 -07:00
bungeman
a4c4a2d8cd Replace SkTypeface::Style with SkFontStyle.
Committed: https://skia.googlesource.com/skia/+/43b8b36b20ae00e2d78421c4cda1f3f922983a20

Review URL: https://codereview.chromium.org/488143002
2014-10-20 13:33:19 -07:00
mtklein
802ad83dca Revert of Replace SkTypeface::Style with SkFontStyle. (patchset #9 id:160001 of https://codereview.chromium.org/488143002/)
Reason for revert:
CrOS GM failures:

[*] 2 ExpectationsMismatch: fontmgr_iter_565.png fontmgr_iter_8888.png

Original issue's description:
> Replace SkTypeface::Style with SkFontStyle.
>
> Committed: https://skia.googlesource.com/skia/+/43b8b36b20ae00e2d78421c4cda1f3f922983a20

TBR=reed@google.com,bungeman@google.com
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/667023002
2014-10-20 12:54:31 -07:00
bungeman
43b8b36b20 Replace SkTypeface::Style with SkFontStyle.
Review URL: https://codereview.chromium.org/488143002
2014-10-20 12:33:59 -07:00
mtklein
148ec59001 Require SK_DECLARE_STATIC_LAZY_PTR is used in global scope.
Function- or method- local scope isn't threadsafe; the pointer is generally
zero-initialized on first use in function scope (i.e. lazily... we have to go
deeper), but for globals we can be pretty sure the linker will do that for us.

BUG=skia:

No public API changes.
TBR=reed@google.com

Review URL: https://codereview.chromium.org/651723003
2014-10-13 13:17:56 -07:00
tomhudson
c773390eef Delete the old font management implementation based on SkFontConfigInterface, now that SkFontMgr_Android is live.
BUG=chromium:400801
R=djsollen@google.com, bungeman@google.com

Author: tomhudson@chromium.org

Review URL: https://codereview.chromium.org/445143002
2014-08-13 10:41:25 -07:00
bungeman
4e3523cf54 Blink layout tests all assume it can provide custom font configuration files on every platform. In moving Android to the font manager, we broke those.
They're ugly, but this patch reinstates them.

R=tomhudson@google.com, djsollen@google.com, reed@google.com
TBR=reed@google.com
BUG=chromium:401954

Author: bungeman@google.com

Review URL: https://codereview.chromium.org/451093002
2014-08-08 12:06:52 -07:00
djsollen
1b27704eba Remove ALL font fallback logic from Skia.
R=reed@google.com, bungeman@google.com, caryclark@google.com

Author: djsollen@google.com

Review URL: https://codereview.chromium.org/434623002
2014-08-06 06:58:06 -07:00
Derek Sollenberger
9ee1a4a460 Remove redundant helper function as all clients pass locale
R=tomhudson@google.com

Review URL: https://codereview.chromium.org/426643003
2014-07-28 10:04:55 -04:00
Derek Sollenberger
e83a7ecfd7 Remove unused code now that the android framework has move this logic elsewhere.
R=tomhudson@google.com

Review URL: https://codereview.chromium.org/424663005
2014-07-28 09:54:10 -04:00
Mike Klein
15840a2e84 Delete third_party/harfbuzz
BUG=skia:
R=bungeman@google.com, reed@google.com

Review URL: https://codereview.chromium.org/384503008
2014-07-10 11:32:44 -04:00
tomhudson
e438ddbc74 Uses optional mutex to guard construction of the singleton, which
initializes the non-threadsafe libfontconfig. Without this change,
Skia's parallel path ops test runner crashes 6/10 and hangs 2/10 on
startup; with this change, 0/10 problems.

BUG=skia:2693
R=mtklein@google.com, bungeman@google.com, reed@google.com

Committed: https://skia.googlesource.com/skia/+/df022f5972ae6a2a1d96d15c50eca52cade3abd8

Committed: https://skia.googlesource.com/skia/+/60b08a0adfe73f593af62c8d3f55958438360e1b

Author: tomhudson@chromium.org

Review URL: https://codereview.chromium.org/355573006
2014-07-01 18:54:41 -07:00
mtklein
e41f3886ea Revert of Fix race condition in parallel font initialization. (https://codereview.chromium.org/355573006/)
Reason for revert:
canaries still slightly broken

Original issue's description:
> Fix race condition in parallel font initialization.
>
> Uses a mutex to guard construction of the singleton, which initialies
> the non-threadsafe libfontconfig.  Without this change, the parallel
> path ops test runner crashes 6/10 and hangs 2/10 on startup; with this
> change, 0/10 problems.
>
> BUG=skia:2693
> R=mtklein@google.com,bungeman@google.com
>
> Committed: https://skia.googlesource.com/skia/+/df022f5972ae6a2a1d96d15c50eca52cade3abd8
>
> Committed: https://skia.googlesource.com/skia/+/60b08a0adfe73f593af62c8d3f55958438360e1b

R=bungeman@google.com, reed@google.com, tomhudson@google.com, tomhudson@chromium.org
TBR=bungeman@google.com, reed@google.com, tomhudson@chromium.org, tomhudson@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2693

Author: mtklein@google.com

Review URL: https://codereview.chromium.org/354133004
2014-07-01 13:33:32 -07:00
tomhudson
60b08a0adf Fix race condition in parallel font initialization.
Uses a mutex to guard construction of the singleton, which initialies
the non-threadsafe libfontconfig.  Without this change, the parallel
path ops test runner crashes 6/10 and hangs 2/10 on startup; with this
change, 0/10 problems.

BUG=skia:2693
R=mtklein@google.com, bungeman@google.com, reed@google.com, tomhudson@google.com

Committed: https://skia.googlesource.com/skia/+/df022f5972ae6a2a1d96d15c50eca52cade3abd8

Author: tomhudson@chromium.org

Review URL: https://codereview.chromium.org/355573006
2014-07-01 08:06:14 -07:00
reed
50a7b0e621 Revert of Fix race condition in parallel font initialization. (https://codereview.chromium.org/355573006/)
Reason for revert:
breaks chrome builds

Original issue's description:
> Fix race condition in parallel font initialization.
>
> Uses a mutex to guard construction of the singleton, which initialies
> the non-threadsafe libfontconfig.  Without this change, the parallel
> path ops test runner crashes 6/10 and hangs 2/10 on startup; with this
> change, 0/10 problems.
>
> BUG=skia:2693
> R=mtklein@google.com,bungeman@google.com
>
> Committed: https://skia.googlesource.com/skia/+/df022f5972ae6a2a1d96d15c50eca52cade3abd8

R=mtklein@google.com, bungeman@google.com, reed@google.com, tomhudson@google.com, tomhudson@chromium.org
TBR=bungeman@google.com, mtklein@google.com, reed@google.com, tomhudson@chromium.org, tomhudson@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2693

Author: reed@chromium.org

Review URL: https://codereview.chromium.org/365503003
2014-06-30 16:48:24 -07:00
tomhudson
df022f5972 Fix race condition in parallel font initialization.
Uses a mutex to guard construction of the singleton, which initialies
the non-threadsafe libfontconfig.  Without this change, the parallel
path ops test runner crashes 6/10 and hangs 2/10 on startup; with this
change, 0/10 problems.

BUG=skia:2693
R=mtklein@google.com, bungeman@google.com, reed@google.com, tomhudson@google.com

Author: tomhudson@chromium.org

Review URL: https://codereview.chromium.org/355573006
2014-06-30 14:14:01 -07:00
mtklein
78358bf624 Port most uses of SkOnce to SkLazyPtr.
BUG=skia:

Committed: http://code.google.com/p/skia/source/detail?r=15006

Committed: http://code.google.com/p/skia/source/detail?r=15014

R=reed@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/304383005
2014-06-02 08:44:27 -07:00
commit-bot@chromium.org
f71e8fd0c5 Revert of Port most uses of SkOnce to SkLazyPtr. (https://codereview.chromium.org/304383005/)
Reason for revert:
linux x86-64 release segfault in src/ports/SkFontHost_fontconfig.cpp:107

http://108.170.220.120:10117/builders/Test-Ubuntu12-ShuttleA-GTX660-x86_64-Release/builds/905/steps/RunTests/logs/stdio

Original issue's description:
> Port most uses of SkOnce to SkLazyPtr.
>
> BUG=skia:
>
> Committed: http://code.google.com/p/skia/source/detail?r=15006
>
> Committed: http://code.google.com/p/skia/source/detail?r=15014

R=reed@google.com, mtklein@chromium.org
TBR=mtklein@chromium.org, reed@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Author: mtklein@google.com

Review URL: https://codereview.chromium.org/306063004

git-svn-id: http://skia.googlecode.com/svn/trunk@15015 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-31 00:15:22 +00:00
commit-bot@chromium.org
56f7cca144 Port most uses of SkOnce to SkLazyPtr.
BUG=skia:

Committed: http://code.google.com/p/skia/source/detail?r=15006

R=reed@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/304383005

git-svn-id: http://skia.googlecode.com/svn/trunk@15014 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-30 23:59:12 +00:00
commit-bot@chromium.org
f6351a0718 Revert of Port most uses of SkOnce to SkLazyPtr. (https://codereview.chromium.org/304383005/)
Reason for revert:
Leaking refs on SkTypeface on Macs.

Original issue's description:
> Port most uses of SkOnce to SkLazyPtr.
>
> BUG=skia:
>
> Committed: http://code.google.com/p/skia/source/detail?r=15006

R=reed@google.com, mtklein@chromium.org
TBR=mtklein@chromium.org, reed@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Author: mtklein@google.com

Review URL: https://codereview.chromium.org/304283007

git-svn-id: http://skia.googlecode.com/svn/trunk@15009 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-30 21:00:52 +00:00
commit-bot@chromium.org
5a70945ddd Port most uses of SkOnce to SkLazyPtr.
BUG=skia:
R=reed@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/304383005

git-svn-id: http://skia.googlecode.com/svn/trunk@15006 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-30 20:42:00 +00:00
bungeman@google.com
6eddc77f6a Pass the IDWriteFactory instead of relying on a global creator.
There are different variations or implementations of IDWriteFactory
with different behaviors. Allow the user to specify the factory to use.

R=scottmg@chromium.org

Review URL: https://codereview.chromium.org/218833005

git-svn-id: http://skia.googlecode.com/svn/trunk@14000 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-31 19:18:07 +00:00
bungeman@google.com
1ba62629f4 Clean up SkOnce usage in SkFontMgr_Indirect.
R=mtklein@google.com

Review URL: https://codereview.chromium.org/210283002

git-svn-id: http://skia.googlecode.com/svn/trunk@13917 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-24 18:38:25 +00:00
skia.committer@gmail.com
29d3777a82 Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@13902 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-22 03:02:27 +00:00
bungeman@google.com
c8f0d606e5 Fix r13897.
git-svn-id: http://skia.googlecode.com/svn/trunk@13901 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-22 00:25:34 +00:00
bungeman@google.com
f76cbb8848 Fix r13897.
git-svn-id: http://skia.googlecode.com/svn/trunk@13899 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-21 23:07:24 +00:00
bungeman@google.com
3d21f21cac Fix r13897.
git-svn-id: http://skia.googlecode.com/svn/trunk@13898 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-21 23:00:41 +00:00
bungeman@google.com
72cf4fcafa A remotable font management interface and DirectWrite implementation.
The introduced SkRemotableFontMgr is a font management interface designed for simple and fast proxy support. SkFontMgr_Indirect bridges a SkRemotableFontMgr and a local SkFontMgr to present a SkFontMgr interface.

This change is to be followed by https://codereview.chromium.org/132113015/ and  https://codereview.chromium.org/206693003 .

R=reed@google.com

Review URL: https://codereview.chromium.org/206683002

git-svn-id: http://skia.googlecode.com/svn/trunk@13897 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-21 22:48:32 +00:00
commit-bot@chromium.org
967dee32ef Make SkFontMgr interface const.
COLLABORATOR=mtklein@chromium.org
BUG=skia:
R=reed@google.com, bungeman@google.com, mtklein@chromium.org

Author: mtklein@google.com

Review URL: https://codereview.chromium.org/134643028

git-svn-id: http://skia.googlecode.com/svn/trunk@13314 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-02-04 22:35:01 +00:00
commit-bot@chromium.org
98000efa59 Android now uses Harfbuzz-NG. No need to keep code specific to the old version of Harfbuzz around!
R=scroggo@google.com, reed@google.com, bungeman@google.com

Author: djsollen@google.com

Review URL: https://codereview.chromium.org/107663012

git-svn-id: http://skia.googlecode.com/svn/trunk@12756 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-18 19:49:27 +00:00
commit-bot@chromium.org
ab1c13864d Fix compilation with SK_ENABLE_INST_COUNT=1
Add INHERITED declarations to class declarations that prevent
compilation with the flag.

Remove SK_DEFINE_INST_COUNT from all class implementations.  Instead,
use function-local static variables in the reference count helper
classes to create the global instances to store the needed info. The
accessor functions are defined inline in the helper classes, so
definitions are not needed. The initialization point of the variables
should be as well defined as previously.

Remove SK_DECLARE_INST_COUNT_TEMPLATE and use SK_DECLARE_INST_COUNT
instead. This avoids possible future compilation errors further.

For SK_ENABLE_INST_COUNT=0 compilation, add an empty static member
function to all classes that use SK_DECLARE_INST_COUNT and
SK_DECLARE_INST_COUNT_ROOT macros. The function ensures that classes
contain public INHERITED typedef. This member function seems to be
compiled away. This shouĺd ensure that part of the compilation errors
are caught earlier.

Also adds DSK_DECLARE_INST_COUNT to few SkPDFDict subclasses.

R=robertphillips@google.com, richardlin@chromium.org, bsalomon@google.com

Author: kkinnunen@nvidia.com

Review URL: https://codereview.chromium.org/98703002

git-svn-id: http://skia.googlecode.com/svn/trunk@12501 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-05 12:08:12 +00:00
rmistry@google.com
d6bab02386 Reverting r12427
git-svn-id: http://skia.googlecode.com/svn/trunk@12428 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-02 13:50:38 +00:00
skia.committer@gmail.com
5b39f5ba9c Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@12427 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-02 13:36:22 +00:00
bungeman@google.com
21591f0b5a Remove completed TODO in SkFontMgr.h.
git-svn-id: http://skia.googlecode.com/svn/trunk@12424 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-27 22:05:22 +00:00
bungeman@google.com
9fc5c68823 Fix leak detected in FontMgrMatchGM::onDraw by Valgrind.
git-svn-id: http://skia.googlecode.com/svn/trunk@12242 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-12 15:25:29 +00:00
bungeman@google.com
b3d154de5e Remove SK_FONTHOST_USES_FONTMGR.
Review URL: https://codereview.chromium.org/66783003

git-svn-id: http://skia.googlecode.com/svn/trunk@12217 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-11 15:53:29 +00:00
bungeman@google.com
fb1663a0a5 Fix non-bmp in generateCharToGlyph on Mac.
git-svn-id: http://skia.googlecode.com/svn/trunk@11957 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-24 22:32:43 +00:00
commit-bot@chromium.org
c0445fec19 Fix ambiguity in API if no matching system language is found
R=reed@google.com, wangxianzhu@chromium.org

Author: djsollen@google.com

Review URL: https://codereview.chromium.org/26325003

git-svn-id: http://skia.googlecode.com/svn/trunk@11641 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-07 19:49:13 +00:00
djsollen@google.com
5df5e6126d Update PDF backend to support fallback fonts on Android.
R=edisonn@google.com, reed@google.com, vandebo@chromium.org

Review URL: https://codereview.chromium.org/24364008

git-svn-id: http://skia.googlecode.com/svn/trunk@11586 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-03 14:42:24 +00:00
djsollen@google.com
9902c38f48 Add new entry point that supports fallback font selection based on language.
BUG= chromium:287995
R=reed@google.com, wangxianzhu@chromium.org

Review URL: https://codereview.chromium.org/23819067

git-svn-id: http://skia.googlecode.com/svn/trunk@11394 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-19 18:22:30 +00:00
reed@google.com
d1bcfc9a19 export SkFontMgr_New_... experimental functions for testing in chrome
BUG=
R=eae@chromium.org

Review URL: https://codereview.chromium.org/23555004

git-svn-id: http://skia.googlecode.com/svn/trunk@10991 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-28 20:31:58 +00:00
bungeman@google.com
418ee43f42 Implement SkEmptyFontMgr::onLegacyCreateTypeface and make pure virtual.
R=reed@google.com

Review URL: https://codereview.chromium.org/22849025

git-svn-id: http://skia.googlecode.com/svn/trunk@10852 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-21 16:28:26 +00:00
reed@google.com
30ddd615c4 refactoring for SK_FONTHOST_USES_FONTMGR option
BUG=
R=bungeman@google.com

Review URL: https://codereview.chromium.org/21149008

git-svn-id: http://skia.googlecode.com/svn/trunk@10440 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-30 17:47:39 +00:00
bungeman@google.com
114cfbd10e Remove unimplemented Mutex() method from SkFontMgr.h.
R=reed@google.com

Review URL: https://codereview.chromium.org/19543008

git-svn-id: http://skia.googlecode.com/svn/trunk@10154 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-18 19:04:45 +00:00
commit-bot@chromium.org
ef284a84f5 The two leaks are:
missing unrefs in megalooper GM
  missing reset capability in oval renderer

This CL also expands the instance counting system to some recently adding classes (e.g., SkFontStyleSet)

R=bsalomon@google.com, jvanverth@google.com

Author: robertphillips@google.com

Review URL: https://chromiumcodereview.appspot.com/18461007

git-svn-id: http://skia.googlecode.com/svn/trunk@10030 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-11 22:29:29 +00:00