Commit Graph

164 Commits

Author SHA1 Message Date
bungeman
788840168f Provide tag-along for SkCreateTypefaceFromCTFont.
This provides a means of keeping an object alive for the entire
lifetime of an SkTypeface.

Review URL: https://codereview.chromium.org/1163573007
2015-06-08 13:39:13 -07:00
bungeman
41868fe562 Font variations.
Multiple Master and TrueType fonts support variation axes.
This implements back-end support for axes on platforms which
support it.

Committed: https://skia.googlesource.com/skia/+/05773ed30920c0214d1433c07cf6360a05476c97

Committed: https://skia.googlesource.com/skia/+/3489ee0f4fa34f124f9de090d12bdc2107d52aa9

Review URL: https://codereview.chromium.org/1027373002
2015-05-20 09:21:04 -07:00
robertphillips
465706820d Revert of Font variations. (patchset #26 id:500001 of https://codereview.chromium.org/1027373002/)
Reason for revert:
Appears to be breaking  Linux ARM bots:

FAILED:
/usr/local/google/home/mosaic-role/slave/repo_clients/chromium_tot/chromium/src/../../prebuilt/toolchain/armv7a/bin/armv7a-cros-linux-gnueabi-g++
... -o obj/third_party/skia/src/ports/skia_library.SkFontHost_FreeType.o
../../third_party/skia/src/ports/SkFontHost_FreeType.cpp:37:31: fatal error:
freetype/ftmm.h: No such file or directory
 #include FT_MULTIPLE_MASTERS_H
                               ^
compilation terminated.

Original issue's description:
> Font variations.
>
> Multiple Master and TrueType fonts support variation axes.
> This implements back-end support for axes on platforms which
> support it.
>
> Committed: https://skia.googlesource.com/skia/+/05773ed30920c0214d1433c07cf6360a05476c97
>
> Committed: https://skia.googlesource.com/skia/+/3489ee0f4fa34f124f9de090d12bdc2107d52aa9

TBR=reed@google.com,mtklein@google.com,djsollen@google.com,halcanary@google.com,bungeman@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1139123008
2015-05-15 11:30:41 -07:00
bungeman
3489ee0f4f Font variations.
Multiple Master and TrueType fonts support variation axes.
This implements back-end support for axes on platforms which
support it.

Committed: https://skia.googlesource.com/skia/+/05773ed30920c0214d1433c07cf6360a05476c97

Review URL: https://codereview.chromium.org/1027373002
2015-05-14 14:18:03 -07:00
bungeman
5ae1312c9f Revert of Font variations. (patchset #21 id:400001 of https://codereview.chromium.org/1027373002/)
Reason for revert:
Mac failing to build due to CFNumberType in Chromium Canary.

Original issue's description:
> Font variations.
>
> Multiple Master and TrueType fonts support variation axes.
> This implements back-end support for axes on platforms which
> support it.
>
> Committed: https://skia.googlesource.com/skia/+/05773ed30920c0214d1433c07cf6360a05476c97

TBR=reed@google.com,mtklein@google.com,djsollen@google.com,halcanary@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1128913008
2015-05-13 12:16:41 -07:00
bungeman
05773ed309 Font variations.
Multiple Master and TrueType fonts support variation axes.
This implements back-end support for axes on platforms which
support it.

Review URL: https://codereview.chromium.org/1027373002
2015-05-13 10:57:10 -07:00
mtklein
50ffd9921e Extract the spinlock from SkOnce as SkSpinlock.
This uses slightly newer APIs from SkAtomics.h to make it a bit more efficient.

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

BUG=skia:

Review URL: https://codereview.chromium.org/1039323002
2015-03-30 08:13:34 -07:00
mtklein
36352bf5e3 C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla}
NOPRESUBMIT=true

BUG=skia:
DOCS_PREVIEW= https://skia.org/?cl=1037793002

Review URL: https://codereview.chromium.org/1037793002
2015-03-25 18:17:32 -07:00
djsollen
59f9ec7e9c Replace error checking mutex initializer with the glibc-compatible version
No public API changes.
TBR=reed@google.com

Review URL: https://codereview.chromium.org/1038733002
2015-03-25 13:47:13 -07:00
bungeman
7be2eb89cc Remove SkFontHost includes and friends.
SkFontHost no longer exists as a class, so remove the includes and stop
making it a friend.

Review URL: https://codereview.chromium.org/943333004
2015-02-23 08:25:00 -08:00
dominik.rottsches
94886482ff Expose method to retrieve CTFont
BUG=skia:3351
R=bungeman@chromium.org

Review URL: https://codereview.chromium.org/872963003
2015-02-18 10:50:58 -08:00
mtklein
01f797fcb0 SkAtomics: add asserts for valid memory orders.
Taken from http://en.cppreference.com/w/cpp/atomic/atomic and https://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html, which agree.

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

BUG=skia:

Review URL: https://codereview.chromium.org/868843003
2015-02-09 14:13:44 -08:00
bungeman
7fa87cd09f Add factory for Android font manager.
This allows users to create an Android font manager with their own set
of fonts, or augment the system set. This will allow for removal of
the current globals which are used for a similar, but more constained,
purpose.

BUG=skia:2817,skia:3314,chromium:407340

Review URL: https://codereview.chromium.org/887113002
2015-02-06 07:59:19 -08:00
mtklein
a669bc7a7a Atomics overhaul.
This merges and refactors SkAtomics.h and SkBarriers.h into SkAtomics.h and
some ports/ implementations. The major new feature is that we can express
memory orders explicitly rather than only through comments.

The porting layer is reduced to four template functions:
  - sk_atomic_load
  - sk_atomic_store
  - sk_atomic_fetch_add
  - sk_atomic_compare_exchange
From those four we can reconstruct all our previous sk_atomic_foo.

There are three ports:
  - SkAtomics_std:    uses C++11 <atomic>,             used with MSVC
  - SkAtomics_atomic: uses newer GCC/Clang intrinsics, used on not-MSVC where possible
  - SkAtomics_sync:   uses older GCC/Clang intrinsics, used where SkAtomics_atomic not supported

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

BUG=skia:

Review URL: https://codereview.chromium.org/896553002
2015-02-02 12:22:07 -08:00
bungeman
5f213d9627 SkTypeface to use SkStreamAsset.
SkTypeface already requires typeface streams to support SkStreamAsset
in practice, and in practice all users are already supplying them.

Review URL: https://codereview.chromium.org/869763002
2015-01-27 05:39:10 -08:00
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
djsollen@google.com
40078cb49e Android specific changes that are upstreamed from the android framework.
R=reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9283 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-24 20:31:57 +00:00
djsollen@google.com
bfae9d373c Add a fontConfig interface for android.
The contents of this CL are based on the SkFontHost_android.cpp found
in the android repository.

BUG=
R=reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9219 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-21 16:53:50 +00:00
commit-bot@chromium.org
c7a20e4093 API modifications needed to upstream Android font changes.
Committed: http://code.google.com/p/skia/source/detail?r=9083

R=reed@google.com

Author: djsollen@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9107 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-13 14:09:13 +00:00
robertphillips@google.com
e55491d846 Reverting 9083 & 9084 due to Android failures
git-svn-id: http://skia.googlecode.com/svn/trunk@9085 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-09 22:47:33 +00:00
commit-bot@chromium.org
14451703f1 API modifications needed to upstream Android font changes.
R=reed@google.com

Author: djsollen@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9083 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-09 20:54:20 +00:00
commit-bot@chromium.org
e4faa14de8 Remove unused complex script support from android builds
R=reed@google.com

Author: djsollen@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9011 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-06 14:03:53 +00:00
skia.committer@gmail.com
e36a168d13 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@8819 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-23 07:01:29 +00:00
reed@google.com
f55061fd84 check-point for linux fontmgr impl
Review URL: https://codereview.chromium.org/14305007

git-svn-id: http://skia.googlecode.com/svn/trunk@8808 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-22 18:48:45 +00:00
reed@google.com
027fd204ad use SkDataTable to return familyNames for fontmgr
git-svn-id: http://skia.googlecode.com/svn/trunk@8781 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-19 20:45:30 +00:00
reed@google.com
0b9832653e forward declare SkTypeface
git-svn-id: http://skia.googlecode.com/svn/trunk@8623 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-11 18:27:26 +00:00
reed@google.com
aae71baa73 add SK_API to public classes for sharedlib build
git-svn-id: http://skia.googlecode.com/svn/trunk@8588 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-10 13:10:40 +00:00
robertphillips@google.com
21db1dbbce Temporary patch to get Chrome Windows compiling
git-svn-id: http://skia.googlecode.com/svn/trunk@8583 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-09 23:56:51 +00:00
reed@google.com
54c69147f9 extend FontConfigInterface to start to match new fontmgr design
Review URL: https://codereview.chromium.org/13297004

git-svn-id: http://skia.googlecode.com/svn/trunk@8575 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-09 15:54:52 +00:00
reed@google.com
964988f0e9 add matcher to fontstyleset
Review URL: https://codereview.chromium.org/13312002

git-svn-id: http://skia.googlecode.com/svn/trunk@8444 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-29 14:57:22 +00:00
reed@google.com
83787c55db impl part of SKFontMgr for mac
Here is some test code

    SkFontMgr* mgr = SkFontMgr::RefDefault();
    for (int i = 0; i < mgr->countFamilies(); ++i) {
        SkString familyName;
        mgr->getFamilyName(i, &familyName);
        SkDebugf("%s\n", familyName.c_str());
        SkFontStyleSet* styles = mgr->createStyleSet(i);
        for (int j = 0; j < styles->count(); ++j) {
            SkFontStyle fs;
            SkString styleName;
            styles->getStyle(j, &fs, &styleName);
            SkTypeface* face = styles->createTypeface(j);
            SkDebugf("    %s [%d %d] %x\n", styleName.c_str(), fs.weight(),
                     fs.width(), face);
        }
        styles->unref();
    }
    mgr->unref();
Review URL: https://codereview.chromium.org/13094005

git-svn-id: http://skia.googlecode.com/svn/trunk@8395 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-26 17:19:15 +00:00
reed@google.com
e8be73b2d3 oops, don't say static for an extern function
git-svn-id: http://skia.googlecode.com/svn/trunk@8387 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-26 12:32:03 +00:00
reed@google.com
1fa793fa6b remove SkFontHost::NextLogicalFont, and add android-specific function
SkAndroidNextLogicalTypeface



git-svn-id: http://skia.googlecode.com/svn/trunk@8386 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-26 12:29:05 +00:00
skia.committer@gmail.com
e60ed08a35 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@8383 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-26 07:01:04 +00:00
reed@google.com
95625dbcb6 check-point (early) for fontmgr stuff, not called.
git-svn-id: http://skia.googlecode.com/svn/trunk@8377 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-25 20:44:02 +00:00
reed@google.com
c452d82c82 move fontmgr into include/ports for now
git-svn-id: http://skia.googlecode.com/svn/trunk@8370 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-25 18:44:17 +00:00
reed@google.com
f210f505ff add new API for gdi fonts (not hooked up yet)
git-svn-id: http://skia.googlecode.com/svn/trunk@8253 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-20 14:15:52 +00:00
scroggo@google.com
bb281f7f96 Improvements/additions to SkImageCache/SkLazyPixelRef.
SkPurgeableImageCache:
New image cache that uses virtual memory to store the pixels. Combines
features of SkAshmemImageCache (which has been removed) with SkPurgeableMemoryBlock, which has android and Mac versions.

SkImageCache:
Modified the API. pinCache now returns a status out parameter which
states whether the pinned memory retained the old data. This allows
allocAndPinCache to only be used for allocations.
Add a new debug only interface to purge unpinned data.
Updates to documentation, clarifying behavior.
Changed CachedStatus to MemoryStatus

SkLruImageCache:
Implement the new function purgeAllUnpinnedCaches and change implementation
of pinCache for the new behavior.

SkLazyPixelRef:
Rewrite onLockPixels to account for the new behavior of pinCache.

BitmapFactoryTest:
Test the new SkPurgeableImageCache.
Write tests which directly test the SkImageCaches.
Create a larger bitmap, since some of the SkImageCaches are designed
to handle large bitmaps.

bench_ and render_pictures:
Consolidate lazy_decode_bitmap into one function.
Allow using a flag to specify using the purgeable image cache.
Clean up some #includes.

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

git-svn-id: http://skia.googlecode.com/svn/trunk@8207 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-18 21:37:39 +00:00
reed@google.com
8c9737e114 change FontIdentity to explicitly hold ttcIndex and ID, so we can use both in the
IPC version in chrome.



git-svn-id: http://skia.googlecode.com/svn/trunk@8005 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-06 13:06:03 +00:00
reed@google.com
d66045ec7d export getter for global instance of fontconfiginterfacedirect
git-svn-id: http://skia.googlecode.com/svn/trunk@7963 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-04 19:07:02 +00:00
reed@google.com
86a44b89c5 export api with SK_API
git-svn-id: http://skia.googlecode.com/svn/trunk@7962 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-04 17:26:02 +00:00
reed@google.com
f71a2335f9 use fontconfig fonthost for skia (in prep for using in chrome)
Review URL: https://codereview.chromium.org/12319150

git-svn-id: http://skia.googlecode.com/svn/trunk@7887 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-27 19:06:30 +00:00
reed@google.com
80f5465083 git-svn-id: http://skia.googlecode.com/svn/trunk@7856 2bbb7eff-a529-9590-31e7-b0007b416f81 2013-02-25 22:19:20 +00:00
reed@google.com
d71fe99fe4 check-point: skiafy SkFontHost_fontconfig from chrome
git-svn-id: http://skia.googlecode.com/svn/trunk@7852 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-25 20:38:07 +00:00
skia.committer@gmail.com
58433de862 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@7839 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-23 07:02:45 +00:00
scroggo@google.com
f8d7d27313 Create SkLazyPixelRef which performs lazy decoding.
The new pixel ref behaves similarly to SkImageRef, with some key differences:
It does not depend on the images project.
It requires an SkImageCache, which handles allocation and caching of the pixel
memory.
It takes a function signature for decoding which decodes into already allocated
pixel memory rather than into an SkBitmap.

Add two implementations of SkImageCache: SkLruImageCache and SkAshmemImageCache.

Replace SkSerializationHelpers::DecodeBitmap with SkPicture::InstallPixelRefProc,
and update sites that referenced it.

SkBitmapFactory now sets the pixel ref to a new object of the new
class SkLazyPixelRef, provided it has an SkImageCache for caching.

Provide an option to do lazy decodes in render_pictures and bench_pictures.

SkPicture:
Eliminate the default parameters in the constructor.
If a proc for decoding bitmaps is installed, use it to decode any encoded
data in subpictures.
When parsing deserializing subpictures, check for success.
When serializing subpictures, pass the picture's bitmap encoder to the
subpicture's call to serialize.

Update BitmapFactoryTest to test its new behavior.

BUG=https://code.google.com/p/skia/issues/detail?id=1008
BUG=https://code.google.com/p/skia/issues/detail?id=1009

Review URL: https://codereview.appspot.com/7060052

git-svn-id: http://skia.googlecode.com/svn/trunk@7835 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-22 21:38:35 +00:00
skia.committer@gmail.com
e16efc1882 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@7406 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-26 07:06:02 +00:00
djsollen@google.com
bae1712d2e Disable automatic font fallback of SkFontHost_android when building for WebKit
The internal font fallback mechanism prevents WebKit from getting
the properties of the actually used font. Disable the internal fallback
mechanism when building for WebKit and add SkGetFallbackFamilyNameForChar()
to let the upper level know the fallback font for individial characters.

This commits a change that was submitted for review by...
wangxianzhu1 @ https://codereview.appspot.com/6572059/

BUG=913 (http://code.google.com/p/skia/issues/detail?id=913)

Review URL: https://codereview.appspot.com/6640048

git-svn-id: http://skia.googlecode.com/svn/trunk@5866 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-09 19:26:59 +00:00
bungeman@google.com
4f45258d45 Delete SkStream_Win.h as it appears to never have been used.
https://code.google.com/p/skia/issues/detail?id=281


git-svn-id: http://skia.googlecode.com/svn/trunk@5781 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-03 04:46:10 +00:00
rmistry@google.com
fbfcd56021 Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/)
This CL is part I of IV (I broke down the 1280 files into 4 CLs).
Review URL: https://codereview.appspot.com/6485054

git-svn-id: http://skia.googlecode.com/svn/trunk@5262 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-23 18:09:54 +00:00
djsollen@google.com
5df2a99861 [android] Add an API to load customized font config for testing.
When running WebKit layout tests, we need to load some fonts from Linux to
match baselines of chromium linux. However, font config file is
hard-coded in Skia now. This change add an API to customize font config
in skia.

https://codereview.appspot.com/6296067/

git-svn-id: http://skia.googlecode.com/svn/trunk@4316 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-25 13:58:22 +00:00