Commit Graph

274 Commits

Author SHA1 Message Date
reed@android.com
ac98154faa add GetFileName api to SkFontHost
git-svn-id: http://skia.googlecode.com/svn/trunk@299 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-31 16:17:01 +00:00
reed@android.com
61608aaf93 fix #endif placement so it works when LCD support is not defined
git-svn-id: http://skia.googlecode.com/svn/trunk@298 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-31 14:52:54 +00:00
reed@android.com
4bda7a5e68 add opts for neon
git-svn-id: http://skia.googlecode.com/svn/trunk@297 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-30 20:40:47 +00:00
reed@android.com
ed7bd9b4d3 add opts files to the make
git-svn-id: http://skia.googlecode.com/svn/trunk@296 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-30 02:25:54 +00:00
reed@android.com
7d2e322bee add optimization table for blitproc functions
git-svn-id: http://skia.googlecode.com/svn/trunk@295 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-30 02:22:31 +00:00
reed@android.com
b6137c3139 remove auto-upscaling from base class (breaks model for allocators) but improve
the upscaling inside the png codec.



git-svn-id: http://skia.googlecode.com/svn/trunk@294 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-29 20:56:52 +00:00
agl@chromium.org
f18d876001 Add runtime detection for missing subpixel support in FreeType.
r291 added support for building on platforms where subpixel support
has been compiled out of FreeType. However, it turns out that there is
a common situation in which we build on platforms with subpixel
support, but have to run without it: people downloading Chromium from
the buildbots.

Because we this, we need a runtime solution. Modifying the conversion
routines for this seems suboptimal because the extra branches will
slow down everyone. So we probe subpixel support at runtime by trying
to install a low-pass filter. If we fail at this, then we map all the
SkScalerContext::Rec structures to remove subpixel mode.

http://codereview.appspot.com/98057


git-svn-id: http://skia.googlecode.com/svn/trunk@293 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-28 18:38:08 +00:00
agl@chromium.org
5ebd88eb24 Revert "Support subpixel text when FreeType is built without such support."
This reverts commit r291. It will be replaced with another solution in the next
commit.


git-svn-id: http://skia.googlecode.com/svn/trunk@292 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-28 18:38:04 +00:00
agl@chromium.org
ac3011c6d4 Support subpixel text when FreeType is built without such support.
On Fedora, at least, FreeType is built without subpixel support. It
tries to simulate subpixel mode by replicating the gray-values three
times. However, it fails to simulate the actions of the low-pass
filter and so doesn't add border around the glyphs. This patch adds a
compile-time constant, which is the number of bytes of filter border.
If this value is zero (because FreeType is simulating subpixel
support), then we add a transparent border ourselves when transforming
from FreeType rendered glyphs to masks.

http://codereview.appspot.com/96171


git-svn-id: http://skia.googlecode.com/svn/trunk@291 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-28 00:02:42 +00:00
reed@android.com
e2ca20740b ws fixes
use enum in getHinting() function, rather than hard-coded constants



git-svn-id: http://skia.googlecode.com/svn/trunk@290 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-27 16:39:38 +00:00
reed@android.com
e4d0bc0b57 add filterrec logic for subpixel and slight-hinting
git-svn-id: http://skia.googlecode.com/svn/trunk@289 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-24 19:53:20 +00:00
agl@chromium.org
e61238b4f6 Build fix: add FilterRec for Windows.
Since we don't control the settings on Windows, I believe we may just
as well filter everything.

TBR=reed

http://codereview.appspot.com/97070


git-svn-id: http://skia.googlecode.com/svn/trunk@288 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-23 21:10:32 +00:00
reed@android.com
bfbd4fff66 fix uninitialized library variable
git-svn-id: http://skia.googlecode.com/svn/trunk@287 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-23 17:44:41 +00:00
reed@android.com
41f8d4807b remove const from function return-type signature (useless, and generates gcc
warnings)



git-svn-id: http://skia.googlecode.com/svn/trunk@286 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-23 16:00:37 +00:00
reed@android.com
659aaf9e9a fix warnings (unused local var)
git-svn-id: http://skia.googlecode.com/svn/trunk@285 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-23 15:20:21 +00:00
agl@chromium.org
bd2724f672 Fix valgrind warnings triggered in vertical mode.
Now that Chrome is rendering subpixel text, I was able to try running
the renderer process under valgrind, which turned up a number of
issues.

First, I was calculating the stride of vertical LCD glyphs wrong
(typo).

Secondly, I was going horribly wrong when a glyph was being blitted at
the edge of a bitmap. I suspected something was wrong with the code,
but I wasn't clear enough with the structure of the code when writing
it to figure out what the correct solution was.

http://codereview.appspot.com/97059


git-svn-id: http://skia.googlecode.com/svn/trunk@284 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-22 21:50:59 +00:00
reed@android.com
36a4c2aa2d Add SkFontHost::FilterRect() which allows the font host to filter our request
before we turn it into a font-cache entry, for the cases where the scaler will
ignore and/or collapse certain feature requests (e.g. doesn't support all levels
of hinting)



git-svn-id: http://skia.googlecode.com/svn/trunk@283 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-22 19:52:11 +00:00
reed@android.com
f549369fcd rename SK_BUILD_SUBPIXEL to SK_SUPPORT_LCDTEXT to better match the name of the
feature (since we already have subpixel text support)

fix some debug-compile problems

update Makefile for lcd files



git-svn-id: http://skia.googlecode.com/svn/trunk@282 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-22 19:21:01 +00:00
reed@android.com
01f82da73b remove crufty #undefs
git-svn-id: http://skia.googlecode.com/svn/trunk@281 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-22 17:11:41 +00:00
reed@android.com
9da1ae3f35 fix NaN in path iterator
fix case where cubic is big/degenerate, and never returns a valid edge



git-svn-id: http://skia.googlecode.com/svn/trunk@280 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-22 17:06:15 +00:00
agl@chromium.org
f03642675e Typo fix.
git-svn-id: http://skia.googlecode.com/svn/trunk@279 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-21 18:58:43 +00:00
agl@chromium.org
84346211aa Remove unused variable to fix warning on Windows:
src\core\SkBlitter_ARGB32.cpp(362) : warning C4101: 'alpha32' : unreferenced local variable


git-svn-id: http://skia.googlecode.com/svn/trunk@278 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-21 18:07:42 +00:00
agl@chromium.org
1a18cdc85f Mac: fix SkFontHost_mac.cpp to work with the new hinting interface.
git-svn-id: http://skia.googlecode.com/svn/trunk@277 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-21 18:05:59 +00:00
agl@chromium.org
2db1177fd5 Delete duplicated code.
patch went wrong and duplicated SkFontHost.cpp.


git-svn-id: http://skia.googlecode.com/svn/trunk@276 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-21 17:52:08 +00:00
agl@chromium.org
309485b7b5 Subpixel glyph rendering support.
This patch adds support for rendering subpixel glyphs (using
Freetype). In order to control this rendering see
SkPaint::setLCDRenderText in SkPaint.h.

To setup the LCD mode, see SkFontHost::SetSubpixelOrientation and
SkFontHost::SetSubpixelOrder in SkFontHost.h.

This patch also adds more fine grained control over hinting (again,
only for Freetype currently). One can now control the hinting with
SkPaint::setHinting.


git-svn-id: http://skia.googlecode.com/svn/trunk@275 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-21 17:41:32 +00:00
reed@android.com
a380ae4a9a fix quickReject() to handle perspective correctly (i.e. transform forward into
dst-space, and perform the clip-test there).



git-svn-id: http://skia.googlecode.com/svn/trunk@274 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-21 01:17:02 +00:00
reed@android.com
aa9152abbc add special proc for repeat 16->16 filter bitmap shader
git-svn-id: http://skia.googlecode.com/svn/trunk@273 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-17 21:24:56 +00:00
reed@android.com
2a679d27f8 remove obsolete header
git-svn-id: http://skia.googlecode.com/svn/trunk@272 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-17 15:28:17 +00:00
reed@android.com
83f7bc30af remove conditional build flag for mipmaps
remove obsolete SkBitmapShader.cpp file



git-svn-id: http://skia.googlecode.com/svn/trunk@271 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-17 02:42:41 +00:00
reed@android.com
48534f96b9 first cut at support for HW-specific blits/etc.
git-svn-id: http://skia.googlecode.com/svn/trunk@270 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-16 20:53:26 +00:00
reed@android.com
9ce2257729 quick return if we just want the bounds
git-svn-id: http://skia.googlecode.com/svn/trunk@269 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-16 14:50:54 +00:00
reed@android.com
a44b4cc797 try our first special-case shaderproc
git-svn-id: http://skia.googlecode.com/svn/trunk@268 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-16 02:03:58 +00:00
reed@android.com
7a99eb1c63 add shaderprocs for all-in-one special blits (matrix+sampler)
git-svn-id: http://skia.googlecode.com/svn/trunk@267 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-16 01:13:14 +00:00
reed@android.com
b4f404ac41 handle cap==round for drawPoints
git-svn-id: http://skia.googlecode.com/svn/trunk@266 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-10 17:02:17 +00:00
reed@android.com
b602b8e533 tweaks to 16bit shaders
fix typo-bug in 4444 blend case



git-svn-id: http://skia.googlecode.com/svn/trunk@265 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-10 15:58:53 +00:00
reed@android.com
32a4249cbd make a deep copy in CreateCGImageRef if we're 565, but first upscale to 32bit.
this at least draws the right colors, since we're 565 and CG only supports 1555
(unless someone knows how to tell CG we're 565...)

Fix ws in picturerecord

Enable dither in sample gradients, so the 4444 case isn't so ugly



git-svn-id: http://skia.googlecode.com/svn/trunk@264 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-10 03:33:52 +00:00
reed@android.com
dafaf7ac4d speedup 16bit shaders in the blitRect case
faster 32->16 blend by using the expand_16 intermediate format



git-svn-id: http://skia.googlecode.com/svn/trunk@263 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-10 03:05:59 +00:00
reed@android.com
b4e22d62da check for underflow in restore() during picture record, and ignore it
git-svn-id: http://skia.googlecode.com/svn/trunk@262 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-09 15:20:25 +00:00
reed@android.com
1134426f6b respect preferred config when png is index-based
git-svn-id: http://skia.googlecode.com/svn/trunk@261 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-08 20:09:23 +00:00
reed@android.com
40443b2371 fix (aaaargh) white-space
git-svn-id: http://skia.googlecode.com/svn/trunk@260 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-08 15:11:19 +00:00
reed@android.com
31745581ca use scalarcomparetype in matrix tests, so we don't do anything tricky
(unnecessary) when floats are fast



git-svn-id: http://skia.googlecode.com/svn/trunk@259 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-08 14:46:11 +00:00
reed@android.com
187d559590 add dox for scalarcomparetype
use internal mutable version of drawPath when we've cons'd up a path on behalf
of a rect



git-svn-id: http://skia.googlecode.com/svn/trunk@258 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-08 14:03:56 +00:00
reed@android.com
24fc56f7b1 initial golden-master images for gm tool
git-svn-id: http://skia.googlecode.com/svn/trunk@257 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-08 03:00:42 +00:00
reed@android.com
b9b9a18ab4 use genericRGB space to ensure that we decode exactly the pixels we encode
add -r option to gm to read and compare against known images



git-svn-id: http://skia.googlecode.com/svn/trunk@256 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-08 02:54:47 +00:00
reed@android.com
9dc5465c1c check if the encoder factory returned null
git-svn-id: http://skia.googlecode.com/svn/trunk@255 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-07 21:18:10 +00:00
reed@android.com
6189877c50 add support for encoding Index8 bitmaps into png
git-svn-id: http://skia.googlecode.com/svn/trunk@254 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-07 19:38:01 +00:00
reed@android.com
3d06a8c38d add FIXME to comment
git-svn-id: http://skia.googlecode.com/svn/trunk@253 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-07 18:19:59 +00:00
reed@android.com
e18f9dff7a initialize fShapeCount in init()
git-svn-id: http://skia.googlecode.com/svn/trunk@252 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-07 13:25:15 +00:00
reed@android.com
084ad42b91 fix white-space
git-svn-id: http://skia.googlecode.com/svn/trunk@251 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-07 13:20:37 +00:00
deanm@chromium.org
da94699149 Optimize some alpha blending modes.
- Inline the component calculation helpers.
- Reorder the computation in plus_modeproc.

This doubles the performance of plus_modeproc.

Review URL: http://codereview.appspot.com/88084


git-svn-id: http://skia.googlecode.com/svn/trunk@250 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-03 12:54:24 +00:00