halcanary@google.com
b7acbfe0ee
Flatten resources directory
...
On android trybots, the files in a subdirectory weren't being
loaded onto the device. Consequently, the ImageDecoderOptions
test was not testing anything. I had to relax that unit test
to reflect the existing behavior of our libjpeg decoder on
Android.
R=djsollen@google.com
Review URL: https://codereview.chromium.org/264583007
git-svn-id: http://skia.googlecode.com/svn/trunk@14682 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-09 18:08:24 +00:00
djsollen@google.com
f9dc07c80a
Revert "Flatten resources directory"
...
Review URL: https://codereview.chromium.org/278033002
git-svn-id: http://skia.googlecode.com/svn/trunk@14679 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-09 17:24:31 +00:00
commit-bot@chromium.org
e5e96021a0
Flatten resources directory
...
On android trybots, the files in a subdirectory weren't being
loaded onto the device. Consequently, the ImageDecoderOptions
test was not testing anything. I had to relax that unit test
to reflect the existing behavior of our libjpeg decoder on
Android.
R=djsollen@google.com
Author: halcanary@google.com
Review URL: https://codereview.chromium.org/264583007
git-svn-id: http://skia.googlecode.com/svn/trunk@14678 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-09 16:24:06 +00:00
commit-bot@chromium.org
95c2003740
cleanup GrContext resource cache api
...
R=robertphillips@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/275563005
git-svn-id: http://skia.googlecode.com/svn/trunk@14669 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-09 14:29:32 +00:00
skia.committer@gmail.com
8a1e688552
Sanitizing source files in Housekeeper-Nightly
...
git-svn-id: http://skia.googlecode.com/svn/trunk@14661 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-09 03:05:30 +00:00
commit-bot@chromium.org
f97d65dc25
Fix rendering artifacts in pull-saveLayers-forward mode
...
This CL fixes 2 bugs in the pre-rendering of saveLayers:
1) The drawBitmapRect call wasn't occurring in device space so could sometimes be double transformed
2) The BBH op skipping in SkPicturePlayback could sometimes mess up the SkPictureStateTree's state
It also reduces the number of layers that are pre-rendered when a BBH is not in use.
Committed: http://code.google.com/p/skia/source/detail?r=14650
R=bsalomon@google.com , reed@google.com
Author: robertphillips@google.com
Review URL: https://codereview.chromium.org/267293007
git-svn-id: http://skia.googlecode.com/svn/trunk@14659 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-08 23:24:05 +00:00
commit-bot@chromium.org
888e4687d9
Split Star into Star (stores nothing) and List (stores matches).
...
Just noticed that the cull noop pattern (PushCull, Star<NoOp>, PopCull)
would trigger the Star that stores matches. We certainly don't need
those matches here, so instead of magically determining which Star you
need, we'll make you tell us which one you want.
No one but List's unit test needs List. I'll leave it for now, but we
might find it's not useful.
BUG=skia:2378
R=fmalita@chromium.org , mtklein@google.com , bungeman@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/275623002
git-svn-id: http://skia.googlecode.com/svn/trunk@14655 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-08 18:58:32 +00:00
commit-bot@chromium.org
1e44730ade
Noop away PushCull/PopCull pairs with nothing between them.
...
BUG=skia:2378
R=fmalita@chromium.org , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/277613002
git-svn-id: http://skia.googlecode.com/svn/trunk@14653 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-08 18:17:51 +00:00
skia.committer@gmail.com
b2c82c99f8
Sanitizing source files in Housekeeper-Nightly
...
git-svn-id: http://skia.googlecode.com/svn/trunk@14636 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-08 03:05:29 +00:00
commit-bot@chromium.org
37f6e62f11
Move paints to the front of draw structs.
...
The order of arguments in these structs is arbitrary, so we might as well arrange them to optimize something. Putting the paints at the front means the logic to find the paint is a lot more concise: it's usually just ptr+0, or *(ptr+0) when the SkPaint is optional.
This considerably reduces the size of the jump table in IsDraw::operator().
BUG=skia:2378
R=fmalita@chromium.org , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/272673002
git-svn-id: http://skia.googlecode.com/svn/trunk@14634 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-07 22:59:38 +00:00
commit-bot@chromium.org
c71da1f6ed
Convert all SkRecordPattern matchers into SkRecord mutators.
...
- Allow any return type from SkRecord mutators and visitors;
- update existing calls to mutate and visit;
- convert match to operator() in SkRecordPattern;
- tidy up a few inelegant bits of old code in tests.
The net result is that the generated code is much clearer. All the mutate() calls
inline as you'd hope, and you can now actually follow along with the disassembly.
BUG=skia:2378
R=fmalita@chromium.org , bungeman@google.com , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/273643007
git-svn-id: http://skia.googlecode.com/svn/trunk@14631 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-07 21:16:09 +00:00
senorblanco@chromium.org
ba31f1d341
Some small cleanups for image filter code.
...
Use the 2-param flavour of mapVector instead of the 3-param, where possible.
Add an SkMatrixImageFilter test case to the tiling unit test.
R=junov@chromium.org
Review URL: https://codereview.chromium.org/277543002
git-svn-id: http://skia.googlecode.com/svn/trunk@14630 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-07 20:56:08 +00:00
senorblanco@chromium.org
d4db657bf5
Fix for SkDisplacementMap::onFilterBounds().
...
Two problems: we were not applying the CTM to the scale parameter when
modifying clip bounds, and the recursion for onFilterBounds() must be done
in the reverse order.
BUG=370914
R=junov@chromium.org
Review URL: https://codereview.chromium.org/272643003
git-svn-id: http://skia.googlecode.com/svn/trunk@14627 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-07 20:00:04 +00:00
commit-bot@chromium.org
467705adf0
save-draw*-restore -> noop-draw*-noop
...
save-drawA-drawB-drawC-restore always means drawA-drawB-drawC,
no matter what flags we use for save().
This one triggers all over the silk SKPs and in several of the bot SKPs, typically as save-drawBitmap-restore.
BUG=skia:2378
R=robertphillips@google.com , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/267793006
git-svn-id: http://skia.googlecode.com/svn/trunk@14618 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-07 17:17:48 +00:00
commit-bot@chromium.org
2db7fe7d3b
When solving the cubic line intersection directly fails, use binary search as a fallback.
...
The cubic line intersection math empirically works 99.99% of the time (fails 3100 out of 1B random tests) but when it fails, an intersection may be missed altogether.
The binary search is may not find a solution if the cubic line failed to find any solutions at all, but so far that case hasn't arisen.
BUG=skia:2504
TBR=reed@google.com
Author: caryclark@google.com
Review URL: https://codereview.chromium.org/266063003
git-svn-id: http://skia.googlecode.com/svn/trunk@14614 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-07 15:31:40 +00:00
commit-bot@chromium.org
2d91efffdb
4x allocation in PipeController is probably overkill.
...
When verylargebitmap GM runs in cross-process pipe mode, we're
requestBlock()ing ~200M to carry the bitmaps. The current
implementation ends up allocating ~800M, which is a bit wasteful.
SkGPipeWrite already rounds up to 16K, so just rely on that.
This change exposed several bugs in pipe:
- we don't reserve enough space in drawVertices
- we don't reserve enough space for factory names in cross-process mode
- we don't quite have the right check in needOpBytes to see if we needed to send off the current block and allocate a new one
SETUP_NOTIFY and generally calling doNotify() more often than necessary made things hard to debug and understand. Now the pipe always waits to send off its current block until it needs more space than that block can provide, or it's the final block. We can put these back if we need the proactive flushing, but it seems not necessary?
Removed an assert in DeferredCanvasTest, which is somtimes 2 (Debug), sometimes 3 (Release). It seemed like the other asserts were more essential, and this one was more of a white-box assertion. Still sound if we remove it?
BUG=skia:2478
R=scroggo@google.com , mtklein@google.com , reed@google.com , junov@chromium.org
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/267863002
git-svn-id: http://skia.googlecode.com/svn/trunk@14613 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-07 15:27:10 +00:00
commit-bot@chromium.org
f5bf3cf025
Add SaveLayer-Draw-Restore optimization.
...
This is like SkPictureRecord's remove_save_layer1 but works with all draw calls.
Interesting patterns removed:
SaveLayer-DrawRect-Restore: Silk SKPs, desk_weather
SaveLayer-DrawPath-Restore: desk_carsvg, desk_wowwiki, tabl_androidpolice
SaveLayer-DrawPosTextH-Restore: tabl_android_police
There may be others, but I stopped looking.
BUG=skia:2378
R=robertphillips@google.com , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/269813010
git-svn-id: http://skia.googlecode.com/svn/trunk@14610 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-07 14:47:44 +00:00
commit-bot@chromium.org
8cca4cc560
Split CPU and GPU DeferredCanvas tests
...
Nothing important, just happened to notice this and figured it was good hygiene.
DEF_TESTs run in parallel, while DEF_GPUTESTs run all run serially.
BUG=skia:
Committed: http://code.google.com/p/skia/source/detail?r=14603
R=junov@chromium.org , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/271483002
git-svn-id: http://skia.googlecode.com/svn/trunk@14608 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-07 14:33:57 +00:00
commit-bot@chromium.org
dbf25181bd
Revert of Split CPU and GPU DeferredCanvas tests ( https://codereview.chromium.org/271483002/ )
...
Reason for revert:
breaking the run tests steps on ChromeOS. See http://108.170.220.120:10117/builders/Test-ChromeOS-Alex-GMA3150-x86-Debug/builds/1669
Original issue's description:
> Split CPU and GPU DeferredCanvas tests
>
> Nothing important, just happened to notice this and figured it was good hygiene.
> DEF_TESTs run in parallel, while DEF_GPUTESTs run all run serially.
>
> BUG=skia:
>
> Committed: http://code.google.com/p/skia/source/detail?r=14603
R=junov@chromium.org , mtklein@google.com , mtklein@chromium.org
TBR=junov@chromium.org , mtklein@chromium.org , mtklein@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Author: djsollen@google.com
Review URL: https://codereview.chromium.org/270283003
git-svn-id: http://skia.googlecode.com/svn/trunk@14607 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-07 12:33:02 +00:00
skia.committer@gmail.com
a5b068cc05
Sanitizing source files in Housekeeper-Nightly
...
git-svn-id: http://skia.googlecode.com/svn/trunk@14605 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-07 03:04:15 +00:00
senorblanco@chromium.org
68250c8e7c
Fix for empty saveLayer() with a filter which affects transparent black.
...
If an saveLayer()/restore() is recorded, tilegrid/rtree will cull them
out and not draw anything. This is correct for most cases, but if the
paint in the saveLayer() is one that affects transparent black (e.g.,
it contains a color filter or image filter which affects transparent
black), this is incorrect: the filter should be applied.
Fixed by adding a no-op between the saveLayer() and restore(), and
adding a bbox node pointing at that node with the saveLayer()'s bounds.
This exposed a bug in SkPictureRecord.cpp's match(), where it would
assert if the NOOP was the last op seen. Fixed with an early-out before
calling peek_op_and_size().
BUG=skia:2254
Review URL: https://codereview.chromium.org/262363007
git-svn-id: http://skia.googlecode.com/svn/trunk@14604 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-06 22:52:55 +00:00
commit-bot@chromium.org
0992404e38
Split CPU and GPU DeferredCanvas tests
...
Nothing important, just happened to notice this and figured it was good hygiene.
DEF_TESTs run in parallel, while DEF_GPUTESTs run all run serially.
BUG=skia:
R=junov@chromium.org , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/271483002
git-svn-id: http://skia.googlecode.com/svn/trunk@14603 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-06 21:43:37 +00:00
commit-bot@chromium.org
1b546462bb
SaveLayer is not a draw.
...
Will keep thinking about the best way to handle this:
- leave as-is
- tag the records
- some range check on T::kType
- just list all Draw* in IsDraw
BUG=skia:2378
R=fmalita@chromium.org , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/269543023
git-svn-id: http://skia.googlecode.com/svn/trunk@14602 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-06 21:32:19 +00:00
commit-bot@chromium.org
0205aba7d5
Infrastructure changes to support pull-saveLayers-forward task
...
This is split out of (First pass at pre-rendering saveLayers for GPU - https://codereview.chromium.org/261663003/ ).
It mainly:
Moves NeedsDeepCopy to somewhere more accessible (so GrPictureUtils.cpp can use it)
Moves ComputeAccelDataKey somewhere more accessible (so GPUPicture test can use it)
Adds unit test for picture saveLayer analysis (done in EXPERIMENTAL_optimize)
Adds new fields to SaveLayerInfo that are needed to pull forward layers
Committed: http://code.google.com/p/skia/source/detail?r=14571
R=bsalomon@google.com
Author: robertphillips@google.com
Review URL: https://codereview.chromium.org/266203003
git-svn-id: http://skia.googlecode.com/svn/trunk@14586 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-06 12:02:22 +00:00
commit-bot@chromium.org
73fffeb83a
Add pattern matchers for SkRecord
...
This is a mid-level library for finding patterns of commands in an SkRecord. At the API level, it's a bit regex inspired. Some examples:
- Pattern1<Is<DrawRect>> matches a single DrawRect
- Pattern1<Star<Is<DrawRect>>> matches 0 or more DrawRects
- Pattern2<Is<ClipRect>, Is<DrawRect>> matches a single clip rect followed by a single draw rect
- Pattern3<Is<Save>, Star<IsDraw>, Is<Restore>> matches a single Save, followed by any number of Draws, followed by Restore
- Pattern1<Or<Is<DrawRect>, Is<ClipRect>>> matches a DrawRect or a ClipRect
- Pattern1<Not<Is<ClipRect>>> matches a command that's notClipRect.
Once you have a pattern, you can call .search() on it to step through ranges of matching commands. This means patterns can replace most of the custom iteration logic for optimization passes: the generic pattern searching steps through all the optimization candidates, which optimization-specific code further inspects and mutates.
SkRecordTraits is now unused. Bye bye!
Generated code and performance of SkRecordOpts is very similar to what it was before. (I had to use SK_ALWAYS_INLINE in a few places to make this so.)
BUG=skia:2378
R=fmalita@chromium.org , bungeman@google.com , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/263063002
git-svn-id: http://skia.googlecode.com/svn/trunk@14582 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-05 21:59:52 +00:00
robertphillips@google.com
300c6060c8
Revert r14571 (Infrastructure changes to support pull saveLayers forward task - https://codereview.chromium.org/266203003 ) due to breaking Android unit tests
...
git-svn-id: http://skia.googlecode.com/svn/trunk@14578 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-05 19:24:23 +00:00
commit-bot@chromium.org
11c6b39cfa
Adds a mechanism for GrCacheable objects to notify the resource cache
...
when their size has changed. GrResourceCacheEntry now holds a
reference to the cache, and a cached value of the resource's most
recent size.
Also utilizes this new functionality for mipmaps, and adds a test for
changing resource sizes.
R=bsalomon@google.com , robertphillips@google.com
Author: cdalton@nvidia.com
Review URL: https://codereview.chromium.org/257093002
git-svn-id: http://skia.googlecode.com/svn/trunk@14576 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-05 19:09:13 +00:00
commit-bot@chromium.org
6b392b6111
Infrastructure changes to support pull-saveLayers-forward task
...
This is split out of (First pass at pre-rendering saveLayers for GPU - https://codereview.chromium.org/261663003/ ).
It mainly:
Moves NeedsDeepCopy to somewhere more accessible (so GrPictureUtils.cpp can use it)
Moves ComputeAccelDataKey somewhere more accessible (so GPUPicture test can use it)
Adds unit test for picture saveLayer analysis (done in EXPERIMENTAL_optimize)
Adds new fields to SaveLayerInfo that are needed to pull forward layers
R=bsalomon@google.com
Author: robertphillips@google.com
Review URL: https://codereview.chromium.org/266203003
git-svn-id: http://skia.googlecode.com/svn/trunk@14571 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-05 18:06:14 +00:00
commit-bot@chromium.org
7066bf3fbf
Update tests/RecordOptsTest.cpp
...
- use REPORTER_ASSERT;
- assert the type first, then the pointer != NULL. This helps explain why ptr == NULL;
- add a simpler NoopSaveRestore test case, which can help debugging failures of the larger test case.
BUG=skia:2378
R=fmalita@chromium.org , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/264043012
git-svn-id: http://skia.googlecode.com/svn/trunk@14570 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-05 17:09:05 +00:00
reed@google.com
3253f83605
fix double->float warning
...
git-svn-id: http://skia.googlecode.com/svn/trunk@14568 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-05 16:32:16 +00:00
commit-bot@chromium.org
4e332f82fc
add rounding-using-doubles methods on SkScalar and SkRect
...
Inspired by the excellent repro case for https://crbug.com/364224
patch from issue 265933010
BUG=skia:
R=bungeman@google.com
Author: reed@google.com
Review URL: https://codereview.chromium.org/267003002
git-svn-id: http://skia.googlecode.com/svn/trunk@14566 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-05 16:04:42 +00:00
commit-bot@chromium.org
089a780c33
Split GrResource into GrCacheable/GrGpuObject
...
Before this change, an object needed to inherit from GrResource (and
thus be a GPU object) in order to live in the GrResourceCache. That
was a problem for caching items that weren't GPU objects themselves,
but owned GPU objects.
This change splits GrResource into two classes:
1. GrCacheable: The base class for objects that can live in the
GrResourceCache.
2. GrGpuObject, which inherits from GrCacheable: The base class for
objects that get tracked by GrGpu.
This change is purely a refactor; there is no change in functionality.
Change-Id: I3e8daeb1f123041f414aa306c1366e959ae9e39e
BUG=skia:
R=bsalomon@google.com
Author: cdalton@nvidia.com
Review URL: https://codereview.chromium.org/251013002
git-svn-id: http://skia.googlecode.com/svn/trunk@14553 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-02 21:38:22 +00:00
senorblanco@chromium.org
8c7372bbe8
Fix for SkMatrixConvolutionImageFilter with large borders.
...
Intersect the requested processing rect with the destination
bounds.
R=junov@chromium.org
Review URL: https://codereview.chromium.org/267863004
git-svn-id: http://skia.googlecode.com/svn/trunk@14543 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-02 19:13:11 +00:00
senorblanco@chromium.org
9195743aac
Add a fix for a spurious assert in SkMatrixConvolutionImageFilter.
...
When matrix convolution processes border pixels with zero width, it
asserts in getAddr32() with an invalid x coordinate. The assert is
harmless, since the returned pointer is never accessed (the next line
is a loop from left to right, which does nothing, since left == right).
However, the fix is simple: early out on an empty rect before entering
the outer loop.
R=sugoi@chromium.org
Review URL: https://codereview.chromium.org/265693005
git-svn-id: http://skia.googlecode.com/svn/trunk@14497 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-01 14:03:41 +00:00
commit-bot@chromium.org
1a98a0604b
one valgrind.supp to rule them all.
...
R=mtklein@google.com , robertphillips@google.com , borenet@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/268473004
git-svn-id: http://skia.googlecode.com/svn/trunk@14487 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-30 21:10:13 +00:00
commit-bot@chromium.org
901d10d87b
Add Valgrind suppressions for nvidia driver.
...
Did we recently switch the machine Valgrind runs on from an ati card to
an nvidia one?
BUG=skia:
R=bsalomon@google.com , borenet@google.com , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/266473010
git-svn-id: http://skia.googlecode.com/svn/trunk@14482 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-30 19:20:42 +00:00
commit-bot@chromium.org
86398e5d91
Avoid undefined behavior and enable asserts in ClampTest.
...
The old code here wasn't being careful to avoid int32_t overflow in slow_check. Fix that.
R_ASSERT hasn't been doing anything for a while. As a result, there are a couple bugs in SkClampRange, marked as such and commented out. The asserts also weren't quite passing, so I fixed them up (allowing 0xFFFF to be considered either as part of the ramp or part of V1.)
BUG=skia:2481
R=reed@google.com , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/260523004
git-svn-id: http://skia.googlecode.com/svn/trunk@14479 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-30 16:51:51 +00:00
commit-bot@chromium.org
91fc81c972
fix cubic/line intersection; add skp tests
...
BUG=skia:2488
TBR=reed
Author: caryclark@google.com
Review URL: https://codereview.chromium.org/252243003
git-svn-id: http://skia.googlecode.com/svn/trunk@14458 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-30 13:37:48 +00:00
commit-bot@chromium.org
8dac8b18ee
Backfill unit tests for SkRecord
...
BUG=skia:2378
R=fmalita@chromium.org , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/251133008
git-svn-id: http://skia.googlecode.com/svn/trunk@14455 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-30 13:18:12 +00:00
commit-bot@chromium.org
1ac99c890b
Fixed issue found by clusterfuzz
...
An integer overflow was causing an issue when reading a string with a very large (or negative) size.
BUG=367764
R=senorblanco@google.com , senorblanco@chromium.org , reed@google.com , borenet@google.com
Author: sugoi@chromium.org
Review URL: https://codereview.chromium.org/255693003
git-svn-id: http://skia.googlecode.com/svn/trunk@14434 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-29 15:35:23 +00:00
commit-bot@chromium.org
705b1ff617
Don't bother doing the empty clip check in SkRecordDraw.
...
On Mike's suggestion, I tested out not doing any empty-clip check at all in
SkRecordDraw, given that mostly we'll do that again anyway inside SkCanvas.
Most SKPs are identical to the status quo, whether bot or silk, played back in tiles
or full. Average playback performance, both arithmetic and geometric mean, is also
unchanged.
A handful of SKPs do draw faster or slower reliably, particularly when tiled. E.g. a
cnn tile draws about 40% faster, a cuteoverload tile about 20% slower. Their profiles
look pretty much the same before and after, so I can't really explain the changes.
I'd say, given that performance is mostly identical and very identical in bulk,
we might as well remove this code. It's nice to keep SkRecordDraw as dumb as possible.
BUG=skia:2378
R=reed@google.com , fmalita@chromium.org , mtklein@google.com , borenet@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/258183002
git-svn-id: http://skia.googlecode.com/svn/trunk@14433 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-29 15:34:03 +00:00
senorblanco@chromium.org
0a5c233e3b
Implement bounds traversals for tile and matrix convolution filters.
...
Add a new GM that exercises tiled drawing all pixel-moving filters
(and some non-pixel-moving ones) and compares it against non-tiled
drawing of the same filters. Fixing this test revealed that tile and
matrix convolution filters had no onFilterBounds() traversals
(test-driven development FTW). Tile requires (conservatively) the
bounds to include the whole source rect, since it may end up in the
result. Matrix convolution requires the bounds to be offset by the
kernel size and target.
R=reed@google.com
BUG=skia:
Review URL: https://codereview.chromium.org/258243005
git-svn-id: http://skia.googlecode.com/svn/trunk@14432 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-29 15:20:39 +00:00
reed@google.com
daaafa6e81
add asAShadowBlur for android to drawlooper
...
BUG=skia:
R=djsollen@google.com , scroggo@google.com
Review URL: https://codereview.chromium.org/253633003
git-svn-id: http://skia.googlecode.com/svn/trunk@14431 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-29 15:20:16 +00:00
commit-bot@chromium.org
a31eacb22e
Refactor SkPictureStateTree::Iterator to avoid use of kClip_SaveFlag.
...
The current implementation relies on soon-to-be-deprecated
kClip_SaveFlag behavior. Updated to use default save flags
(kMatrixClip_SaveFlag) and stop assuming that the matrix survives
restore() calls.
R=junov@chromium.org , reed@google.com , robertphillips@chromium.org , robertphillips@google.com
Committed: http://code.google.com/p/skia/source/detail?r=14319
Author: fmalita@chromium.org
Review URL: https://codereview.chromium.org/246893005
git-svn-id: http://skia.googlecode.com/svn/trunk@14421 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-28 20:17:48 +00:00
commit-bot@chromium.org
e396455d2d
move common blur types into central header
...
BUG=skia:
R=scroggo@google.com , djsollen@google.com
Author: reed@google.com
Review URL: https://codereview.chromium.org/253833002
git-svn-id: http://skia.googlecode.com/svn/trunk@14411 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-28 16:25:35 +00:00
commit-bot@chromium.org
2e0c32af05
Start using type traits in src/record instead of macros.
...
Simplified skip logic by always running clip commands. No performance difference on bot or silk SKPs.
BUG=skia:2378
R=bungeman@google.com , fmalita@chromium.org , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/258693006
git-svn-id: http://skia.googlecode.com/svn/trunk@14410 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-28 16:19:45 +00:00
commit-bot@chromium.org
9c9005a347
Move SkShader::fLocalMatrix into SkShader constructor.
...
As a first step towards removing SkShader::setLocalMatrix, which will make
SkShader thread-safe, remove calls to setLocalMatrix that happen immediately
after the shader is being created. Instead, pass the matrix into the constructor
or factory method.
BUG=skia:1976
R=scroggo@google.com , reed@google.com , skyostil@google.com , mtklein@google.com
Author: dominikg@chromium.org
Review URL: https://codereview.chromium.org/245963010
git-svn-id: http://skia.googlecode.com/svn/trunk@14401 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-28 14:55:39 +00:00
skia.committer@gmail.com
e02c5dabbb
Sanitizing source files in Housekeeper-Nightly
...
git-svn-id: http://skia.googlecode.com/svn/trunk@14387 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-26 03:04:35 +00:00
commit-bot@chromium.org
8cb1daaa1e
fix minor skp-found bugs
...
remove globals from pathops_unittest
BUG=skia:2460
TBR=mtklein
Author: caryclark@google.com
Review URL: https://codereview.chromium.org/239563004
git-svn-id: http://skia.googlecode.com/svn/trunk@14378 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-25 12:59:11 +00:00
robertphillips@google.com
b950c6fd71
Fix r14368 (First pass at GPU veto) for non-GPU builds
...
https://codereview.chromium.org/255733002/
git-svn-id: http://skia.googlecode.com/svn/trunk@14369 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-25 00:02:12 +00:00
commit-bot@chromium.org
e2cb12a82a
First pass at GPU veto
...
As a short term solution this CL collects information during the recording process for use in suitableForGpuRasterization.
BUG=366495
R=bsalomon@google.com , reed@google.com , alokp@chromium.org
Author: robertphillips@google.com
Review URL: https://codereview.chromium.org/251533004
git-svn-id: http://skia.googlecode.com/svn/trunk@14368 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-24 21:53:13 +00:00
commit-bot@chromium.org
915b972a81
Reland "Properly set alpha type in webp decode."
...
Also use the newer setConfig function.
Add a test to confirm that we set the alpha type properly.
Add some images with alpha for testing. (These images are also
beneficial for the compare_unpremul test, which was previously
not meaningful on 100% opaque images.)
All of the added images are in the public domain. They were
taken from https://developers.google.com/speed/webp/gallery2 :
yellow_rose:
"Free Stock Photo in High Resolution - Yellow Rose 3 - Flowers"
Image Author: Jon Sullivan
This file is in the public domain.
http://www.public-domain-photos.com/free-stock-photos-4/flowers/yellow-rose-3.jpg
baby_tux:
"baby tux for my user page"
Image Author: Fizyplankton
This file is in the public domain.
http://www.minecraftwiki.net/images/8/85/Fizyplankton.png
NOTRY=true
TBR=halcanary@google.com
BUG=skia:2388
Author: scroggo@google.com
Review URL: https://codereview.chromium.org/252423008
git-svn-id: http://skia.googlecode.com/svn/trunk@14360 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-24 18:55:13 +00:00
commit-bot@chromium.org
76a3b2abd0
Remove support for inheriting the paint color from SkColorShader
...
BUG=skia:2453
R=reed@google.com , mtklein@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/248033003
git-svn-id: http://skia.googlecode.com/svn/trunk@14355 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-24 16:54:46 +00:00
commit-bot@chromium.org
732bd66ac2
Rearrange SkRecord public API to fit better with cc/resources/picture
...
BUG=skia:2378
R=reed@google.com , danakj@chromium.org , enne@chromium.org , mtklein@google.com , robertphillips@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/248033002
git-svn-id: http://skia.googlecode.com/svn/trunk@14351 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-24 15:22:55 +00:00
commit-bot@chromium.org
8f831f262f
First step in pulling SkPicturePlayback & SkPictureRecord out of SkPicture
...
This CL begins the process of making SkPicturePlayback & SkPictureRecord independent of SkPicture. It just moves the PathHeap into SkPicture to get a feel for where all this is going to lead.
Some items of note:
SkTimedPicture (debugger/QT) should wind up being just an SkPicturePlayback-derived object.
All the flattening & unflattening should migrate out of SkPicturePlayback and into SkPicture.
SkPicture::initForPlayback should eventually become something just SkPictureRecorder::endRecording calls.
SkPicture is passed into SkPicturePlayback's & SkPictureRecord's constructors. SkPicturePlayback only
holds onto a "const SkPicture*". The SkPicturePlayback:: CreateFromStream & CreateFromBuffer methods pass a non-const
SkPicture* down the call stack.
BUG=skia:2315
R=reed@google.com
Author: robertphillips@google.com
Review URL: https://codereview.chromium.org/249453002
git-svn-id: http://skia.googlecode.com/svn/trunk@14341 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-23 22:35:42 +00:00
commit-bot@chromium.org
ea26a0e14f
comment out SkDebugf (only needed for local testing)
...
TBR=mtklein@google.com
Author: reed@google.com
Review URL: https://codereview.chromium.org/248713003
git-svn-id: http://skia.googlecode.com/svn/trunk@14322 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-23 05:35:24 +00:00
commit-bot@chromium.org
88c3e279ab
Refactor SkRecord opts, converting playback optimizations where possible.
...
This adds back two optimizations from SkPicture: drawPosText strength reduction to drawPosTextH, and pointless save-foo-restore blocks are noop'd away.
The small-T optimization in SkRecord gets in the way of implementing replace(), so I removed it.
Just to keep the API focused, I removed the methods on SkRecord that iterate over i for you; it's just as efficient to do it yourself, and all of the interesting code does its own custom iteration.
BUG=skia:2378
R=fmalita@chromium.org , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/245853002
git-svn-id: http://skia.googlecode.com/svn/trunk@14300 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-22 16:57:20 +00:00
commit-bot@chromium.org
aec143824c
Add asADash entry point into SkPathEffect to allow extracting Dash info from PathEffects
...
BUG=skia:
R=bsalomon@google.com , reed@google.com
Author: egdaniel@google.com
Review URL: https://codereview.chromium.org/212103010
git-svn-id: http://skia.googlecode.com/svn/trunk@14297 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-22 15:21:18 +00:00
commit-bot@chromium.org
2c4e75cc3c
Remove offset to SkMallocPixelRef::NewWithData - use SkData::NewSubset instead.
...
R=scroggo@google.com , mtklein@google.com , reed@google.com
Author: halcanary@google.com
Review URL: https://codereview.chromium.org/243483002
git-svn-id: http://skia.googlecode.com/svn/trunk@14289 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-21 21:08:14 +00:00
commit-bot@chromium.org
855e88edfa
Fixes for SkPictureShader.
...
Update comment in header to make it more clear that the picture
should be unaltered after creating the shader. We want our shaders
to be immutable, and this supports that.
Make the factory return NULL if the shader would have never drawn
anyway i.e. for a null picture or picture with no width/height.
Addresses comments I brought up in
https://codereview.chromium.org/221923007/#msg16 .
BUG=skia:1976
R=reed@google.com , fmalita@chromium.org , robertphillips@google.com
Author: scroggo@google.com
Review URL: https://codereview.chromium.org/238253005
git-svn-id: http://skia.googlecode.com/svn/trunk@14288 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-21 19:33:12 +00:00
commit-bot@chromium.org
ad8ce572f6
anticipate more optimizations by renaming some files and methods
...
also, call the new SkRecordOptimize in bench_playback
BUG=skia:2378
R=fmalita@chromium.org , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/243243003
git-svn-id: http://skia.googlecode.com/svn/trunk@14277 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-21 15:03:36 +00:00
reed@google.com
33a94e2ba7
remove unused fOverflowed from SkClampRange
...
TBR=scroggo@google.com
Review URL: https://codereview.chromium.org/243563002
git-svn-id: http://skia.googlecode.com/svn/trunk@14260 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-18 19:36:22 +00:00
robertphillips@google.com
770963f23f
Staging for cleanup of SkPicture-related headers
...
https://codereview.chromium.org/243173002
git-svn-id: http://skia.googlecode.com/svn/trunk@14258 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-18 18:04:41 +00:00
commit-bot@chromium.org
091a594dbc
Reduce internal explicit SaveFlags usage.
...
Most of these are either redundant/defaults or (hopefully)
unnecessarily specific.
R=reed@google.com , robertphillips@google.com
Author: fmalita@chromium.org
Review URL: https://codereview.chromium.org/241453003
git-svn-id: http://skia.googlecode.com/svn/trunk@14253 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-18 14:19:31 +00:00
skia.committer@gmail.com
60bd7519a9
Sanitizing source files in Housekeeper-Nightly
...
git-svn-id: http://skia.googlecode.com/svn/trunk@14252 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-18 03:03:54 +00:00
commit-bot@chromium.org
5fb2ce38b3
Staged removal of SkPicture-derived classes
...
This CL removes the SkPicture-derived classes (with a flag to keeps clients working). In the process it also lightens the recording factory function so it is no longer ref counted).
The only interesting bits are in SkPicture* and Sk*Picture.*
R=reed@google.com
Author: robertphillips@google.com
Review URL: https://codereview.chromium.org/238273012
git-svn-id: http://skia.googlecode.com/svn/trunk@14251 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-17 23:35:06 +00:00
reed@google.com
273a00d14f
fix expected size in 32bit builds
...
BUG=skia:
Review URL: https://codereview.chromium.org/240283012
git-svn-id: http://skia.googlecode.com/svn/trunk@14240 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-17 16:14:26 +00:00
commit-bot@chromium.org
cc277b729b
Orphan ProcXfermode, with an eye towards removing it
...
BUG=skia:
R=scroggo@google.com , mtklein@google.com
Author: reed@google.com
Review URL: https://codereview.chromium.org/240533003
git-svn-id: http://skia.googlecode.com/svn/trunk@14238 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-17 15:19:32 +00:00
commit-bot@chromium.org
efaf53ba24
remove unused tests to fix new clang build
...
R=mtklein@google.com
Author: caryclark@google.com
Review URL: https://codereview.chromium.org/241043002
git-svn-id: http://skia.googlecode.com/svn/trunk@14237 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-17 15:18:21 +00:00
skia.committer@gmail.com
667b98d947
Sanitizing source files in Housekeeper-Nightly
...
git-svn-id: http://skia.googlecode.com/svn/trunk@14234 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-17 03:05:10 +00:00
commit-bot@chromium.org
45d86e7072
always store bitfields along with dirty in FlatteningTraits
...
This allows us to simplify lots of setters in SkPaint, which in the non-android case, could now be just assignments (and therefore inlineable).
R=mtklein@google.com , robertphillips@google.com , tomhudson@google.com
Author: reed@google.com
Review URL: https://codereview.chromium.org/240273004
git-svn-id: http://skia.googlecode.com/svn/trunk@14229 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-16 20:48:10 +00:00
commit-bot@chromium.org
39426e2bcc
read/write function_ptrs as just void*, and not as 'array of bytes'
...
BUG=skia:
R=mtklein@google.com , bungeman@google.com
Author: reed@google.com
Review URL: https://codereview.chromium.org/240013005
git-svn-id: http://skia.googlecode.com/svn/trunk@14224 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-16 16:24:08 +00:00
commit-bot@chromium.org
d393b17cf3
Retract SkPicture::kOptimizeForClippedPlayback_RecordingFlag from public API
...
This CL sets the stage for retracting the SkPicture::kOptimizeForClippedPlayback_RecordingFlag flag
from the public API (more work needs to be done in Blink & Chrome). In the new world the only way
to set this flag (and thus instantiate an SkPicture-derived
class) is by passing a factory to the SkPictureRecorder class. This is to get all clients always using
factories so that we can then change the factory call used (i.e., so the factory just creates a BBH) and
do away with the SkPicture-derived classes.
BUG=skia:2315
R=reed@google.com
Author: robertphillips@google.com
Review URL: https://codereview.chromium.org/239703006
git-svn-id: http://skia.googlecode.com/svn/trunk@14221 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-16 16:02:10 +00:00
commit-bot@chromium.org
85faf50875
remove legacy filter-flags, and store FilterLevel directly
...
BUG=skia:
R=robertphillips@google.com , humper@google.com , jvanverth@google.com , mtklein@google.com
Author: reed@google.com
Review URL: https://codereview.chromium.org/239393002
git-svn-id: http://skia.googlecode.com/svn/trunk@14217 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-16 12:58:02 +00:00
commit-bot@chromium.org
12a0412a5d
initialize bounds in this test
...
BUG=skia:
R=bungeman@google.com , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/238353007
git-svn-id: http://skia.googlecode.com/svn/trunk@14204 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-15 18:00:57 +00:00
commit-bot@chromium.org
73cb15351f
Make sure SkDrawLooper objects can only be allocated on the heap.
...
Make constructors of SkLayerDrawLooper and SkBlurDrawLooper non-public.
Remove addLayer* methods from SkLayerDrawLooper. SkLayerDrawLooper::Builder is
used to create new objects.
Provide factory method for creating SkBlurDrawLooper.
BUG=2141
R=scroggo@google.com , reed@google.com , djsollen@google.com
Author: dominikg@chromium.org
Review URL: https://codereview.chromium.org/232913003
git-svn-id: http://skia.googlecode.com/svn/trunk@14200 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-15 15:48:36 +00:00
commit-bot@chromium.org
653d51867c
SkRecord bug fixes
...
Optional arguments to SkCanvas calls leaked refs (but not memory) because we
didn't destruct the optional objects (really, just SkPaint: other optional args
are all POD). This adds Optional and PODArray, where Optional makes sure to
call the destructor.
I overlooked that SkPictureRecord really does call paint.computeFastBounds().
Do the same in SkRecordDraw.
BUG=skia:2378
R=reed@google.com , mtklein@google.com , tomhudson@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/235983015
git-svn-id: http://skia.googlecode.com/svn/trunk@14197 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-15 14:27:14 +00:00
skia.committer@gmail.com
a1ed7aec95
Sanitizing source files in Housekeeper-Nightly
...
git-svn-id: http://skia.googlecode.com/svn/trunk@14196 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-15 03:04:18 +00:00
commit-bot@chromium.org
4431e7757c
Mike R: please sanity check SkPostConfig.h
...
Mike K: please sanity check Test.cpp and skia_test.cpp
Feel free to look at the rest, but I don't expect any in depth review of path ops innards.
Path Ops first iteration used QuickSort to order segments radiating from an intersection to compute the winding rule.
This revision uses a circular sort instead. Breaking out the circular sort into its own long-lived structure (SkOpAngle) allows doing less work and provides a home for caching additional sorting data.
The circle sort is more stable than the former sort, has a robust ordering and fewer exceptions. It finds unsortable ordering less often. It is less reliant on the initial curve tangent, using convex hulls instead whenever it can.
Additional debug validation makes sure that the computed structures are self-consistent. A new visualization tool helps verify that the angle ordering is correct.
The 70+M tests pass with this change on Windows, Mac, Linux 32 and Linux 64 in debug and release.
R=mtklein@google.com , reed@google.com
Author: caryclark@google.com
Review URL: https://codereview.chromium.org/131103009
git-svn-id: http://skia.googlecode.com/svn/trunk@14183 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-14 17:08:59 +00:00
robertphillips@google.com
84b18c7e3e
split SkPictureRecorder out of SkPicture
...
https://codereview.chromium.org/214953003/
git-svn-id: http://skia.googlecode.com/svn/trunk@14171 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-13 19:09:42 +00:00
commit-bot@chromium.org
f7efa502d6
Implement intra-frame cacheing in image filters.
...
When image filters are processed within Skia, they simply do
a blind recursion. This has the side-effect of turning the
DAG into a tree. I.e., nodes visited more than once during
the traversal will be processed more than once.
This change implements a very simple cacheing scheme: a
cache is created before traversing the DAG, and handed
into the processing traversal. Before recursing into a child
in SkImageFilter::filterImage(), the cache is checked for a
hit, and early-out is performed. Otherwise, the node is
processed, and its result bitmap and location (offset) are
cached, but only if it contains two or more children and
thus will be visited again during the traversal.
Currently, the child count is approximated with the
refcount. This is good enough in most cases (and exactly
correct for the Chrome use case). We could add an exact
child count to the image filter, but this will require
violating the immutability of image filters slightly in
order to bump the child count as nodes are connected. I
leave it up to the reviewer to decide which is better.
R=reed@google.com
Author: senorblanco@chromium.org
Review URL: https://codereview.chromium.org/230653005
git-svn-id: http://skia.googlecode.com/svn/trunk@14160 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-11 18:57:00 +00:00
commit-bot@chromium.org
cae54f1f21
remove picture-backed surfaces
...
BUG=skia:
R=robertphillips@google.com , mtklein@google.com
Author: reed@google.com
Review URL: https://codereview.chromium.org/233943002
git-svn-id: http://skia.googlecode.com/svn/trunk@14159 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-11 18:34:35 +00:00
commit-bot@chromium.org
c4b21e6c03
Mark our territory with (C).
...
BUG=skia:
R=reed@google.com , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/235253002
git-svn-id: http://skia.googlecode.com/svn/trunk@14158 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-11 18:33:31 +00:00
commit-bot@chromium.org
28fcae2ec7
Revert of Revert of Rename kPMColor_SkColorType to kN32_SkColorType. ( https://codereview.chromium.org/234243002/ )
...
Reason for revert:
Want to reland the original CL.
Original issue's description:
> Revert of Rename kPMColor_SkColorType to kN32_SkColorType. (https://codereview.chromium.org/227433009/ )
>
> Reason for revert:
> breaking the Chrome deps roll.
> http://build.chromium.org/p/chromium.linux/builders/Linux%20GN%20%28dbg%29/builds/839/steps/compile/logs/stdio
>
> Original issue's description:
> > Rename kPMColor_SkColorType to kN32_SkColorType.
> >
> > The new name better represents what this flag means.
> >
> > BUG=skia:2384
> >
> > Committed: http://code.google.com/p/skia/source/detail?r=14117
>
> TBR=reed@google.com ,scroggo@google.com
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:2384
>
> Committed: http://code.google.com/p/skia/source/detail?r=14144
R=reed@google.com , bensong@google.com
TBR=bensong@google.com , reed@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2384
Author: scroggo@google.com
Review URL: https://codereview.chromium.org/235523003
git-svn-id: http://skia.googlecode.com/svn/trunk@14156 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-11 17:15:40 +00:00
commit-bot@chromium.org
96edc24598
Revert of Rename kPMColor_SkColorType to kN32_SkColorType. ( https://codereview.chromium.org/227433009/ )
...
Reason for revert:
Chrome's side of define changes not easy to figure out quickly. Reverting this for DEPS roll for now.
Original issue's description:
> Rename kPMColor_SkColorType to kN32_SkColorType.
>
> The new name better represents what this flag means.
>
> BUG=skia:2384
>
> Committed: http://code.google.com/p/skia/source/detail?r=14117
R=reed@google.com , scroggo@google.com
TBR=reed@google.com , scroggo@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2384
Author: bensong@google.com
Review URL: https://codereview.chromium.org/234833003
git-svn-id: http://skia.googlecode.com/svn/trunk@14149 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-11 13:47:30 +00:00
commit-bot@chromium.org
18fd2b923a
Add a focused public API for src/record.
...
BUG=skia:2378
R=reed@google.com , robertphillips@google.com , mtklein@google.com , fmalita@chromium.org
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/233053005
git-svn-id: http://skia.googlecode.com/svn/trunk@14146 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-10 23:30:59 +00:00
commit-bot@chromium.org
d923288e50
Revert of Revert of Rename kPMColor_SkColorType to kN32_SkColorType. ( https://codereview.chromium.org/234243002/ )
...
Reason for revert:
fixes on the chrome side are landing (brettw), keep fingers crossed.
Original issue's description:
> Revert of Rename kPMColor_SkColorType to kN32_SkColorType. (https://codereview.chromium.org/227433009/ )
>
> Reason for revert:
> breaking the Chrome deps roll.
> http://build.chromium.org/p/chromium.linux/builders/Linux%20GN%20%28dbg%29/builds/839/steps/compile/logs/stdio
>
> Original issue's description:
> > Rename kPMColor_SkColorType to kN32_SkColorType.
> >
> > The new name better represents what this flag means.
> >
> > BUG=skia:2384
> >
> > Committed: http://code.google.com/p/skia/source/detail?r=14117
>
> TBR=reed@google.com ,scroggo@google.com
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:2384
>
> Committed: http://code.google.com/p/skia/source/detail?r=14144
R=reed@google.com , scroggo@google.com
TBR=reed@google.com , scroggo@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2384
Author: bensong@google.com
Review URL: https://codereview.chromium.org/233813004
git-svn-id: http://skia.googlecode.com/svn/trunk@14145 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-10 22:49:20 +00:00
commit-bot@chromium.org
757ebd20ef
Revert of Rename kPMColor_SkColorType to kN32_SkColorType. ( https://codereview.chromium.org/227433009/ )
...
Reason for revert:
breaking the Chrome deps roll.
http://build.chromium.org/p/chromium.linux/builders/Linux%20GN%20%28dbg%29/builds/839/steps/compile/logs/stdio
Original issue's description:
> Rename kPMColor_SkColorType to kN32_SkColorType.
>
> The new name better represents what this flag means.
>
> BUG=skia:2384
>
> Committed: http://code.google.com/p/skia/source/detail?r=14117
R=reed@google.com , scroggo@google.com
TBR=reed@google.com , scroggo@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2384
Author: bensong@google.com
Review URL: https://codereview.chromium.org/234243002
git-svn-id: http://skia.googlecode.com/svn/trunk@14144 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-10 22:36:34 +00:00
commit-bot@chromium.org
55c9b4e9f6
Cast int to float.
...
Get rid of warning->error.
TBR=reed@google.com
NOTRY=true
NOTREECHECKS=true
Author: scroggo@google.com
Review URL: https://codereview.chromium.org/233883002
git-svn-id: http://skia.googlecode.com/svn/trunk@14140 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-10 21:09:33 +00:00
commit-bot@chromium.org
6573ce70e6
Create SkLayerRasterizer w/o destroying Builder.
...
Add a new method to SkLayerRasterizer::Builder that creates a new
SkLayerRasterizer without destroying the Builder. Necessary to
continue to support Android's API.
Also fix a bug where creating a Builder and never calling
detachRasterizer results in not calling the destructor for any SkPaints
in the Builder.
Add tests.
BUG=b/13729784
R=reed@google.com , dominikg@chromium.org
Author: scroggo@google.com
Review URL: https://codereview.chromium.org/233673002
git-svn-id: http://skia.googlecode.com/svn/trunk@14139 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-10 20:42:53 +00:00
commit-bot@chromium.org
ff2de7cb94
SkRecordDraw: don't bother clipping an empty clip down further
...
BUG=skia:2378
R=fmalita@chromium.org , mtklein@google.com , fmalita@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/231933003
git-svn-id: http://skia.googlecode.com/svn/trunk@14126 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-10 02:26:33 +00:00
commit-bot@chromium.org
d9ce2be6b2
SkRecordDraw: skip draw ops when the clip is empty
...
- Adds tests for SkRecordDraw's two main features: cull- and clip- based skipping.
- Adds full SkCanvas semantic mode to SkRecorder, so it can be used as a target for SkRecordDraw.
BUG=skia:2378
R=fmalita@chromium.org , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/231653002
git-svn-id: http://skia.googlecode.com/svn/trunk@14124 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-09 23:30:28 +00:00
commit-bot@chromium.org
149e9a107c
Rename kPMColor_SkColorType to kN32_SkColorType.
...
The new name better represents what this flag means.
BUG=skia:2384
R=reed@google.com
Author: scroggo@google.com
Review URL: https://codereview.chromium.org/227433009
git-svn-id: http://skia.googlecode.com/svn/trunk@14117 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-09 20:45:29 +00:00
skia.committer@gmail.com
e1d9443758
Sanitizing source files in Housekeeper-Nightly
...
git-svn-id: http://skia.googlecode.com/svn/trunk@14102 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-09 03:04:11 +00:00
commit-bot@chromium.org
506db0b7d2
SkRecord: make culling work if SkRecordAnnotateCullingPairs is called.
...
- Allow stateful functors; allow visit()/mutate() at a given index; add count().
- Annotate cull push/pop pairs on the PushCull records. (tested)
- Use those annotations to skip ahead in SkRecordDraw. (not yet tested beyond dm --skr)
- Make SkRecordDraw a function, move its implementation to a .cpp.
BUG=skia:2378
R=fmalita@chromium.org , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/229523002
git-svn-id: http://skia.googlecode.com/svn/trunk@14101 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-08 23:31:35 +00:00
commit-bot@chromium.org
9ffa52d98f
More SkRecord TODOs:
...
- add basic test for SkRecorder
- rejigger GYPs so that the include dir comes along with the dependency
BUG=skia:2378
Committed: http://code.google.com/p/skia/source/detail?r=14099
NOTRY=true
NOTREECHECKS=true
R=fmalita@chromium.org , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/227673011
git-svn-id: http://skia.googlecode.com/svn/trunk@14100 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-08 21:01:17 +00:00
commit-bot@chromium.org
b73696262c
More SkRecord TODOs:
...
- add basic test for SkRecorder
- rejigger GYPs so that the include dir comes along with the dependency
BUG=skia:2378
R=fmalita@chromium.org , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/227673011
git-svn-id: http://skia.googlecode.com/svn/trunk@14099 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-08 20:17:26 +00:00
commit-bot@chromium.org
066a28d2c1
Start on some unwritten SkRecord TODOs:
...
- add SK_OVERRIDE for SkCanvas methods in SkRecorder
- start on unit tests, here just for SkRecord itself
BUG=skia:2378
R=fmalita@google.com , mtklein@google.com , fmalita@chromium.org
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/228723003
git-svn-id: http://skia.googlecode.com/svn/trunk@14097 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-08 17:31:08 +00:00
reed@google.com
43c27586e8
WIP -- SkFont
...
BUG=skia:
R=bungeman@google.com , fmalita@chromium.org
Review URL: https://codereview.chromium.org/185293018
git-svn-id: http://skia.googlecode.com/svn/trunk@14090 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-08 15:04:29 +00:00
commit-bot@chromium.org
2b4e370a2f
Convert SkPicture's generation ID to a unique ID
...
This CL addresses linger code review comments on r14037 (Add generation ID to SkPicture https://codereview.chromium.org/222683002/ )
R=reed@google.com
Author: robertphillips@google.com
Review URL: https://codereview.chromium.org/225283014
git-svn-id: http://skia.googlecode.com/svn/trunk@14079 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-07 18:26:22 +00:00
commit-bot@chromium.org
cf2f00872c
SkDiscardableMemoryPool to abstract class
...
Motivation - we want to keep our public headers small.
R=scroggo@google.com , reed@google.com
Author: halcanary@google.com
Review URL: https://codereview.chromium.org/223403012
git-svn-id: http://skia.googlecode.com/svn/trunk@14063 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-04 16:43:38 +00:00
commit-bot@chromium.org
d591b7513f
Revert of Properly set alpha type in webp decode. ( https://codereview.chromium.org/223893002/ )
...
Reason for revert:
Breaks ImageDecoding tests on several platforms.
Original issue's description:
> Properly set alpha type in webp decode.
>
> Also use the newer setConfig function.
>
> Add a test to confirm that we set the alpha type properly.
>
> Add some images with alpha for testing. (These images are also beneficial for the compare_unpremul test, which was previously not meaningful on 100% opaque images.)
>
> All of the added images are in the public domain. They were taken from https://developers.google.com/speed/webp/gallery2 :
>
> yellow_rose:
> "Free Stock Photo in High Resolution - Yellow Rose 3 - Flowers"
> Image Author: Jon Sullivan
> This file is in the public domain.
> http://www.public-domain-photos.com/free-stock-photos-4/flowers/yellow-rose-3.jpg
>
> baby_tux:
> "baby tux for my user page"
> Image Author: Fizyplankton
> This file is in the public domain.
> http://www.minecraftwiki.net/images/8/85/Fizyplankton.png
>
> NOTRY=true
>
> Committed: http://code.google.com/p/skia/source/detail?r=14054
R=halcanary@google.com
TBR=halcanary@google.com
NOTREECHECKS=true
NOTRY=true
Author: scroggo@google.com
Review URL: https://codereview.chromium.org/223903008
git-svn-id: http://skia.googlecode.com/svn/trunk@14055 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-03 21:47:15 +00:00
commit-bot@chromium.org
a455965d92
Properly set alpha type in webp decode.
...
Also use the newer setConfig function.
Add a test to confirm that we set the alpha type properly.
Add some images with alpha for testing. (These images are also beneficial for the compare_unpremul test, which was previously not meaningful on 100% opaque images.)
All of the added images are in the public domain. They were taken from https://developers.google.com/speed/webp/gallery2 :
yellow_rose:
"Free Stock Photo in High Resolution - Yellow Rose 3 - Flowers"
Image Author: Jon Sullivan
This file is in the public domain.
http://www.public-domain-photos.com/free-stock-photos-4/flowers/yellow-rose-3.jpg
baby_tux:
"baby tux for my user page"
Image Author: Fizyplankton
This file is in the public domain.
http://www.minecraftwiki.net/images/8/85/Fizyplankton.png
NOTRY=true
R=halcanary@google.com
Author: scroggo@google.com
Review URL: https://codereview.chromium.org/223893002
git-svn-id: http://skia.googlecode.com/svn/trunk@14054 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-03 20:55:39 +00:00
skia.committer@gmail.com
a9157727f7
Sanitizing source files in Housekeeper-Nightly
...
git-svn-id: http://skia.googlecode.com/svn/trunk@14039 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-03 03:04:26 +00:00
robertphillips@google.com
d5500886a2
Add generation ID to SkPicture
...
https://codereview.chromium.org/222683002/
git-svn-id: http://skia.googlecode.com/svn/trunk@14037 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-02 23:51:13 +00:00
senorblanco@chromium.org
d5424a425b
Fix matrix adjustment passed to filter processing.
...
When adjusting the CTM for filter use, we were subtracting off the
destination coordinates of the drawDevice() or drawSprite(). This is
not quite correct: we should subtract off the coordinates relative to
the device origin instead. This occurs when one filtered saveLayer() is
drawn inside another saveLayer(), both with non-zero origin.
This fixes layout test svg/batik/text/smallFonts.svg in Blink, and is
exercised by the provided unit test.
BUG=skia:
R=bsalomon@google.com
Review URL: https://codereview.chromium.org/222723002
git-svn-id: http://skia.googlecode.com/svn/trunk@14029 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-02 19:20:05 +00:00
commit-bot@chromium.org
55bd940446
SkTDynamicHash: pick up GetKey(), Hash() from T by default.
...
This also has a somewhat obscure technical benefit: it removes the
requirement that GetKey() and Hash() must be functions with external
linkage, which is required when passing a function pointer to a
template. A future CL that's run into this problem and the obvious
simplification are about 50/50 why I'm sending this CL.
BUG=skia:
DIFFBASE= https://codereview.chromium.org/222343002/
R=bsalomon@google.com , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/222473002
git-svn-id: http://skia.googlecode.com/svn/trunk@14028 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-02 19:17:00 +00:00
commit-bot@chromium.org
158f64626f
SkTDynamicHash: remove need for Equals(const T&, const Key&) param.
...
All implementations are relying on bool operator==(const Key&, const Key&)
anyway, which makes total sense, so just make that required.
BUG=skia:
R=bsalomon@google.com , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/222343002
git-svn-id: http://skia.googlecode.com/svn/trunk@14027 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-02 17:03:09 +00:00
senorblanco@chromium.org
ee845ae494
Fix SkXfermodeImageFilter when an input is cropped out.
...
If one of inputs to SkXfermodeImageFilter draws nothing, either due to
it being cropped out upstream, or within the filter itself, the filter
should still draw the other input, since otherwise the result will be incorrect.
For the GPU path, since we can't detect this case in
canFilterImageGPU() without recursing, we'll just drop to
the generic path if either input is empty, since we can't use the effect in that case anyway.
While we're at it, let's drop to the generic path if the
xfermode can't be expressed as an effect, since the code
here was doing a 2-pass render in that case anyway, which
is equivalent to what the (xfermode == NULL) case was doing
anyway.
R=bsalomon@google.com , sugoi@chromium.org
Review URL: https://codereview.chromium.org/220723007
git-svn-id: http://skia.googlecode.com/svn/trunk@14016 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-01 19:15:23 +00:00
commit-bot@chromium.org
35c03fbf10
Remove scaleToFit from DashPathEffect
...
BUG=skia:
R=reed@google.com , bsalomon@google.com , scroggo@google.com
Author: egdaniel@google.com
Review URL: https://codereview.chromium.org/216493005
git-svn-id: http://skia.googlecode.com/svn/trunk@13999 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-31 18:52:51 +00:00
commit-bot@chromium.org
0e9e6a3313
Roll back tests/TileGridTest.cpp back to where ASAN was happy.
...
Revert "Change tilegrid test to test it directly, rather than through SkPicture"
This reverts commit 7ae3bc7ffb
.
Revert "Fix result order reliance"
This reverts commit be4825c873
.
BUG=skia:2345
R=reed@google.com , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/216793006
git-svn-id: http://skia.googlecode.com/svn/trunk@13981 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-28 17:57:14 +00:00
commit-bot@chromium.org
dad009be4a
Making SkDeferredCanvas::silentFlush trigger a skippedPendingDrawCommands callback
...
The bug was preventing Canvas2DLayerBridge from properly tracking changes
in memory consumption that were triggered by calls to silentFlush.
BUG=344666
TEST=DeferredCanvas unit test
R=senorblanco@google.com , senorblanco@chromium.org
Author: junov@chromium.org
Review URL: https://codereview.chromium.org/214803002
git-svn-id: http://skia.googlecode.com/svn/trunk@13965 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-27 15:48:52 +00:00
reed@google.com
7111d463ce
Revert "Revert of implement readPixels and writePixels natively, w/o using the (deprecated) ( https://codereview.chromium.org/199733016/ )"
...
This reverts commit 9a90bd16dc6756395c422adf0f24560d033ed9ea.
BUG=skia:
R=bsalomon@google.com
Review URL: https://codereview.chromium.org/211293002
git-svn-id: http://skia.googlecode.com/svn/trunk@13939 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-25 16:20:24 +00:00
commit-bot@chromium.org
231f6b81c2
Revert of implement readPixels and writePixels natively, w/o using the (deprecated) ( https://codereview.chromium.org/199733016/ )
...
Reason for revert:
Android bots segfaulting in tests.
Original issue's description:
> implement readPixels and writePixels natively, w/o using the (deprecated)
> SkCanvas::Config8888 enum.
>
> Revert "Revert "hide Config8888 entirely". Broke a bunch of builds."
>
> This reverts commit 763277ba157fef0f651004bb98a189e9f1ac730b.
>
> Needs chrome to remove the READPIXELS guard from skia's .gyp
>
> Committed: https://code.google.com/p/skia/source/detail?r=13931
R=reed@google.com
TBR=reed@google.com
NOTREECHECKS=true
NOTRY=true
Author: mtklein@google.com
Review URL: https://codereview.chromium.org/209233004
git-svn-id: http://skia.googlecode.com/svn/trunk@13932 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-25 13:38:44 +00:00
reed@google.com
1121170477
implement readPixels and writePixels natively, w/o using the (deprecated)
...
SkCanvas::Config8888 enum.
Revert "Revert "hide Config8888 entirely". Broke a bunch of builds."
This reverts commit 763277ba157fef0f651004bb98a189e9f1ac730b.
Needs chrome to remove the READPIXELS guard from skia's .gyp
Review URL: https://codereview.chromium.org/199733016
git-svn-id: http://skia.googlecode.com/svn/trunk@13931 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-25 12:00:30 +00:00
commit-bot@chromium.org
e8807f49ed
SkPaint: eliminate some dead bytes in 64-bit build.
...
+ memcpy-based copy constructor was hiding this gap -> manual copy constructor.
+ Split tests for finer-grained failures.
BUG=skia:
Committed: http://code.google.com/p/skia/source/detail?r=13856
Committed: http://code.google.com/p/skia/source/detail?r=13887
R=reed@google.com , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/203203003
git-svn-id: http://skia.googlecode.com/svn/trunk@13927 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-24 23:03:11 +00:00
senorblanco@chromium.org
28ae55de3c
Fix Mac Debug clang build.
...
TBR=bsalomon@google.com
Review URL: https://codereview.chromium.org/210443002
git-svn-id: http://skia.googlecode.com/svn/trunk@13925 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-24 21:32:28 +00:00
senorblanco@chromium.org
09843fd5c1
Fix for crash on large image blur sigma values.
...
This was crashing on the GPU path, due to a failed texture allocation.
The belt-and-suspenders fix is to:
1) Limit the GPU path to only allocate up to maxTextureSize.
2) Limit both the raster and GPU paths to reasonable blur sizes (box blur
kernel size of 1000, resulting in a sigma limit of 532).
R=bsalomon@google.com
BUG=skia:
Review URL: https://codereview.chromium.org/209353014
git-svn-id: http://skia.googlecode.com/svn/trunk@13923 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-24 20:50:59 +00:00
commit-bot@chromium.org
61c9b835d1
Manual memset to work around bogus compiler warning bug.
...
BUG=skia:2215
R=bsalomon@google.com , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/210013003
git-svn-id: http://skia.googlecode.com/svn/trunk@13908 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-24 15:52:33 +00:00
bungeman@google.com
34ce63ca6b
Fix incorrect assert in r13895.
...
git-svn-id: http://skia.googlecode.com/svn/trunk@13896 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-21 20:14:05 +00:00
bungeman@google.com
95ebd17cf4
Add removeShuffle to SkTArray and add SkTArray tests.
...
R=reed@google.com
Review URL: https://codereview.chromium.org/208153008
git-svn-id: http://skia.googlecode.com/svn/trunk@13895 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-21 19:39:02 +00:00
skia.committer@gmail.com
99e5b524ce
Sanitizing source files in Housekeeper-Nightly
...
git-svn-id: http://skia.googlecode.com/svn/trunk@13889 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-21 03:02:42 +00:00
commit-bot@chromium.org
9206da6c9e
Revert of SkPaint: eliminate some dead bytes in 64-bit build. ( https://codereview.chromium.org/203203003/ )
...
Reason for revert:
Huh, some Android tests are still failing despite the fix. IntelRhB, Xoom... that's weird.
Original issue's description:
> SkPaint: eliminate some dead bytes in 64-bit build.
>
> + memcpy-based copy constructor was hiding this gap -> manual copy constructor.
> + Split tests for finer-grained failures.
>
> BUG=skia:
>
> Committed: http://code.google.com/p/skia/source/detail?r=13856
>
> Committed: http://code.google.com/p/skia/source/detail?r=13887
R=reed@google.com , mtklein@chromium.org
TBR=mtklein@chromium.org , reed@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Author: mtklein@google.com
Review URL: https://codereview.chromium.org/206623005
git-svn-id: http://skia.googlecode.com/svn/trunk@13888 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-21 01:40:07 +00:00
commit-bot@chromium.org
f48182b161
SkPaint: eliminate some dead bytes in 64-bit build.
...
+ memcpy-based copy constructor was hiding this gap -> manual copy constructor.
+ Split tests for finer-grained failures.
BUG=skia:
Committed: http://code.google.com/p/skia/source/detail?r=13856
R=reed@google.com , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/203203003
git-svn-id: http://skia.googlecode.com/svn/trunk@13887 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-20 23:02:35 +00:00
bsalomon@google.com
180e36abf6
Revert "hide Config8888 entirely". Broke a bunch of builds.
...
This reverts commit fa11c49cc11a6c9ebafbf9c59e118917f9b3cc56.
Revert "Sanitizing source files in Housekeeper-Nightly" to make the above revert clean.
This reverts commit b5787422c8eb2a27a9576777597fd9e06784acdb.
TBR=reed@google.com
TBR=jcgregorio@google.com
Review URL: https://codereview.chromium.org/205963003
git-svn-id: http://skia.googlecode.com/svn/trunk@13872 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-20 13:26:45 +00:00
skia.committer@gmail.com
be41d38f1c
Sanitizing source files in Housekeeper-Nightly
...
git-svn-id: http://skia.googlecode.com/svn/trunk@13871 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-20 03:02:31 +00:00
commit-bot@chromium.org
e14792d99f
hide Config8888 entirely
...
BUG=skia:
R=bsalomon@google.com
Author: reed@google.com
Review URL: https://codereview.chromium.org/203993002
git-svn-id: http://skia.googlecode.com/svn/trunk@13865 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-19 21:20:24 +00:00
commit-bot@chromium.org
d8a57af725
Adding a new SkSurface factory for generating surfaces from the scratch texture pool.
...
TEST=Surface unit test
BUG=crbug.com/351798
R=bsalomon@google.com , robertphillips@google.com , reed@google.com
Author: junov@chromium.org
Review URL: https://codereview.chromium.org/201153023
git-svn-id: http://skia.googlecode.com/svn/trunk@13864 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-19 21:19:16 +00:00
commit-bot@chromium.org
fffb2cd463
Revert of SkPaint: eliminate some dead bytes in 64-bit build. ( https://codereview.chromium.org/203203003/ )
...
Reason for revert:
Causing RunTest failures on Android.
Original issue's description:
> SkPaint: eliminate some dead bytes in 64-bit build.
>
> + memcpy-based copy constructor was hiding this gap -> manual copy constructor.
> + Split tests for finer-grained failures.
>
> BUG=skia:
>
> Committed: http://code.google.com/p/skia/source/detail?r=13856
R=reed@google.com , mtklein@google.com , mtklein@chromium.org
TBR=mtklein@chromium.org , mtklein@google.com , reed@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Author: jcgregorio@google.com
Review URL: https://codereview.chromium.org/204543002
git-svn-id: http://skia.googlecode.com/svn/trunk@13858 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-19 14:36:29 +00:00
commit-bot@chromium.org
fa4dc2c4cb
SkPaint: eliminate some dead bytes in 64-bit build.
...
+ memcpy-based copy constructor was hiding this gap -> manual copy constructor.
+ Split tests for finer-grained failures.
BUG=skia:
R=reed@google.com , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/203203003
git-svn-id: http://skia.googlecode.com/svn/trunk@13856 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-19 11:42:34 +00:00
commit-bot@chromium.org
70512af9dd
Add a means of extracting active operations from SkPicture
...
For the "pull forward" task I will be comparing the two cases:
analyze the whole skp and use the BBH information
analyze only the active portion of the skp
In the first case we need a way to get the BBH information out of the picture in order to extract the relevant portions of the whole-skp analysis. This adds caching of the active ops so that work isn't duplicated between when the optimization path queries for that information and when the usual draw path queries for it.
Committed: http://code.google.com/p/skia/source/detail?r=13836
R=reed@google.com , bsalomon@google.com
Author: robertphillips@google.com
Review URL: https://codereview.chromium.org/195793010
git-svn-id: http://skia.googlecode.com/svn/trunk@13853 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-18 17:45:32 +00:00
commit-bot@chromium.org
af5346a39c
Add reg test for http://crbug.com/348821
...
BUG=348821
R=reed@google.com , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/189373008
git-svn-id: http://skia.googlecode.com/svn/trunk@13852 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-18 17:38:34 +00:00
commit-bot@chromium.org
92362383a4
Remove SkCanvas matrix ops return value.
...
The internal SkMatrix ops can no longer fail -> we can remove the bool
return value.
R=bsalomon@google.com , reed@google.com , robertphillips@google.com , scroggo@google.com , fmalita@google.com
Author: fmalita@chromium.org
Review URL: https://codereview.chromium.org/200223008
git-svn-id: http://skia.googlecode.com/svn/trunk@13849 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-18 12:51:48 +00:00
commit-bot@chromium.org
a713f9c6f6
add new readPixels with direct memory parameters
...
BUG=skia:
R=scroggo@google.com , bsalomon@google.com , robertphillips@google.com , fmalita@google.com
Author: reed@google.com
Review URL: https://codereview.chromium.org/199413013
git-svn-id: http://skia.googlecode.com/svn/trunk@13840 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-17 21:31:26 +00:00
commit-bot@chromium.org
f338d7c860
Add nine patch type to SkRRect.
...
BUG=skia:2181
Committed: http://code.google.com/p/skia/source/detail?r=13833
R=robertphillips@google.com , reed@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/196343015
git-svn-id: http://skia.googlecode.com/svn/trunk@13839 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-17 21:17:30 +00:00
commit-bot@chromium.org
bab3fc4c90
Revert of Add nine patch type to SkRRect. ( https://codereview.chromium.org/196343015/ )
...
Reason for revert:
causes tests to have infinite loop
Original issue's description:
> Add nine patch type to SkRRect.
>
> BUG=skia:2181
>
> Committed: http://code.google.com/p/skia/source/detail?r=13833
R=robertphillips@google.com , reed@google.com
TBR=reed@google.com , robertphillips@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2181
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/202163004
git-svn-id: http://skia.googlecode.com/svn/trunk@13837 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-17 19:47:40 +00:00
commit-bot@chromium.org
761b8e5572
Add nine patch type to SkRRect.
...
BUG=skia:2181
R=robertphillips@google.com , reed@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/196343015
git-svn-id: http://skia.googlecode.com/svn/trunk@13833 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-17 15:39:01 +00:00
commit-bot@chromium.org
be4825c873
Fix result order reliance
...
The old tests presumed result order in a way was safe because SkPicture was sorting the paint calls.
This fixes the tests to not check result ordering, just presence
BUG=skia:
R=robertphillips@google.com
Author: iancottrell@google.com
Review URL: https://codereview.chromium.org/197813011
git-svn-id: http://skia.googlecode.com/svn/trunk@13828 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-17 12:14:48 +00:00
commit-bot@chromium.org
7ae3bc7ffb
Change tilegrid test to test it directly, rather than through SkPicture
...
This is necessary because it makes assumptions that picture will draw all the rects that match the grids, which may not hold if picture decides to improve the accuracy of the results.
BUG=skia:2125
R=tomhudson@google.com , mtklein@google.com , reed@google.com
Author: iancottrell@google.com
Review URL: https://codereview.chromium.org/199083004
git-svn-id: http://skia.googlecode.com/svn/trunk@13827 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-17 10:51:44 +00:00
commit-bot@chromium.org
949b9986de
Fast implementation of QuadTree
...
Rewritten to avoid memory allocations.
BUG=skia:2242
R=tomhudson@google.com , mtklein@google.com , reed@google.com , robertphillips@google.com
Author: iancottrell@google.com
Review URL: https://codereview.chromium.org/187233002
git-svn-id: http://skia.googlecode.com/svn/trunk@13826 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-17 10:38:34 +00:00
commit-bot@chromium.org
1e7ee999d4
fix a leak
...
R=sugoi@chromium.org , bungeman@google.com
Author: halcanary@google.com
Review URL: https://codereview.chromium.org/195763025
git-svn-id: http://skia.googlecode.com/svn/trunk@13814 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-14 21:22:22 +00:00
senorblanco@chromium.org
118252962f
Implement support for expanding crop rects in image filters
...
NOTE: this patch set is based on https://codereview.chromium.org/189913021/ ,
and needs that patch to land first.
Until now, crop rects in Skia have only been able to reduce
the size of the destination bounds, but not expand them.
SVG semantics require the latter as well. The heart of
the change is in applyCropRect(), which now assigns each
edge, instead of doing an intersection with the crop rect.
In order to support this (and still work well with tiled
drawing) we need to clip the resulting crop rect to the
clipping region of the filters. This uses the Context struct
previously landed from https://codereview.chromium.org/189913021/ .
Many of the pixel loops are not yet ready to handle a
destination rect larger than the source rect. So we provide
a convenience version of applyCropRect() which creates an
offscreen and pads it out with transparent black. Once the
pixel loops and shaders have been fixed to support larger
destination bounds, they should be switched back to the
non-drawing version of applyCropRect().
BUG=skia:
R=bsalomon@google.com , reed@google.com
Committed: https://code.google.com/p/skia/source/detail?r=13805
Review URL: https://codereview.chromium.org/198003008
git-svn-id: http://skia.googlecode.com/svn/trunk@13809 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-14 17:44:41 +00:00
senorblanco@chromium.org
4cb543d605
Implement support for a Context parameter in image filters
...
Some upcoming work (support for expanding crop rects) requires
the clip bounds to be available during filter traversal. This change
replaces the SkMatrix parameter in the onFilterImage() traversals
with a Context parameter. It contains the CTM, as well as the clip
bounds.
BUG=skia:
R=reed@google.com
Review URL: https://codereview.chromium.org/189913021
git-svn-id: http://skia.googlecode.com/svn/trunk@13803 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-14 15:44:01 +00:00
commit-bot@chromium.org
0f10f7bf1f
Allow toString capability to be toggled independent of developer mode.
...
This change is motivated by the desire to see the text information in the debugger when not in developer mode. It is structured so user's can disable it if the capability is not wanted.
R=bsalomon@google.com
Author: robertphillips@google.com
Review URL: https://codereview.chromium.org/197763008
git-svn-id: http://skia.googlecode.com/svn/trunk@13795 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-13 18:02:17 +00:00
commit-bot@chromium.org
e5eee51211
fix memory leak introduced in 9e5f85e8
...
R=sugoi@chromium.org , robertphillips@google.com
Author: halcanary@google.com
Review URL: https://codereview.chromium.org/199173002
git-svn-id: http://skia.googlecode.com/svn/trunk@13786 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-13 16:18:49 +00:00
skia.committer@gmail.com
affa77db64
Sanitizing source files in Housekeeper-Nightly
...
git-svn-id: http://skia.googlecode.com/svn/trunk@13782 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-13 03:02:23 +00:00
commit-bot@chromium.org
c30dcb9b12
Add capture snapshot as data to SkWriter32, use it to optimise record->playback.
...
This is a new way of implementing https://codereview.chromium.org/155863005/
It uses copy on write semantics to return a buffer without copying it, so that record -> playback does not need to copy the buffer.
BUG=skia:2125
R=tomhudson@google.com , mtklein@google.com , reed@google.com , iancottrell@chromium.org
Author: iancottrell@google.com
Review URL: https://codereview.chromium.org/167113003
git-svn-id: http://skia.googlecode.com/svn/trunk@13769 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-12 17:04:28 +00:00
commit-bot@chromium.org
9e5f85e89d
Fixing SkPicture serialization
...
Fixed a few issues while attempting to use the new
serialization path for SkPicture inside a fuzzer:
- SkReadBuffer and SkValidatingReadBuffer both had a fReader
member instead of sharing the same member, which leads to
problems if a base class function is used
- In SkPicture, a header is now written as a single chunk of
data, so it also has to be read as a single chunk of data
- In the SkPicturePlayback destructor, a bad deserialization
would lead to a crash if we don't safely unref fOpData
- Also in SkPicturePlayback, if we only use a ReadBuffer for
the whole deserialization, additional tags must be added to
parseBufferTag()
- SkValidatingReadBuffer::readBitmap() was broken, but this
path wasn't usen't since the only use case for
SkValidatingReadBuffer is currently image filters and
bitmaps are unflattened as part of the deserialization of
SkBitmapSource
- SkPictureImageFilter was not deserializable. Added it to
SkGlobalInitialization*
- Added a test that exercises the SkPicture serialization /
deserialization code
BUG=skia:
R=senorblanco@google.com , senorblanco@chromium.org , reed@google.com , robertphillips@google.com
Author: sugoi@chromium.org
Review URL: https://codereview.chromium.org/195223003
git-svn-id: http://skia.googlecode.com/svn/trunk@13764 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-12 14:46:41 +00:00
commit-bot@chromium.org
79fbb40bca
[WIP] Add Context to SkDrawLooper.
...
SkDrawLooper carries some state during draws. This CL extracts this state into
a separate class Context, which is then passed by the users of SkDrawLooper
into the appropriate methods.
This is a step towards making SkDrawLooper immutable.
BUG=skia:2141
R=scroggo@google.com , reed@google.com , sugoi@google.com
Author: dominikg@chromium.org
Review URL: https://codereview.chromium.org/155513012
git-svn-id: http://skia.googlecode.com/svn/trunk@13760 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-12 09:42:01 +00:00
reed@google.com
b93ba45b58
flag to make kClipToLayer_SaveFlag the default behavior
...
#define SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG to get the old behavior
The goal is to remove the feature of saveLayer that allows the canvas to draw outside of the top-most layer.
R=robertphillips@google.com , scroggo@google.com
Review URL: https://codereview.chromium.org/190723004
git-svn-id: http://skia.googlecode.com/svn/trunk@13730 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-10 19:47:58 +00:00