Commit Graph

4438 Commits

Author SHA1 Message Date
junov@chromium.org
09640d6bac Fixing canvas writePixels malfunctioning with SkDeferredCanvas with SkGPipe backend and GPU rendering
BUG=http://code.google.com/p/chromium/issues/detail?id=138935
Review URL: https://codereview.appspot.com/6450045

git-svn-id: http://skia.googlecode.com/svn/trunk@4769 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-25 20:09:37 +00:00
george@mozilla.com
b1047839e0 Use CGToScalar instead of SkFloatToScalar as CGFloat can be either double or float.
Review URL: https://codereview.appspot.com/6451049

git-svn-id: http://skia.googlecode.com/svn/trunk@4766 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-25 19:16:49 +00:00
george@mozilla.com
ece0100c22 Fix SK_OVERRIDE for various versions of clang
BUG=
TEST=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@4765 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-25 19:05:43 +00:00
george@mozilla.com
79c865a5c8 Ensure that all GNU-based systems are considered to be UNIX
Original Mozilla bug: https://bugzilla.mozilla.org/show_bug.cgi?id=749533

R=reed1
BUG=
TEST=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@4763 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-25 18:52:56 +00:00
rileya@google.com
185cd5d05a Rebaseline for single pixel radial gradient change caused by r4755.
git-svn-id: http://skia.googlecode.com/svn/trunk@4762 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-25 18:15:54 +00:00
bsalomon@google.com
bfb459d880 Disable unused uniform assert due to texture matrices being crammed down stage's throats
git-svn-id: http://skia.googlecode.com/svn/trunk@4761 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-25 18:13:32 +00:00
bsalomon@google.com
b9119a6b56 Fix static assert on non-windows compilers(?)
git-svn-id: http://skia.googlecode.com/svn/trunk@4759 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-25 17:55:26 +00:00
bsalomon@google.com
dbbc4e2da9 Add GL uniform manager
Review URL: http://codereview.appspot.com/6423066/



git-svn-id: http://skia.googlecode.com/svn/trunk@4758 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-25 17:48:39 +00:00
junov@chromium.org
b10a6bd0a7 Refactoring how SkDeferredCanvas manages mutable bitmaps
This CL makes the SkGPipe flavor of SkDeferredCanvas properly
decide whether to flush or record mutable bitmaps.  The flushing
is now managed by conditionally switching the canvas to non-deferred
mode, which avoids an unnecessary transient copy of the bitmap.

BUG=http://code.google.com/p/chromium/issues/detail?id=137884
TEST=DeferredCanvas unit test, sub test TestDeferredCanvasMemoryLimit
Review URL: https://codereview.appspot.com/6421060

git-svn-id: http://skia.googlecode.com/svn/trunk@4756 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-25 17:27:13 +00:00
rileya@google.com
91f319c5dc Use asNewCustomStage instead of asABitmap in SkGpuDevice, also removed now-unecessary twoPointRadialParams parameter from asABitmap.
In SkGpuDevice we still fall back on using asABitmap for effects that don't have asNewCustomStage implemented, but it still simplifies things a fair amount.
Review URL: https://codereview.appspot.com/6430060

git-svn-id: http://skia.googlecode.com/svn/trunk@4755 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-25 17:18:31 +00:00
bungeman@google.com
0567f222b9 Add SkScalarPow.
git-svn-id: http://skia.googlecode.com/svn/trunk@4754 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-25 17:00:47 +00:00
bungeman@google.com
7cf0e9e555 Prevent MipMaps from crashing.
git-svn-id: http://skia.googlecode.com/svn/trunk@4753 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-25 16:09:10 +00:00
borenet@google.com
de9ac1446c Fix Android build for new toolchain
The new toolchain (r8b) does not automatically include
the necessary directories
(http://code.google.com/p/android/issues/detail?id=35279).
Add them manually until this is fixed.
Review URL: https://codereview.appspot.com/6419076

git-svn-id: http://skia.googlecode.com/svn/trunk@4749 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-25 15:17:03 +00:00
reed@google.com
bba65d9a5e experimental only
git-svn-id: http://skia.googlecode.com/svn/trunk@4748 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-25 14:42:15 +00:00
caryclark@google.com
18063441c2 shape ops work in progress
git-svn-id: http://skia.googlecode.com/svn/trunk@4746 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-25 12:05:18 +00:00
robertphillips@google.com
4c2a2f7c5e Added isIntersectionOfRects to SkClipStack
http://codereview.appspot.com/6434050/



git-svn-id: http://skia.googlecode.com/svn/trunk@4745 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-24 22:07:50 +00:00
tomhudson@google.com
dcba4c2cc3 Use GrMemoryPool to manage GrCustomStage allocations.
Improve memory reclamation of GrMemoryPool for new/delete/new/delete pattern.

http://codereview.appspot.com/6438046/



git-svn-id: http://skia.googlecode.com/svn/trunk@4744 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-24 21:36:16 +00:00
bungeman@google.com
6e502fe067 Fix Android build broken due to changes in r4741.
git-svn-id: http://skia.googlecode.com/svn/trunk@4743 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-24 21:18:54 +00:00
scroggo@google.com
dd39488997 Avoid a loop in writeString and writePad by zeroing padding first.
Also add a benchmark to time the new improved writeString. Before
my change the bench took ~1.23ms and afterwards it takes ~.95ms.

Add some testing to ensure that writePad works properly.

TEST=Writer32Test, WriterBench

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

git-svn-id: http://skia.googlecode.com/svn/trunk@4742 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-24 20:47:55 +00:00
bungeman@google.com
bbe5013141 Split SkGlyph into its own header.
https://codereview.appspot.com/6434049/


git-svn-id: http://skia.googlecode.com/svn/trunk@4741 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-24 20:33:21 +00:00
borenet@google.com
0dc9ba4c31 Revert r4671
Add deleted giantbitmap images after fix of 718.
Review URL: https://codereview.appspot.com/6425065

git-svn-id: http://skia.googlecode.com/svn/trunk@4740 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-24 18:32:14 +00:00
borenet@google.com
83a3dd9064 Revert r5667
Add deleted giantbitmap images back after fix of #718
Review URL: https://codereview.appspot.com/6431065

git-svn-id: http://skia.googlecode.com/svn/trunk@4739 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-24 18:28:23 +00:00
robertphillips@google.com
b99225c92b Added requires_AA method to GrClipMaskManager.cpp to replace GrClip capability
http://codereview.appspot.com/6422062/



git-svn-id: http://skia.googlecode.com/svn/trunk@4738 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-24 18:20:10 +00:00
caryclark@google.com
afe56de636 shape ops work in progress
git-svn-id: http://skia.googlecode.com/svn/trunk@4737 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-24 18:11:03 +00:00
bsalomon@google.com
8f4fdc9968 Fix npot bitmap tiling
Review URL: http://codereview.appspot.com/6419073/



git-svn-id: http://skia.googlecode.com/svn/trunk@4736 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-24 17:59:01 +00:00
bungeman@google.com
0eec2d0486 Remove SkSfntUtils, as it is not longer used.
git-svn-id: http://skia.googlecode.com/svn/trunk@4735 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-24 17:50:25 +00:00
bungeman@google.com
aa8483b49d SkSfntUtils should use public types.
git-svn-id: http://skia.googlecode.com/svn/trunk@4734 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-24 17:34:41 +00:00
tomhudson@google.com
1bb4be2384 Fix TableColorFilter memory leak.
http://codereview.appspot.com/6437045/



git-svn-id: http://skia.googlecode.com/svn/trunk@4733 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-24 17:24:21 +00:00
robertphillips@google.com
2a4a49e79f Rebaselining to address r4730 (using SkClipStack's bound)
http://codereview.appspot.com/6431064/



git-svn-id: http://skia.googlecode.com/svn/trunk@4732 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-24 16:29:52 +00:00
bungeman@google.com
6fccbd1e56 SkTextBox to use public interfaces for line layout.
https://codereview.appspot.com/6438044/


git-svn-id: http://skia.googlecode.com/svn/trunk@4731 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-24 16:08:45 +00:00
robertphillips@google.com
607fe077c8 Added bound computation to SkClipStack
http://codereview.appspot.com/6419048/

This will require re-baselining of complexclip* and filltypespersp



git-svn-id: http://skia.googlecode.com/svn/trunk@4730 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-24 13:54:00 +00:00
reed@google.com
7866228f06 land http://codereview.appspot.com/6353063/ by Lei
optimizations for D16 using SSE2

skia_bench -config 565 -match bitmap_8888_scale_filter -forceFilter 1 -repeat
30

The result I got on Android platform was below:

w/o this optimization routine: 
D/skia    ( 1868): running bench [640 480]     bitmap_8888_scale_filter
D/skia    ( 1868):    565: cmsecs = 286.50

w/ with optimization:
D/skia    ( 1463): running bench [640 480]     bitmap_8888_scale_filter
D/skia    ( 1463):    565: cmsecs = 186.80

The net gain is 34.80%.



git-svn-id: http://skia.googlecode.com/svn/trunk@4729 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-24 13:53:23 +00:00
tomhudson@google.com
060ef18d5c Replace new with SkNEW in more effects classes.
http://codereview.appspot.com/6431052/



git-svn-id: http://skia.googlecode.com/svn/trunk@4727 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-24 12:22:40 +00:00
caryclark@google.com
e21cb18c52 shape ops work in progress
git-svn-id: http://skia.googlecode.com/svn/trunk@4726 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-23 21:26:31 +00:00
epoger@google.com
e5d810dac2 whitespace change to trigger Skia buildbots after master update/restart
git-svn-id: http://skia.googlecode.com/svn/trunk@4725 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-23 18:48:36 +00:00
robertphillips@google.com
a6f11c4f71 Gave GrClip an SkClipStack-style iterator
http://codereview.appspot.com/6434046/



git-svn-id: http://skia.googlecode.com/svn/trunk@4723 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-23 17:39:44 +00:00
djsollen@google.com
c1d1f414a0 Remove Bitmaps Raw Pixel Support.
bitmap.setPixels(...) now creates a mutable pixelRef instead
of just setting fPixels.
Review URL: https://codereview.appspot.com/6419044

git-svn-id: http://skia.googlecode.com/svn/trunk@4722 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-23 16:54:30 +00:00
reed@google.com
7d1941a72e update images after gpu changes
git-svn-id: http://skia.googlecode.com/svn/trunk@4721 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-23 15:14:18 +00:00
reed@google.com
f4cc18726b use SkTRefArray to share readonly data between pictures
Review URL: https://codereview.appspot.com/6351121

git-svn-id: http://skia.googlecode.com/svn/trunk@4720 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-23 15:04:45 +00:00
reed@google.com
f79430350d add protected method for internal_dispose overrides to jam fRefCnt before
calling destructor.

move SkTRefArray to actually inherit from SkRefCnt
Review URL: https://codereview.appspot.com/6422057

git-svn-id: http://skia.googlecode.com/svn/trunk@4719 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-23 14:50:38 +00:00
junov@chromium.org
8317e17448 Response to post-commit review comments on r4714
Correcting formatting and adding const in SkDeferredCanvas.h
Unreviewed



git-svn-id: http://skia.googlecode.com/svn/trunk@4718 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-23 14:17:45 +00:00
reed@google.com
61fea88711 update images after gpu change
git-svn-id: http://skia.googlecode.com/svn/trunk@4717 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-23 14:07:34 +00:00
reed@google.com
35e4e8f51d removing incorrect image
git-svn-id: http://skia.googlecode.com/svn/trunk@4716 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-23 14:07:08 +00:00
scroggo@google.com
e9617eb352 In SkWriter32::writeString, initialize all memory reserved.
SkFlatData compares data which is sometimes created by writeString.
Initialize all the memory in writeString so it does not compare
uninitialized memory.

See http://code.google.com/p/skia/issues/detail?id=721&thanks=721

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

git-svn-id: http://skia.googlecode.com/svn/trunk@4715 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-23 13:44:10 +00:00
junov@chromium.org
bfeddae9da Fix unbound memory consumption problem with run away deferred canvases.
With this CL, deferred canvases will trigger a flush when then the 
memory allocated for recording commands (including flattened objects)
exceeds 64MB.

TEST=DeferredCanvas skia unit test, test step TestDeferredCanvasMemoryLimit
BUG=http://code.google.com/p/chromium/issues/detail?id=137884
Review URL: https://codereview.appspot.com/6425053

git-svn-id: http://skia.googlecode.com/svn/trunk@4714 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-23 13:35:14 +00:00
caryclark@google.com
47580694fb shape ops work in progress
git-svn-id: http://skia.googlecode.com/svn/trunk@4713 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-23 12:14:49 +00:00
reed@google.com
a276975a62 check for memory leaks in debug-build
git-svn-id: http://skia.googlecode.com/svn/trunk@4712 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-22 22:33:05 +00:00
reed@google.com
ddf98a8834 use SkData to share between record and playback
use SkReader32 on the stack, as a step towards thread-reentrant playback



git-svn-id: http://skia.googlecode.com/svn/trunk@4711 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-21 20:31:09 +00:00
reed@google.com
0c6a736617 include <new> since we use placement-new
git-svn-id: http://skia.googlecode.com/svn/trunk@4710 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-21 19:39:24 +00:00
reed@google.com
80ba7964cd add SkTRefArray, in hopes that it will enable more sharing between pictureplaybacks
in different threads.



git-svn-id: http://skia.googlecode.com/svn/trunk@4709 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-21 17:31:40 +00:00