Commit Graph

31647 Commits

Author SHA1 Message Date
reed@android.com
4c128c4917 add method to compute max count for a given buffer size in the bitmap shader.
fix bug in quad loop of fill_sequential where we were going one quad too far.



git-svn-id: http://skia.googlecode.com/svn/trunk@322 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-08-14 13:54:37 +00:00
reed@android.com
a3122b9b1e bzero SkPaint in its constructor, to allow us to cleanly use memcmp in our
operator==, given that we may be padded and not know how to init those pad bytes



git-svn-id: http://skia.googlecode.com/svn/trunk@321 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-08-13 20:38:25 +00:00
reed@android.com
07d1f008b3 add special matrixprocs when the matrix is at most translate. These are faster
(somewhat) than their scale counterparts, but are also numerically exact for
any size bitmaps. The scale versions, because they operate in a scaled 65535
space, are not always exact for large images (due to SK_Fixed1 / width) loss of
bits



git-svn-id: http://skia.googlecode.com/svn/trunk@320 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-08-13 19:35:48 +00:00
reed@android.com
f7d5726730 test for non-scaled bitmap tiles
git-svn-id: http://skia.googlecode.com/svn/trunk@319 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-08-13 19:33:44 +00:00
reed@android.com
4d85059920 add benchmark for repeat-tile bitmaps
git-svn-id: http://skia.googlecode.com/svn/trunk@318 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-08-12 20:30:58 +00:00
senorblanco@chromium.org
feef49c4d1 Add some SkASSERT's, to try to track down a reliability issue in Chrome.
http://codereview.appspot.com/105075
http://crbug.com/17569



git-svn-id: http://skia.googlecode.com/svn/trunk@317 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-08-12 20:21:49 +00:00
reed@android.com
0c1cda7e6b remove unneeded (empty) virtual destructor
git-svn-id: http://skia.googlecode.com/svn/trunk@316 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-08-12 18:51:06 +00:00
reed@android.com
95dbb9c038 fixes wacky build on android. no other explanation received
git-svn-id: http://skia.googlecode.com/svn/trunk@315 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-08-11 20:01:33 +00:00
reed@android.com
fb03cc7b49 fix validate() to note that an empty path can (by side-effect) have an empty but
translated fBounds



git-svn-id: http://skia.googlecode.com/svn/trunk@314 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-08-11 19:54:35 +00:00
agl@chromium.org
558434a9e1 FreeType: fix garbled bitmap glyphs.
At some point (probably in one of the LCD patches), the fMaskFormat
for bitmap glyphs changed from kA8 to kBW. Formerly, bitmap glyphs
were always transformed into A8 format. With this patch, we check the
fMaskFormat and pick the correct transform at run time.

http://code.google.com/p/chromium/issues/detail?id=18531
http://codereview.appspot.com/104071


git-svn-id: http://skia.googlecode.com/svn/trunk@313 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-08-11 17:22:38 +00:00
agl@chromium.org
4484d23ab4 Remove assertion in getAddrLCD.
Because the underlying mask extends a pixel to the left and right (or
top and bottom on vertical LCDs), the requested pixel can actaully be
one pixel outside the bounds, thus this assertion is incorrect.

http://codereview.appspot.com/105077


git-svn-id: http://skia.googlecode.com/svn/trunk@312 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-08-11 17:21:21 +00:00
reed@android.com
cd21c809a9 remove dead code
git-svn-id: http://skia.googlecode.com/svn/trunk@311 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-08-11 15:35:36 +00:00
agl@chromium.org
e0d089900e FreeType: don't use bitmap strikes when antialiasing
If the user requested anti-aliasing then we don't use bitmap strikes
in the font. The consensus among our Japanese users is that this
results in the best quality.

http://code.google.com/p/chromium/issues/detail?id=18333

http://codereview.appspot.com/105050


git-svn-id: http://skia.googlecode.com/svn/trunk@310 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-08-07 19:19:23 +00:00
reed@android.com
152f748386 more neon work:
- remove neon-specific functions that were not faster than the C version
- move the neon filter function to its own header, so it could be use in more places



git-svn-id: http://skia.googlecode.com/svn/trunk@309 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-08-07 19:14:34 +00:00
reed@android.com
cf45bf8439 update make for nwaycanvas
remove obsolete opts_neon dir



git-svn-id: http://skia.googlecode.com/svn/trunk@308 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-08-04 19:21:28 +00:00
reed@android.com
29348cb061 add -forceFilter to bench tool
move some utils out of effects/



git-svn-id: http://skia.googlecode.com/svn/trunk@307 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-08-04 18:17:15 +00:00
reed@android.com
6123e47e62 add proper includes for arm optimizations
git-svn-id: http://skia.googlecode.com/svn/trunk@306 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-08-04 01:52:27 +00:00
reed@android.com
387359e348 add -config foo to restrict the output to just the specific config
add -match foo to restrict the benchmarks to those whose names match foo



git-svn-id: http://skia.googlecode.com/svn/trunk@305 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-08-04 01:51:09 +00:00
reed@android.com
c714479548 remove noisy font table tests from TextBench
git-svn-id: http://skia.googlecode.com/svn/trunk@304 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-08-04 01:25:44 +00:00
reed@android.com
a0bd7f48aa arm/neon optimizations for bitmap shader
original version by ARM LIMITED 2009



git-svn-id: http://skia.googlecode.com/svn/trunk@303 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-08-03 17:22:46 +00:00
reed@android.com
afb055ad79 update
git-svn-id: http://skia.googlecode.com/svn/trunk@302 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-08-03 15:06:11 +00:00
reed@android.com
c9a1d4b519 add platformProcs() porting function
git-svn-id: http://skia.googlecode.com/svn/trunk@301 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-08-03 15:05:55 +00:00
reed@android.com
eef375bcd6 clean up SkBitmapProcState in preparation for adding porting-layer functions
git-svn-id: http://skia.googlecode.com/svn/trunk@300 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-08-03 14:45:45 +00:00
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