Commit Graph

853 Commits

Author SHA1 Message Date
tomhudson@google.com
8dd90a926a (SSE2) acceleration for rectangular opaque erases.
15% speedup for rectangles < 31 px wide, 5% for larger.

http://codereview.appspot.com/5843050/



git-svn-id: http://skia.googlecode.com/svn/trunk@3423 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-03-19 13:49:50 +00:00
bsalomon@google.com
dddf6f6363 Skip unnecessary copies in GrPaint operator ==
Review URL: http://codereview.appspot.com/5846046/



git-svn-id: http://skia.googlecode.com/svn/trunk@3417 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-03-16 17:50:37 +00:00
reed@google.com
80e1459c32 add IRect variant of getBounds()
git-svn-id: http://skia.googlecode.com/svn/trunk@3414 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-03-16 14:58:07 +00:00
reed@google.com
0beaba5b34 decal mode babystep
git-svn-id: http://skia.googlecode.com/svn/trunk@3413 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-03-16 14:38:06 +00:00
bsalomon@google.com
f4a9c82918 Split GrTextContext into baseclass and subclass
This is a step towards enabling alternate text rendering code paths (GLyphy in particular)

Committed on behalf of baranowski@chromium.org

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



git-svn-id: http://skia.googlecode.com/svn/trunk@3412 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-03-16 14:02:46 +00:00
reed@google.com
fb2d3c6981 forward declare SkRect
git-svn-id: http://skia.googlecode.com/svn/trunk@3410 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-03-15 21:18:11 +00:00
reed@google.com
86b2e43a33 add getBounds() helper
git-svn-id: http://skia.googlecode.com/svn/trunk@3409 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-03-15 21:17:03 +00:00
djsollen@google.com
ff029606bd Add CreateFallbackForScript to SkTypeface for Android.
WebKit uses HarfBuzz directly to do Complex Text Layout, so it needs to get the
proper SkTypeface to pass it to HarfBuzz. However, on Android, fallback scripts
have no name, and we can only get them by file name each time (CreateFromFile).
This actually breaks the semantics of SkTypeface, which states 'The ID should
be unique for the underlying font file/data, not unique per typeface instance.'

And add 2 helper function to convert between FallbackScripts enum and font file
name. These are useful for WebKit's FontCache, which needs string as key.

https://codereview.appspot.com/5797066/

git-svn-id: http://skia.googlecode.com/svn/trunk@3403 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-03-15 15:49:51 +00:00
tomhudson@google.com
601d312bd4 Expand SkMatrix type mask from uint8 to uint32, aligning the struct
so there's no uninitialized padding and potentially allowing future
expansion.

http://codereview.appspot.com/5824056/
http://code.google.com/p/skia/issues/detail?id=354



git-svn-id: http://skia.googlecode.com/svn/trunk@3395 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-03-15 13:07:25 +00:00
reed@google.com
49794c0cbd make commonBitmap un-virtual. That was a leftover from previous subclassing
I think.



git-svn-id: http://skia.googlecode.com/svn/trunk@3394 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-03-15 12:10:47 +00:00
reed@google.com
68bc6f7b45 add kUTF32_TextEncoding
git-svn-id: http://skia.googlecode.com/svn/trunk@3387 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-03-14 19:41:55 +00:00
vandebo@chromium.org
610f716b00 Fix four memory leaks uncovered by valgrinding gm tests.
All are triggered by PDF code.
 Two are missing unref's on SkData.
 One is a missing unref on a SkAdvancedTypefaceMetrics.
 The last is missing destruction of SkClipStack internal state.

BUG=526

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

git-svn-id: http://skia.googlecode.com/svn/trunk@3386 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-03-14 18:34:15 +00:00
reed@google.com
6adf79746f add SkFourByteInterp256 variant, when the caller has already scaled the last
parameter to 0..256



git-svn-id: http://skia.googlecode.com/svn/trunk@3362 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-03-12 14:25:18 +00:00
vandebo@chromium.org
188838c208 [PDF] Fix memory hungry inefficiency in pdf resource tracking.
When moving the content of a device into a PDF object like SkPDFFormXObject
or SkPDFShader does, we only need the top level resources in the new object's
resource list, not the recursive set of objects.  Otherwise, when you
put a form on a form on form, etc, references to the objects multiply.

This fixed http://crbug.com/117321

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

git-svn-id: http://skia.googlecode.com/svn/trunk@3360 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-03-09 22:16:58 +00:00
reed@google.com
4bc0a9db18 use higher precision (64bit) fixed-point for matrix proc
Review URL: https://codereview.appspot.com/5772044

git-svn-id: http://skia.googlecode.com/svn/trunk@3336 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-03-07 21:47:41 +00:00
senorblanco@chromium.org
3b4dd90282 Refactor Gaussian blur and morphology from SkGpuDevice into GrContext.
Review URL:  http://codereview.appspot.com/5720060/



git-svn-id: http://skia.googlecode.com/svn/trunk@3327 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-03-05 20:41:22 +00:00
bsalomon@google.com
84405e095c make skpaint2grpaint functions be local to skgpudevice.cpp
Review URL: http://codereview.appspot.com/5726061/



git-svn-id: http://skia.googlecode.com/svn/trunk@3322 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-03-05 19:57:21 +00:00
tomhudson@google.com
178b8e0b8c Add SK_OVERRIDE where appropriate.
http://codereview.appspot.com/5734044/



git-svn-id: http://skia.googlecode.com/svn/trunk@3318 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-03-05 18:29:23 +00:00
bsalomon@google.com
9b1517edc7 minor improvement, remove some conditionals in GrAAConvexPathRenderer
Review URL: http://codereview.appspot.com/5728060



git-svn-id: http://skia.googlecode.com/svn/trunk@3316 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-03-05 17:58:34 +00:00
bsalomon@google.com
c2099d2707 simplify GrPathRenderer interface
Review URL: http://codereview.appspot.com/5706053/



git-svn-id: http://skia.googlecode.com/svn/trunk@3312 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-03-02 21:26:50 +00:00
senorblanco@chromium.org
05054f1a78 Erode and dilate image filter effects, CPU and GPU implementations.
Review URL:  http://codereview.appspot.com/5656067/



git-svn-id: http://skia.googlecode.com/svn/trunk@3310 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-03-02 21:05:45 +00:00
bsalomon@google.com
c1dd88852a Better workaround for osx / nv bug
Review URL: http://codereview.appspot.com/5727044/



git-svn-id: http://skia.googlecode.com/svn/trunk@3308 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-03-02 20:36:18 +00:00
bsalomon@google.com
b4a4ab1e99 Remove offscreen supersampler.
THIS IS EXPECTED TO BREAK MANY GM TESTS. They will be rebaselined.

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



git-svn-id: http://skia.googlecode.com/svn/trunk@3305 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-03-02 18:57:25 +00:00
reed@google.com
10d2d4d106 move the post cleanup of the rec until after we wack it for maskfilter
git-svn-id: http://skia.googlecode.com/svn/trunk@3297 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-03-01 22:32:51 +00:00
reed@google.com
48a4cbc668 add experimental files to encapsulate device-level font settings
git-svn-id: http://skia.googlecode.com/svn/trunk@3292 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-03-01 19:21:11 +00:00
bsalomon@google.com
5ffd5baeef Workaround for chrome on mac buffer object performance issue.
Review URL: http://codereview.appspot.com/5713051/



git-svn-id: http://skia.googlecode.com/svn/trunk@3289 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-03-01 15:29:07 +00:00
reed@google.com
aefdd06271 move SKPaint's defaults (that might be configurable) into a header
git-svn-id: http://skia.googlecode.com/svn/trunk@3280 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-02-29 13:03:00 +00:00
junov@chromium.org
5e5a095a94 reverting r3268 because of test failures
git-svn-id: http://skia.googlecode.com/svn/trunk@3270 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-02-28 15:27:59 +00:00
junov@chromium.org
feba689917 SkDeferredCanvas, performance: small refactor to remove unnecessary conditional branches on all canvas API calls
REVIEW=http://codereview.appspot.com/5700086/



git-svn-id: http://skia.googlecode.com/svn/trunk@3268 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-02-28 15:02:06 +00:00
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