djsollen@google.com
92d2a299d2
reapply r3259 (that was reverted) with fix.
...
The SkASSERT was incorrect and failing on debug runs.
Review URL: https://codereview.appspot.com/5699071
git-svn-id: http://skia.googlecode.com/svn/trunk@3263 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-02-27 16:17:59 +00:00
junov@chromium.org
a907ac3e3e
Modify SkDeferredCanvas so that it uses its inherited SkCanvas to track matrix and clipping state
...
Removed 'virtual' from a few canvas methods that no longer need it thanks to this change.
BUG=http://code.google.com/p/skia/issues/detail?id=506
TEST=Canvas unit test
REVIEW=http://codereview.appspot.com/5697052/
git-svn-id: http://skia.googlecode.com/svn/trunk@3261 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-02-24 21:54:07 +00:00
djsollen@google.com
3cc0d8a6f0
reverting r3259 because of gm/test failure.
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3260 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-02-24 21:21:51 +00:00
djsollen@google.com
42bbef71c7
Enable quickRejectY in SkCanvas to be inlined.
...
This CL was tested against the picturePlayback bench and
showed an approx 10-13% improvement on Android when playing
back text.
Review URL: https://codereview.appspot.com/5687083
git-svn-id: http://skia.googlecode.com/svn/trunk@3259 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-02-24 21:03:42 +00:00
junov@chromium.org
0b5b0ce39c
reverting r3257 because of gm failure.
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3258 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-02-24 20:44:56 +00:00
junov@chromium.org
421bcc375a
Modify SkDeferredCanvas so that it uses its inherited SkCanvas to track matrix and clipping state
...
Removed 'virtual' from a few canvas methods that no longer need it thanks to this change.
BUG=http://code.google.com/p/skia/issues/detail?id=506
TEST=Canvas unit test
REVIEW=http://codereview.appspot.com/5697052/
git-svn-id: http://skia.googlecode.com/svn/trunk@3256 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-02-24 20:07:08 +00:00
bungeman@google.com
ddd0ed5607
Remove SkFontHost::ValidFontID PART 2: remove definition and skia callers not that Chrome's font host has been updated.
...
See also https://chromiumcodereview.appspot.com/9347043/
http://codereview.appspot.com/5654055/
git-svn-id: http://skia.googlecode.com/svn/trunk@3255 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-02-24 19:56:33 +00:00
reed@google.com
61c22047dc
add SkCreateDataProviderFromStream to SkCGUtils
...
implement SkFontHost create_from_file/stream using SkCGUtils
git-svn-id: http://skia.googlecode.com/svn/trunk@3249 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-02-24 15:29:00 +00:00
junov@chromium.org
1cc8f6f3c4
Adding more unit testing for SkCanvas and derived classes.
...
BUG=http://code.google.com/p/skia/issues/detail?id=481
REVIEW=http://codereview.appspot.com/5674077/
TEST=unit test CanvasTest
git-svn-id: http://skia.googlecode.com/svn/trunk@3228 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-02-22 21:00:42 +00:00
djsollen@google.com
60abb078e5
Merge changes from the android repo upstream to Skia
...
Review URL: https://codereview.appspot.com/5545070
git-svn-id: http://skia.googlecode.com/svn/trunk@3199 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-02-15 18:49:15 +00:00
bsalomon@google.com
278dc6929b
Use cheapComputeDirection to determine normal facing in GrAAConvexPathRenderer
...
Review URL: http://codereview.appspot.com/5649083/
git-svn-id: http://skia.googlecode.com/svn/trunk@3198 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-02-15 16:52:51 +00:00
bsalomon@google.com
178964b6f6
Misc small fixes to unblock skia roll.
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3196 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-02-15 14:10:42 +00:00
tomhudson@google.com
d6770e69e0
SSE2 version of blit_lcd16, courtesy of Jin Yang.
...
Yields 25-30% speedup on Windows (32b), 4-7% on Linux (64b, less register
pressure), not invoked on Mac (lcd text is 32b instead of 16b).
Followup: GDI system settings on Windows can suppress LCD text for small
fonts, interfering with our benchmarks.
(http://code.google.com/p/skia/issues/detail?id=483 )
http://codereview.appspot.com/5617058/
git-svn-id: http://skia.googlecode.com/svn/trunk@3189 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-02-14 16:01:15 +00:00
tomhudson@google.com
6bf38b59c9
Move GL-specific include files to their own subdirectory, to better
...
coexist alongside D3D backend.
Requires gyp change.
http://codereview.appspot.com/5665045/
git-svn-id: http://skia.googlecode.com/svn/trunk@3185 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-02-14 15:11:59 +00:00
junov@chromium.org
8f9ecbd346
Adding API and unit testing for deferred canvas clearing/purging
...
REVIEW=http://codereview.appspot.com/5646057/
TEST=DeferredCanvas unit test
git-svn-id: http://skia.googlecode.com/svn/trunk@3181 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-02-13 21:53:45 +00:00
reed@google.com
813d38b7a0
if SK_USE_COLOR_LUMINANCE is defined, then we store 2 bits of each component
...
to create a per-component-luminance value for the fonthost to use. Only supported
on Mac at the moment (but still disabled by default)
git-svn-id: http://skia.googlecode.com/svn/trunk@3180 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-02-13 21:37:57 +00:00
bsalomon@google.com
96399948dc
Use GrGLContextInfo in shader generator
...
Review URL: http://codereview.appspot.com/5645083/
git-svn-id: http://skia.googlecode.com/svn/trunk@3170 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-02-13 14:39:16 +00:00
thakis@chromium.org
2857a784f7
Remove extra SK_API
...
(It's already on the class, not needed on the method too.)
Review URL: http://codereview.appspot.com/5649057/
Patch from Dominic Mazzoni <dmazzoni@chromium.org>!
git-svn-id: http://skia.googlecode.com/svn/trunk@3169 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-02-10 22:49:31 +00:00
reed@google.com
ce6dbb6b4c
enable color-luminance in font cache (disabled by default)
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3168 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-02-10 22:01:45 +00:00
bsalomon@google.com
b447d21577
Fix dumb error of starting loop with 0 instead of 1 that uses shift to increment.
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3163 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-02-10 20:25:36 +00:00
bsalomon@google.com
89ec61e33d
Add GrGLContextInfo
...
Review URL: http://codereview.appspot.com/5653060/
git-svn-id: http://skia.googlecode.com/svn/trunk@3162 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-02-10 20:05:18 +00:00
thakis@chromium.org
368b419200
Mark SkColorFilter and SkCreateCGImageRefWithColorspace as SK_API.
...
Required for the chromium/mac components build.
BUG=chromium:90078
Review URL: https://codereview.appspot.com/5642073/
git-svn-id: http://skia.googlecode.com/svn/trunk@3160 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-02-09 22:09:41 +00:00
senorblanco@chromium.org
dfad3832cb
Add SK_API to SkPixelRef and TextureCacheEntry.
...
Review URL: http://codereview.appspot.com/5649044/
git-svn-id: http://skia.googlecode.com/svn/trunk@3158 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-02-09 16:07:08 +00:00
bsalomon@google.com
6e85937606
Make SkGLContext's FBO creation more robust (allows test apps to run on Intel GPUs)
...
Review URL: http://codereview.appspot.com/5647059/
git-svn-id: http://skia.googlecode.com/svn/trunk@3157 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-02-09 15:25:13 +00:00
senorblanco@chromium.org
297676545d
Export the texture pixelref classes via SK_API. This is necessary to reference
...
them from another DLL in the windows shared build.
Review URL: http://codereview.appspot.com/5646056/
git-svn-id: http://skia.googlecode.com/svn/trunk@3155 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-02-08 20:27:16 +00:00
vandebo@chromium.org
f724c4df1c
Add SK_API to SkTableColorFilter
...
Patch from dmazzoni@chromium.org original CL: http://codereview.appspot.com/5645055/
Review URL: https://codereview.appspot.com/5642060
git-svn-id: http://skia.googlecode.com/svn/trunk@3153 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-02-08 17:01:54 +00:00
reed@google.com
e7a0a16599
store luminance in a new field
...
Review URL: https://codereview.appspot.com/5644047
git-svn-id: http://skia.googlecode.com/svn/trunk@3149 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-02-07 21:25:33 +00:00
junov@chromium.org
1f9767c03b
Fixing backing store access in SkDeferredCanvas.
...
Chromium CL required for rolling skia DEPS past this change is posted here: https://chromiumcodereview.appspot.com/9341003/
BUG=http://code.google.com/p/skia/issues/detail?id=475
REVIEW=http://codereview.appspot.com/5626047/
TEST=DeferredCanvas unit test
git-svn-id: http://skia.googlecode.com/svn/trunk@3147 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-02-07 16:27:57 +00:00
bsalomon@google.com
4bcb0c6e03
Reland 3144 with assertion fix.
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3146 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-02-07 16:06:47 +00:00
bsalomon@google.com
0439e56996
revert 3144
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3145 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-02-07 15:57:36 +00:00
bsalomon@google.com
aa67735579
Allow chrome to limit the number of FBO status checks
...
Review URL: https://codereview.appspot.com/5635052
git-svn-id: http://skia.googlecode.com/svn/trunk@3144 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-02-07 15:44:39 +00:00
junov@chromium.org
2c23708e44
Removing some dead code in SkDeferredCanvas
...
REVIEW=http://codereview.appspot.com/5620062/
git-svn-id: http://skia.googlecode.com/svn/trunk@3140 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-02-03 18:32:38 +00:00
bungeman@google.com
f8d1aee252
Open type table definitions.
...
http://codereview.appspot.com/5577064/
git-svn-id: http://skia.googlecode.com/svn/trunk@3131 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-02-02 19:15:21 +00:00
bsalomon@google.com
75f9f25d8b
Add code path for Gr client to resolve an Gr-created MSAA render target.
...
Review URL: http://codereview.appspot.com/5580049/
git-svn-id: http://skia.googlecode.com/svn/trunk@3112 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-31 13:35:56 +00:00
bsalomon@google.com
78d6cf9f43
Remove GrAALevel enum, use explicit sample count
...
Review URL: http://codereview.appspot.com/5600045/
git-svn-id: http://skia.googlecode.com/svn/trunk@3106 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-30 18:09:31 +00:00
reed@google.com
9efd9a048a
extend fastbounds impls to include maskfilters and drawloopers. This allows
...
us to perform quick-rejects when drawing objects with shadows (esp. text).
WebKit draws shadows w/ a looper (fg and shadow) and a maskfilter on the
shadow layer.
git-svn-id: http://skia.googlecode.com/svn/trunk@3103 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-30 15:41:43 +00:00
junov@chromium.org
bf6c1e4aff
Adding a flush method to SkCanvas
...
BUG=http://code.google.com/p/skia/issues/detail?id=467
REVIEW=http://codereview.appspot.com/5600044/
TEST=gm uses the new code path on all its test cases
git-svn-id: http://skia.googlecode.com/svn/trunk@3102 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-30 14:53:22 +00:00
bsalomon@google.com
7d72c45a9e
code cleanup for single_pass_path() and remove enum GrConvexHint
...
Review URL: code cleanup for single_pass_path() and remove enum GrConvexHint
git-svn-id: http://skia.googlecode.com/svn/trunk@3099 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-30 14:02:44 +00:00
vandebo@chromium.org
74b4619616
Formatting cleanup: remove extra whitespace
...
Change by arthurhsu@chromium.org , original CL: http://codereview.appspot.com/5587049/
Review URL: https://codereview.appspot.com/5594043
git-svn-id: http://skia.googlecode.com/svn/trunk@3098 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-28 01:45:11 +00:00
twiz@google.com
05e70247c3
Expose functionality to purge the GPU texture cache while running SampleApp.
...
Press 'p' to purge the cache. A summary of the number of bytes of video memory
released is output to the command prompt.
Review URL: https://codereview.appspot.com/5587045
git-svn-id: http://skia.googlecode.com/svn/trunk@3097 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-27 19:12:00 +00:00
bsalomon@google.com
b1caea00d8
Rip out GrPlatformSurface (has been deprecated for some time, use GrPlatformTexture or GrPlatformRenderTarget instead)
...
Review URL: http://codereview.appspot.com/5576052/
git-svn-id: http://skia.googlecode.com/svn/trunk@3094 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-27 00:47:24 +00:00
digit@google.com
1771cbf43d
posix: Avoid static initializers in static/global mutexes
...
This patch removes static initializers related to static and
global mutexes from the final library's machine code when
building on a pthread-capable system.
We use PTHREAD_MUTEX_INITIALIZER to perform POD-style
initialization. You need a line like the following to declare
a global mutex with it:
SkBaseMutex gMutex = { PTHREAD_MUTEX_INITIALIZER };
We introduce the SK_DECLARE_STATIC_MUTEX and SK_DECLARE_GLOBAL_MUTEX
macros to be able to declare static/global mutexes in the source tree
uniformly.
SkMutex is now defined as a sub-class of SkBaseMutex, with standard
construction/destruction semantics. This is useful if the mutex
object is a member of another C++ class, or allocated dynamically.
We also modify a few places to refer to SkBaseMutex instead of a
SkMutex, where it makes sense. Generally speaking, client code
should hold and use pointers to SkBaseMutex whenever they can
now.
We defined a new built-time macro named SK_USE_POSIX_THREADS
to indicate that we're using a pthread-based SkThread.h
interface. The macro will also be used in future patches
to implement other helper thread synchronization classes.
Finally, we inline the acquire() and release() functions in the
case of Posix to improve performance a bit.
Running: 'bench -repeat 10 -match mutex' on an Android device or
a 2.4GHz Xeon Linux desktop shows the following improvements:
Before After
Galaxy Nexus 1.64 1.45
Nexus S 1.47 1.16
Xoom 1.86 1.66
Xeon 0.36 0.31
This removes 5 static mutex initializers from the library
Review URL: https://codereview.appspot.com/5501066
git-svn-id: http://skia.googlecode.com/svn/trunk@3091 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-26 21:26:40 +00:00
reed@google.com
8bb3ba151e
need to include SkColorFilter.h since we reference some methods on it
...
in our inline functions.
git-svn-id: http://skia.googlecode.com/svn/trunk@3089 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-26 04:13:31 +00:00
reed@google.com
6d428d3e6e
Make SkRegion::operator== a member function, rather than a privately-declared
...
friend. Without this, calling code has access to operator==, but can fail to
link because the implementation is assumed to have static linkage.
http://codereview.appspot.com/5577047/
git-svn-id: http://skia.googlecode.com/svn/trunk@3088 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-25 21:53:53 +00:00
bsalomon@google.com
4f3c253ece
Add flag to disable gl error checking when allocating gpu objects
...
Review URL: http://codereview.appspot.com/5558052/
git-svn-id: http://skia.googlecode.com/svn/trunk@3075 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-19 16:16:52 +00:00
tomhudson@google.com
13e812c69a
Interpolate vertical linear gradients for improved quality.
...
Consolidate interpolation functions, add new faster more accurate dithering
interpolator.
git-svn-id: http://skia.googlecode.com/svn/trunk@3072 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-18 21:28:01 +00:00
bsalomon@google.com
dd1be60702
Pull xfer mode test out of generic draw-as-hairline test. Use coverage rather than alpha to draw hairlines < 1pix wide in GPU.
...
Review URL: http://codereview.appspot.com/5528112/
git-svn-id: http://skia.googlecode.com/svn/trunk@3070 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-18 20:34:00 +00:00
schenney@chromium.org
f4b07328df
Somehow this change was missing from the previous commit.
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3063 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-18 18:06:10 +00:00
schenney@chromium.org
a6d04d90e2
Fixing the behavior of SkPathMeasure to reflect changes in SkPath::Iter.
...
This implementation modifies SkPath::Iter extensively to avoid copying
the points when used to measure path length.
BUG=446
TEST=tests/PathMeasureTest.cpp
Review URL: https://codereview.appspot.com/5533074
git-svn-id: http://skia.googlecode.com/svn/trunk@3062 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-18 18:02:10 +00:00
reed@google.com
8351aabbfe
add GenA8FromLCD as a hack to force GDI to create the A8 mask from the LCD
...
results, rather than asking GDI directly for A8 (which it sometimes decides
to interpret as BW)
git-svn-id: http://skia.googlecode.com/svn/trunk@3061 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-18 17:06:35 +00:00