Commit Graph

824 Commits

Author SHA1 Message Date
junov@google.com
4370aedf7f Adding class SkDeferredCanvas for deferred rendering.
TEST=added a new pass to gm, so all gm tests are run through SkDeferredCanvas
REVIEW=http://codereview.appspot.com/5430058/



git-svn-id: http://skia.googlecode.com/svn/trunk@3059 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-18 16:21:08 +00:00
reed@google.com
d335d1d784 automatically inject a moveTo if we see a close followed by a line/quad/cubic
git-svn-id: http://skia.googlecode.com/svn/trunk@3027 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-12 18:17:11 +00:00
reed@google.com
dcbd6e358a remove unused bool param to SkMutex constructor
git-svn-id: http://skia.googlecode.com/svn/trunk@3025 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-12 15:21:16 +00:00
bsalomon@google.com
dafde9e2c1 Remove shadersupport caps bit
Review URL: http://codereview.appspot.com/5528076/



git-svn-id: http://skia.googlecode.com/svn/trunk@3015 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-11 18:45:39 +00:00
digit@google.com
f66436cff7 android: optimize atomics routines
This patch provides a slightly optimized implementation of
atomic increment/decrement functions by using static inlined
versions of the gcc intrinsics.
Review URL: http://codereview.appspot.com/5498069

git-svn-id: http://skia.googlecode.com/svn/trunk@3012 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-11 17:44:41 +00:00
senorblanco@chromium.org
c79fd6ea3f Export SkColorMatrixFilter via SK_API.
Review URL:  http://codereview.appspot.com/5534064/



git-svn-id: http://skia.googlecode.com/svn/trunk@3006 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-10 21:56:40 +00:00
reed@google.com
69a9943b67 add SkPath::cheapComputeDirection() plus unittests
git-svn-id: http://skia.googlecode.com/svn/trunk@2996 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-10 18:00:10 +00:00
reed@google.com
63d73749fb add SkPath::reverseAddPath()
git-svn-id: http://skia.googlecode.com/svn/trunk@2995 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-10 15:33:12 +00:00
djsollen@google.com
a44e6c6b53 Add ARM optimizations to the build.
Also had to fix a problem in the ARM memset code that was
causing some tests and bench to fail.
Review URL: http://codereview.appspot.com/5522052

git-svn-id: http://skia.googlecode.com/svn/trunk@2989 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-09 14:38:25 +00:00
reed@google.com
b55deeb1c7 add allowImageFilter() so a device can allow/disallow filters
(esp. for printing)



git-svn-id: http://skia.googlecode.com/svn/trunk@2981 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-06 14:43:09 +00:00
reed@google.com
76dd277b1f add filterImage() entry-point to SkDevice, to allow it to specialize on subclasses
of SkImageFilter. If that returns false, then the filter itself is invoked.



git-svn-id: http://skia.googlecode.com/svn/trunk@2977 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-05 21:15:07 +00:00
reed@google.com
7191840eec add asComponentTable() query (will impl in SkTableColorFilter next)
git-svn-id: http://skia.googlecode.com/svn/trunk@2971 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-05 17:24:35 +00:00
caryclark@google.com
d53f7c28bf make getOrigin() public so callers can adjust layer
git-svn-id: http://skia.googlecode.com/svn/trunk@2970 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-05 17:05:05 +00:00
bsalomon@google.com
280e99f1a6 Add support for GL texture storage
Review URL: http://codereview.appspot.com/5462046/



git-svn-id: http://skia.googlecode.com/svn/trunk@2966 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-05 16:17:38 +00:00
mike@reedtribe.org
f58f9f62d7 remove as these are replaced by SkJSON
git-svn-id: http://skia.googlecode.com/svn/trunk@2965 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-05 03:10:59 +00:00
schenney@chromium.org
6630d8d8ea Add the ability to iterate through a path without modification. This change is
required by WebKit SVG in order to correctly draw markers and endcaps.

BUG=415
TEST=TestPath in the unit tests
Review URL: http://codereview.appspot.com/5505097

git-svn-id: http://skia.googlecode.com/svn/trunk@2962 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-04 21:05:51 +00:00
mike@reedtribe.org
0e3c9caae5 add count(), fix bad llist logic in remove()
git-svn-id: http://skia.googlecode.com/svn/trunk@2958 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-04 11:37:46 +00:00
mike@reedtribe.org
e4058b402f add Object::remove, some dox, leak debugging code
git-svn-id: http://skia.googlecode.com/svn/trunk@2957 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-04 03:37:40 +00:00
senorblanco@chromium.org
50bdad85db Implement the color matrix filter in Ganesh. Also, fix and enable the color
matrix test slide.  This was basically implemented in the same places where
the blending-based color filter was being done.  The shader simply does a mat4
matrix multiply and a vec4 add.

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



git-svn-id: http://skia.googlecode.com/svn/trunk@2948 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-03 20:51:57 +00:00
reed@google.com
abf00aaaa0 expose isSubpixel() on the cache, so SkDraw can know if it should expect
subpixel text (it may be that the paint requested it, but the scaler ignored it)



git-svn-id: http://skia.googlecode.com/svn/trunk@2946 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-03 19:43:20 +00:00
tomhudson@google.com
d5d9dadcdd Update header comments to more accurately describe behavior of
SkRegion::getBoundaryPath(). Add SkASSERT of SkPath argument for safety.

codereview.appspot.com/5504095/



git-svn-id: http://skia.googlecode.com/svn/trunk@2942 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-03 14:52:37 +00:00
mike@reedtribe.org
0f175a6dab experiment #2 for JSON data
git-svn-id: http://skia.googlecode.com/svn/trunk@2940 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-02 00:34:50 +00:00
mike@reedtribe.org
41f1c46ddc add experimental class for json
git-svn-id: http://skia.googlecode.com/svn/trunk@2939 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-12-31 01:58:40 +00:00
schenney@chromium.org
72785c4c89 Fix problems with SampleApp Fuzzer due to issues in iterating over degenerate paths.
The fuzzer gets my vote as best test tool ever.

There are several issues outstanding: crashes in FixedPoint and a crash in the
path filling code that is most likely due to clipping problems (but maybe not).

BUG=425
Review URL: http://codereview.appspot.com/5503080

git-svn-id: http://skia.googlecode.com/svn/trunk@2936 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-12-29 21:03:28 +00:00
tomhudson@google.com
a31ac73b8e Tighten up restrictions on blit width: some shaders assert that they
are addressing more than 0 pixels.
codereview.appspot.com/5489125/



git-svn-id: http://skia.googlecode.com/svn/trunk@2935 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-12-29 16:09:31 +00:00
mike@reedtribe.org
a69b48c29d Add SkTableColorFilter, as a foundation for several SVG filters
git-svn-id: http://skia.googlecode.com/svn/trunk@2933 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-12-28 20:31:00 +00:00
mike@reedtribe.org
7012162d2f add SK_OVERRIDE
git-svn-id: http://skia.googlecode.com/svn/trunk@2932 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-12-28 20:17:42 +00:00
tomhudson@google.com
4714359ec0 Bugfixes to antialiased blitting.
More details of blitter contracts in function headers.
New precautionary assert in one high-level default blitter.



git-svn-id: http://skia.googlecode.com/svn/trunk@2928 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-12-28 17:58:07 +00:00
tomhudson@google.com
0c00f21fee Add SkDEBUGFAIL to clean up use of SkASSERT(!"text");
catch a couple of latent SkASSERT("text") bugs.

http://codereview.appspot.com/5504090/



git-svn-id: http://skia.googlecode.com/svn/trunk@2926 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-12-28 14:59:50 +00:00
tomhudson@google.com
49eac192fa New 'blitAntiRect' entry point for blitters, specialized in supersampling
code to avoid quarter-scanline-at-a-time building of large rectangular
clips.

Speeds up aa_clip_build_path_AA benchmark 2x, aa_clip_build_rect_AA benchmark
10x or more. This is a sufficient performance gain to let Chromium reenable
WebKit's soft clipping code. Rolling into Chromium will require ~18
rebaselines.



git-svn-id: http://skia.googlecode.com/svn/trunk@2924 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-12-27 13:59:20 +00:00
schenney@chromium.org
b0af6dad94 Protecting changes to the SkPath iteration with an ifdef for Chromium.
Something is broken, and this will protect us while we sort it out.

Unreviewed.

git-svn-id: http://skia.googlecode.com/svn/trunk@2922 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-12-21 20:43:13 +00:00
reed@google.com
cf4b8181c9 declare IsVariationSelector to be inline, to fix warning
git-svn-id: http://skia.googlecode.com/svn/trunk@2917 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-12-21 16:31:23 +00:00
reed@google.com
419f43348a add SkUnichar_IsVariationSelector()
git-svn-id: http://skia.googlecode.com/svn/trunk@2915 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-12-21 15:21:32 +00:00
senorblanco@chromium.org
e5ff3cefe0 Implement SkColorFilter::asColorMatrix() virtual, and override in
SkColorMatrixFilter.  Implement missing SkColorMatrixFilter::setMatrix() and
setArray() functions (were in .h, just not implemented).  Add a gm for color
matrix filters.

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



git-svn-id: http://skia.googlecode.com/svn/trunk@2909 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-12-20 20:58:18 +00:00
caryclark@google.com
9d0c6ecb84 fix 'no static globals' for chromium
M    include/core/SkFlattenable.h
M    include/core/SkPixelRef.h
M    src/core/SkGraphics.cpp



git-svn-id: http://skia.googlecode.com/svn/trunk@2908 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-12-20 20:26:56 +00:00
senorblanco@chromium.org
ae814c7476 A software implementation of the Gaussian blur filter, using 3 box blurs. Also
re-enable the imageblur GM test, since the SkPicture path now works.

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



git-svn-id: http://skia.googlecode.com/svn/trunk@2905 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-12-20 20:02:19 +00:00
reed@google.com
32d25b6f5f initial impl of SkImageFilters : virtual signature will change!
Do not invest too much in other subclasses until this API solidifies.



git-svn-id: http://skia.googlecode.com/svn/trunk@2903 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-12-20 16:19:00 +00:00
schenney@chromium.org
4da06ab335 Modifying SkPath to store all verbs provided by the user, and to give
correct results for all stroke and fill modes even on the various types
of degenerate paths.

The goals of this patch include:
1. Have Skia store all of the verbs implied by path construction methods, even
if those define degenerate paths. The SVG implementation in WebKit, which is
backed by Skia, needs to know about all elements of the path, even degenerate
ones, for the correct drawing of markers and line caps. For example, in SVG you
should be able to draw a scatter plot by specifying a marker for vertices and
then giving a sequence of moveTo commands. Skia will not store the moveTos,
requiring a different storage mechanism.

2. Assuming 1, maintain the current Skia behavior. That is, make Skia robust to
degenerate paths.

3. Fix an existing bug in Skia where a degenerate moveTo-lineTo pair spits out
warnings from rasterization and produces incorrect results in inverse-fill
renderings.

4. Adds extensive testing for degenerate paths and path rendering in general.

To meet these goals, the patch I am proposing will result in minor additional
storage for degenerate paths (a few bytes per degenerate path, only if the user
defines such paths). There is also some additional overhead in the iteration
code, with the path now cleaned to remove degenerate segments as part of the
iteration process. I suspect this will also fix issues with computing normal
vectors to degenerate segments. Benchmarking suggests that this change may
result in slightly (< 1%) slower path drawing due to the checks for
degeneracy. This overhead could be removed (in fact, a significant speedup
could occur) if the results of iterating to clean up the path were cached.
This would cost memory, of course, and quite a bit of it.

BUG=398
TEST=tests/PathTest.cpp
     gm/cubicpaths.cpp
     gm/degeneratesegments.cpp
     gm/movepaths.cpp
     gm/linepaths.cpp
     gm/quadpaths.cpp
Review URL: http://codereview.appspot.com/5482051

git-svn-id: http://skia.googlecode.com/svn/trunk@2901 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-12-20 15:14:18 +00:00
reed@google.com
24569b5bad sk_float_round isn't a function, so call this instead: sk_float_floor((x) + 0.5f)
git-svn-id: http://skia.googlecode.com/svn/trunk@2895 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-12-16 20:53:22 +00:00
caryclark@google.com
f86ab8472e cleanup font purging functions
M    include/core/SkGraphics.h
M    src/core/SkGraphics.cpp



git-svn-id: http://skia.googlecode.com/svn/trunk@2887 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-12-16 17:11:17 +00:00
junov@chromium.org
b052129a41 Exposing the isImmutable/setImmutable API of SkPixelRef in SkBitmap
REVIEW=http://codereview.appspot.com/5491055/



git-svn-id: http://skia.googlecode.com/svn/trunk@2883 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-12-15 20:14:06 +00:00
caryclark@google.com
d26147adbb add optional manual global initialization
M    include/effects/SkAvoidXfermode.h
M    include/effects/SkDiscretePathEffect.h
M    include/effects/Sk1DPathEffect.h
M    include/effects/Sk2DPathEffect.h
M    include/effects/SkBlurDrawLooper.h
M    include/effects/SkPixelXorXfermode.h
M    include/effects/SkDashPathEffect.h
M    include/effects/SkColorMatrixFilter.h
M    include/effects/SkEmbossMaskFilter.h
M    include/effects/SkLayerDrawLooper.h
M    include/effects/SkGroupShape.h
M    include/effects/SkBlurImageFilter.h
M    include/effects/SkRectShape.h
A    include/effects/SkEffects.h
M    include/effects/SkCornerPathEffect.h
M    include/effects/SkGradientShader.h
M    include/effects/SkBlurMaskFilter.h
M    include/effects/SkLayerRasterizer.h
M    include/core/SkMallocPixelRef.h
M    include/core/SkFlattenable.h
M    include/core/SkShape.h
M    include/core/SkPixelRef.h
M    include/core/SkGraphics.h
M    include/core/SkPathEffect.h
M    include/core/SkPostConfig.h
M    include/core/SkXfermode.h
M    include/core/SkColorFilter.h
M    include/images/SkFlipPixelRef.h
M    include/images/SkImageRef_GlobalPool.h
M    src/effects/SkDashPathEffect.cpp
M    src/effects/SkColorMatrixFilter.cpp
M    src/effects/SkBlurImageFilter.cpp
M    src/effects/SkGroupShape.cpp
M    src/effects/SkCornerPathEffect.cpp
M    src/effects/SkGradientShader.cpp
M    src/effects/SkBlurMaskFilter.cpp
M    src/effects/SkAvoidXfermode.cpp
M    src/effects/Sk2DPathEffect.cpp
M    src/effects/SkBlurDrawLooper.cpp
M    src/effects/SkPixelXorXfermode.cpp
M    src/effects/SkColorFilters.cpp
M    src/effects/SkLayerDrawLooper.cpp
M    src/effects/SkRectShape.cpp
A    src/effects/SkEffects.cpp
M    src/effects/SkLayerRasterizer.cpp
M    src/effects/SkDiscretePathEffect.cpp
M    src/effects/Sk1DPathEffect.cpp
A    src/effects/SkEffects_none.cpp
M    src/core/SkPixelRef.cpp
M    src/core/SkGraphics.cpp
M    src/core/SkFlattenable.cpp
M    src/core/SkBitmapProcShader.h
M    src/core/SkPathEffect.cpp
M    src/core/SkShape.cpp
M    src/core/SkXfermode.cpp
M    src/core/SkMallocPixelRef.cpp
M    src/core/SkBitmapProcShader.cpp
M    src/images/SkFlipPixelRef.cpp
M    src/images/SkImageRef_GlobalPool.cpp
A    src/ports/SkGlobalInitialization_chromium.cpp
M    src/ports/SkImageRef_ashmem.h
M    src/ports/SkImageRef_ashmem.cpp
A    src/ports/SkGlobalInitialization_default.cpp
M    gyp/effects.gyp
M    gyp/tools.gyp
M    gyp/ports.gyp



git-svn-id: http://skia.googlecode.com/svn/trunk@2876 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-12-15 14:16:43 +00:00
reed@google.com
7c2029367c add canvas::isDrawingToLayer(), as a fast query for chrome; faster than
setting up a drawiter and counting the layers.



git-svn-id: http://skia.googlecode.com/svn/trunk@2875 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-12-14 18:48:05 +00:00
bsalomon@google.com
aa814fe4a1 Access sampler matrices directly, cleanup GrSamplerState::reset()s
Review URL: http://codereview.appspot.com/5488048/


git-svn-id: http://skia.googlecode.com/svn/trunk@2854 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-12-12 18:45:07 +00:00
bsalomon@google.com
1e266f8ff2 Remove GrDrawState::setSampler, use direct access to sampler
Review URL: http://codereview.appspot.com/5476052/



git-svn-id: http://skia.googlecode.com/svn/trunk@2852 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-12-12 16:11:33 +00:00
bsalomon@google.com
1fadb20c50 Remove static initiazled gClampNearest in gpu backend
Review URL: http://codereview.appspot.com/5487044/


git-svn-id: http://skia.googlecode.com/svn/trunk@2851 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-12-12 16:10:08 +00:00
mike@reedtribe.org
e51755fc64 add first cut at arithmetic mode
git-svn-id: http://skia.googlecode.com/svn/trunk@2849 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-12-10 19:36:56 +00:00
djsollen@google.com
59204b4813 Closing fd for mmap after mapping succeeds.
Review URL: http://codereview.appspot.com/5467058

git-svn-id: http://skia.googlecode.com/svn/trunk@2847 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-12-09 21:19:38 +00:00
bsalomon@google.com
07dd2bfd74 Add support for GL_ANGLE_texture_usage
Review URL: http://codereview.appspot.com/5478052/



git-svn-id: http://skia.googlecode.com/svn/trunk@2845 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-12-09 19:40:36 +00:00
junov@chromium.org
b6e161937b Adding isOpaque method to skia shader classes
REVIEW=http://codereview.appspot.com/5451102/
TEST=unit test ShaderOpacity



git-svn-id: http://skia.googlecode.com/svn/trunk@2840 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-12-09 15:48:03 +00:00
reed@google.com
982cb875f0 add SK_OVERRIDE, move subclass impls of virtuals into .cpp
git-svn-id: http://skia.googlecode.com/svn/trunk@2823 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-12-07 18:34:08 +00:00
reed@google.com
7716afbb97 add SK_OVERRIDEs
git-svn-id: http://skia.googlecode.com/svn/trunk@2820 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-12-07 15:17:50 +00:00
reed@google.com
75d939b549 add SK_OVERRIDEs, move impl of virtuals into .cpp
git-svn-id: http://skia.googlecode.com/svn/trunk@2819 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-12-07 15:07:23 +00:00
reed@google.com
59ccef695c add more SK_OVERRIDEs
update dox for SkEmptyShader



git-svn-id: http://skia.googlecode.com/svn/trunk@2817 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-12-07 14:59:50 +00:00
reed@google.com
43d748446a don't specify default parameter values when overriding a method
git-svn-id: http://skia.googlecode.com/svn/trunk@2816 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-12-07 14:46:39 +00:00
reed@google.com
5ae777dcad rename sk_float_isNaN to sk_float_isnan to match related functions
add sk_float_isinf returning non-zero if the argument is +/- infinity



git-svn-id: http://skia.googlecode.com/svn/trunk@2813 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-12-06 20:18:05 +00:00
reed@google.com
1607863b60 rename hasValidCoordinates to isFinite (on SkRect) and reimplement for speed
git-svn-id: http://skia.googlecode.com/svn/trunk@2811 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-12-06 18:56:37 +00:00
bsalomon@google.com
9791291347 Prep for GrDrawState as a class Part 2
Review URL: http://codereview.appspot.com/5450105/



git-svn-id: http://skia.googlecode.com/svn/trunk@2810 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-12-06 16:30:36 +00:00
bsalomon@google.com
39ee0ffa72 Prep #1 for making GrDrawState a class
Review URL: http://codereview.appspot.com/5437138/




git-svn-id: http://skia.googlecode.com/svn/trunk@2808 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-12-06 15:32:52 +00:00
bsalomon@google.com
5bc34f04fe Remove fConfig/fFormat union in GrTextureDesc
Review URL: http://codereview.appspot.com/5448116/


git-svn-id: http://skia.googlecode.com/svn/trunk@2806 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-12-06 14:46:34 +00:00
reed@google.com
c2f8e9a500 make _isnan windows specific
git-svn-id: http://skia.googlecode.com/svn/trunk@2804 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-12-05 21:51:36 +00:00
reed@google.com
61873a59d7 add sk_float_isfinite to mask platform differences
git-svn-id: http://skia.googlecode.com/svn/trunk@2803 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-12-05 21:47:25 +00:00
senorblanco@chromium.org
ef843cdcd1 When a bitmap is texture-backed, change SkBitmap::copyTo() to do a deep
copy of the texels in VRAM rather than a readback and re-upload.  This
gives a 3-10X speedup on recursive canvas-to-canvas draws.

N.B.:  This introduces a new GM test, which will need new baselines.



git-svn-id: http://skia.googlecode.com/svn/trunk@2790 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-12-02 19:11:17 +00:00
reed@google.com
a89c77b5ca revert 2783 -- broke debug gm
git-svn-id: http://skia.googlecode.com/svn/trunk@2784 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-12-01 21:47:26 +00:00
tomhudson@google.com
f974a5d782 New function SkBlitter::blitAntiRect(); specifically accelerated for
supersampled antialiased clips.



git-svn-id: http://skia.googlecode.com/svn/trunk@2783 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-12-01 21:09:00 +00:00
tomhudson@google.com
05fffdcc91 Doxygen configuration file, documentation and minor cleanup on blitters.
git-svn-id: http://skia.googlecode.com/svn/trunk@2782 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-12-01 20:41:24 +00:00
djsollen@google.com
b44cd65a53 Fix Paint == comparison on Android.
The == operator was incorrect because of Androids use of
fGenerationID. This change moves the ID to the end of the
paint struct and omits it from the == comparison.
Review URL: http://codereview.appspot.com/5437098

git-svn-id: http://skia.googlecode.com/svn/trunk@2780 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-12-01 17:09:21 +00:00
bsalomon@google.com
eedef2564a Remove suffixes from SK_wGL macros
git-svn-id: http://skia.googlecode.com/svn/trunk@2778 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-12-01 16:50:24 +00:00
bsalomon@google.com
bd7c64150c Add SkWGLExtensionInterface for dealing with WGL extensions
Review URL: http://codereview.appspot.com/5447059

git-svn-id: http://skia.googlecode.com/svn/trunk@2777 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-12-01 16:34:28 +00:00
bsalomon@google.com
06711bd972 Move SkGLCanvas.h to obsolete, delete from gyp
Review URL: http://codereview.appspot.com/5451065/



git-svn-id: http://skia.googlecode.com/svn/trunk@2776 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-12-01 15:47:23 +00:00
reed@google.com
ea6805d222 add 2nd _ to __OpenBSD_
git-svn-id: http://skia.googlecode.com/svn/trunk@2775 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-11-30 20:44:25 +00:00
bsalomon@google.com
56d11e097b Add support for GL_ANGLE_pack_reverse_row_order
Review URL: http://codereview.appspot.com/5448063/


git-svn-id: http://skia.googlecode.com/svn/trunk@2774 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-11-30 19:59:08 +00:00
junov@chromium.org
d80a509eb7 replacing Gr* with Sk* in SkTArray.h
REVIEW=http://codereview.appspot.com/5447053/



git-svn-id: http://skia.googlecode.com/svn/trunk@2770 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-11-30 18:35:19 +00:00
reed@google.com
3138d36f98 Add more Unix platforms on which Skia for Chromium has been built,
this patch was tested on FreeBSD, Solaris, NetBSD, and DragonFly BSD.

http://codereview.chromium.org/8672011/



git-svn-id: http://skia.googlecode.com/svn/trunk@2764 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-11-30 15:27:30 +00:00
bsalomon@google.com
fb30951cd9 [GPU] tile when large bitmap pased drawBitmap and only a small fraction is used
Review URL: http://codereview.appspot.com/5450048/



git-svn-id: http://skia.googlecode.com/svn/trunk@2760 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-11-30 14:13:48 +00:00
reed@google.com
1271d78e8f add bytes() to SkTDArray, which returns the number of bytes in the array,
as opposed to count() which returns the number of elements.



git-svn-id: http://skia.googlecode.com/svn/trunk@2758 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-11-28 19:54:12 +00:00
tomhudson@google.com
01224d5d0a Unroll loops in SkBlurMask for speedup on Windows (benchmarks should see
15% on interpolated blurs, 5-10% on simple blurs).



git-svn-id: http://skia.googlecode.com/svn/trunk@2755 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-11-28 18:22:01 +00:00
reed@google.com
c9d9337790 define SK_OVERRIDE based on windows compiler, not windows platform (for mingw)
git-svn-id: http://skia.googlecode.com/svn/trunk@2748 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-11-28 15:25:12 +00:00
bsalomon@google.com
b1277c96b0 Fix mac debug asserts
git-svn-id: http://skia.googlecode.com/svn/trunk@2747 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-11-23 21:58:39 +00:00
bsalomon@google.com
6a2134ef13 Fix build
git-svn-id: http://skia.googlecode.com/svn/trunk@2746 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-11-23 21:33:11 +00:00
bsalomon@google.com
0442380545 Add hints for static analysis about when we intend to crash
Review URL: http://codereview.appspot.com/5433062



git-svn-id: http://skia.googlecode.com/svn/trunk@2745 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-11-23 21:25:35 +00:00
caryclark@google.com
4ee8aea2a7 fix mac warnings
http://codereview.appspot.com/5431053/

M    include/views/SkOSWindow_Mac.h
M    src/utils/mac/SkNSView.mm
M    src/utils/mac/SkNSView.h
M    src/utils/mac/SkOSWindow_Mac.mm
M    src/utils/mac/SkSampleNSView.h



git-svn-id: http://skia.googlecode.com/svn/trunk@2740 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-11-23 14:54:19 +00:00
mike@reedtribe.org
259210c376 add SK_OVERRIDE
git-svn-id: http://skia.googlecode.com/svn/trunk@2738 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-11-23 02:08:50 +00:00
reed@google.com
ffe49f5380 store 3 bits of luminance, but (for now) discretize that in fonthost::filterec
for backward compatibility



git-svn-id: http://skia.googlecode.com/svn/trunk@2732 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-11-22 19:42:41 +00:00
reed@google.com
1f6b4ae0f7 remove GetGammaFlag from SkFontHost
prep for retooling of gamma support



git-svn-id: http://skia.googlecode.com/svn/trunk@2730 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-11-22 14:20:55 +00:00
caryclark@google.com
54c782c968 add SetFlags for command line control
http://codereview.appspot.com/5416047/

M    include/core/SkGraphics.h
M    src/core/SkGraphics.cpp



git-svn-id: http://skia.googlecode.com/svn/trunk@2727 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-11-21 20:42:14 +00:00
reed@google.com
f788feb3f1 use a define for the shift amount for the hinting bits
git-svn-id: http://skia.googlecode.com/svn/trunk@2726 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-11-21 19:46:00 +00:00
reed@google.com
b6bb5cb7c2 reorder bits and remove obsolete kForceAA experimental bit
git-svn-id: http://skia.googlecode.com/svn/trunk@2725 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-11-21 19:32:29 +00:00
reed@google.com
8426058dee ensure we never change the text_encoding of the master paint, since it is used
to interpret the text/length parameters in draw[Pos]Text.



git-svn-id: http://skia.googlecode.com/svn/trunk@2724 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-11-21 16:42:10 +00:00
bsalomon@google.com
8ef3fd0ca6 Add support for GL_CHROMIUM_flipy
Review URL: http://codereview.appspot.com/5413051/


git-svn-id: http://skia.googlecode.com/svn/trunk@2723 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-11-21 15:53:13 +00:00
bsalomon@google.com
bc4b654af8 assert that resources used with ctx are owned by the ctx
Review URL: http://codereview.appspot.com/5398042/



git-svn-id: http://skia.googlecode.com/svn/trunk@2720 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-11-19 13:56:11 +00:00
bsalomon@google.com
a85449dac1 Resubmit 2717 w/ fix workaround OS X GL bug.
git-svn-id: http://skia.googlecode.com/svn/trunk@2719 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-11-19 02:36:05 +00:00
bsalomon@google.com
484be2bafd Revert 2717
git-svn-id: http://skia.googlecode.com/svn/trunk@2718 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-11-18 21:07:03 +00:00
bsalomon@google.com
5c56e3441c Recommit r2714 with clip fix
git-svn-id: http://skia.googlecode.com/svn/trunk@2717 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-11-18 19:57:50 +00:00
bsalomon@google.com
e1d3127ed4 Revert 2714 for debugging of test failure
git-svn-id: http://skia.googlecode.com/svn/trunk@2715 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-11-18 18:23:59 +00:00
bsalomon@google.com
598a1ff72a Write direct to RT/Tex when possible, use BGRA rather than RGBA intermediate texture on ANGLE
Review URL: http://codereview.appspot.com/5417046/




git-svn-id: http://skia.googlecode.com/svn/trunk@2714 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-11-18 18:15:42 +00:00
reed@google.com
9998c66930 remove all references to SkGlobals (obsolete)
git-svn-id: http://skia.googlecode.com/svn/trunk@2713 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-11-17 22:09:47 +00:00
reed@google.com
d54c85731e remove obsolete SK_USE_RUNTIME_GLOBALS
git-svn-id: http://skia.googlecode.com/svn/trunk@2711 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-11-17 21:35:41 +00:00
mike@reedtribe.org
e303fcf68d add SkXfermode::IsMode() and use that in SkDevice
git-svn-id: http://skia.googlecode.com/svn/trunk@2703 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-11-17 02:16:43 +00:00
bsalomon@google.com
6f3795105b Make all pixel ops go thru ctx so we can correctly flush. Unify two texture upload code paths.
Review URL: http://codereview.appspot.com/5373108/



git-svn-id: http://skia.googlecode.com/svn/trunk@2701 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-11-16 20:36:03 +00:00