caryclark
6df611574a
handle halfway case in scan converter
...
Scan edges that start at exactly -0.5 aren't trimmed by
clipping or by rounding, triggering a debug assert.
One way to fix this is to round the top and left
down instead of up.
Also, move the path initialization of gm/composeshader.cpp
to make debugging other path problems easier.
R=reed@google.com
BUG=skia:2715
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1544873002
Review URL: https://codereview.chromium.org/1544873002
2016-01-04 14:17:47 -08:00
joshualitt
3dc2ccae6c
Simple CL to add a joinWithPossiblyEmptyArg to SkRect
...
BUG=skia:
Review URL: https://codereview.chromium.org/1118293002
2015-05-01 08:51:48 -07:00
dongseong.hwang
79612de00f
Remove useless SkASSERT in SkRect.h and SkRegion.h
...
The pointer of reference is always not-null. It causes >50k lines of warnning when chromium is compiled by clang.
Warning looks like
../../third_party/skia/include/core/SkRect.h:284:19: warning: reference cannot be bound to dereferenced null pointer in well-defined C++ code; pointer may be assumed to always convert to true [-Wundefined-bool-conversion]
do { if (&r) break; SkNO_RETURN_HINT(); SkDebugf_FileLine("../../third_party/skia/include/core/SkRect.h", 284, false, "%s:%d: failed assertion \"%s\"\n", "../../third_party/skia/include/core/SkRect.h", 284, "&r"); SkDebugf_FileLine("../../third_party/skia/include/core/SkRect.h", 284, true, "SK_CRASH"); } while (false);
Review URL: https://codereview.chromium.org/1111013002
2015-04-28 12:47:48 -07:00
reed
11fa2247b7
some utils for rect and matrix
...
BUG=skia:
Review URL: https://codereview.chromium.org/1003813003
2015-03-13 06:08:28 -07:00
joshualitt
570d2f81a6
I'd really like to land this before the branch so speedy reviews are appreciated.
...
BUG=skia:
Committed: https://skia.googlesource.com/skia/+/586d5d640b19860dfbbd903a5188da1bbbe87336
Review URL: https://codereview.chromium.org/936943002
2015-02-25 13:19:48 -08:00
joshualitt
2907059d0e
Revert of Pass clip to context (patchset #8 id:180001 of https://codereview.chromium.org/936943002/ )
...
Reason for revert:
Strange blur problems on nexus 5
Original issue's description:
> I'd really like to land this before the branch so speedy reviews are appreciated.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/586d5d640b19860dfbbd903a5188da1bbbe87336
TBR=jvanverth@google.com ,senorblanco@google.com,bsalomon@google.com,senorblanco@chromium.org,joshualitt@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/956083002
2015-02-25 13:04:44 -08:00
joshualitt
586d5d640b
I'd really like to land this before the branch so speedy reviews are appreciated.
...
BUG=skia:
Review URL: https://codereview.chromium.org/936943002
2015-02-25 11:21:21 -08:00
joshualitt
44701df5ce
Move clip off of draw target
...
BUG=skia:
Review URL: https://codereview.chromium.org/947443003
2015-02-23 14:44:58 -08:00
robertphillips
f4e5995ac7
It is dangerous to ignore SkRect::intersect's return value
...
Committed: https://skia.googlesource.com/skia/+/152f524fd325b7776b01f84afbfe2fa071648a05
Review URL: https://codereview.chromium.org/833943002
2015-01-07 12:16:10 -08:00
robertphillips
690fc594f1
Revert of It is dangerous to ignore SkRect::intersect's return value (patchset #6 id:100001 of https://codereview.chromium.org/833943002/ )
...
Reason for revert:
Still more Chromium clean up to do
Original issue's description:
> It is dangerous to ignore SkRect::intersect's return value
>
> Committed: https://skia.googlesource.com/skia/+/152f524fd325b7776b01f84afbfe2fa071648a05
TBR=reed@google.com
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/825983005
2015-01-07 09:12:43 -08:00
robertphillips
152f524fd3
It is dangerous to ignore SkRect::intersect's return value
...
Review URL: https://codereview.chromium.org/833943002
2015-01-07 09:01:13 -08:00
reed
a7a8b10134
add sample for arcTo
...
BUG=skia:
TBR=
Review URL: https://codereview.chromium.org/808793002
2014-12-16 08:07:43 -08:00
reed
0393912de7
pass dst-rect through from drawBitmapRect for better precision
...
BUG=skia:
Review URL: https://codereview.chromium.org/797963002
2014-12-15 13:42:51 -08:00
ehsan.akhgari
6f90475632
Rewrite NaN checks in terms of SkScalarIsNaN()
...
We are trying to replace Skia's NaN checker with our own in Mozilla,
so it would be nice to have to patch a single place by making sure
these NaN checks used SkScalarIsNaN().
BUG=skia:
Review URL: https://codereview.chromium.org/809443002
2014-12-15 12:08:47 -08:00
reed
e05fed0d63
add dumpHex option to rect and rrect, to match path
...
BUG=skia:
Review URL: https://codereview.chromium.org/801383002
2014-12-15 07:59:53 -08:00
reed
b07a94f1cb
add roundOut that returns its result
...
BUG=skia:
Review URL: https://codereview.chromium.org/742663002
2014-11-19 05:03:18 -08:00
reed
d02cf2664d
change roundOut() to take a dst, so we can use that signature to return IRect
...
BUG=skia:
TBR=robertphilips
Review URL: https://codereview.chromium.org/731373003
2014-11-18 18:06:45 -08:00
qiankun.miao
fb502f072f
Optimize SkRect::sort()
...
This optimization can reduce comparison and assignments. For
geo_rect_sort benchmark, performance improved to 1.63us from 3.28us.
BUG=skia:
Review URL: https://codereview.chromium.org/695443005
2014-11-03 14:34:31 -08:00
reed
157f36d358
add tests for large cordinates bounds when building aaclip
...
BUG=skia:
TBR=
Review URL: https://codereview.chromium.org/658753002
2014-10-15 07:05:09 -07:00
reed
40636a5303
faster SkRect::sort
...
BUG=skia:
Review URL: https://codereview.chromium.org/646863002
2014-10-10 05:50:15 -07:00
reed
1119c87065
cleanup and optimize rect intersect routines
...
BUG=skia:
Review URL: https://codereview.chromium.org/640723004
2014-10-09 14:29:01 -07:00
reed
10d0327c16
add SkRect::joinNonEmptyArg for faster unioning
...
BUG=skia:
Review URL: https://codereview.chromium.org/619853005
2014-10-01 09:24:12 -07:00
caryclark
a10742c69c
update to accommodate latest clang in chrome toolchain
...
remove asserts for null pointers to references
change var args signature to pointer instead of array
R=mtklein@google.com , reed@android.com , reed@google.com , mtklein, reed
Author: caryclark@google.com
Review URL: https://codereview.chromium.org/577243002
2014-09-18 11:00:40 -07:00
bsalomon
b6b0252643
Add dump() to SkClipStack to help with debugging.
...
R=robertphillips@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/311263015
2014-06-09 07:59:06 -07:00
reed
5c404c5577
add makeOffset and makeInset to SkRect
...
TBR=bsalomon
precursor for https://codereview.chromium.org/306013010
Author: reed@google.com
Review URL: https://codereview.chromium.org/306893012
2014-06-02 14:38:32 -07: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
mike@reedtribe.org
ae8f9528fd
speedup SkRect::intersect
...
git-svn-id: http://skia.googlecode.com/svn/trunk@12851 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-01 20:32:45 +00:00
reed@google.com
8f4d2306fa
remove SK_SCALAR_IS_[FLOAT,FIXED] and assume floats
...
To keep the CL (slightly) managable, this does not make any changes to
existing macros (e.g. SkScalarMul). Just tackling #ifdef constructs this
time around.
BUG=
R=bsalomon@google.com , caryclark@google.com
Review URL: https://codereview.chromium.org/117053002
git-svn-id: http://skia.googlecode.com/svn/trunk@12712 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-17 16:44:46 +00:00
reed@google.com
126f7f5244
Revert "Revert "speed up A8 by creating a new entry-point in SkDraw that blits the path's coverage directly into an A8 target, regardless of the previous pixel values.""
...
This reverts commit 3c77887b3eb2d32ab668ab4e5f2f9e79103956e8.
BUG=
Review URL: https://codereview.chromium.org/50673005
git-svn-id: http://skia.googlecode.com/svn/trunk@12167 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-07 16:06:53 +00:00
reed@google.com
84e922bfb3
Revert "speed up A8 by creating a new entry-point in SkDraw that blits the path's coverage directly into an A8 target, regardless of the previous pixel values."
...
This reverts commit d615e839b71f75df895de6850b774a9e1c28ad2a.
Revert "must initialize SkDraw.fClip"
This reverts commit 108e46d29b5f57927fc8b8c403bb52019d8cb16d.
BUG=
Review URL: https://codereview.chromium.org/57883006
git-svn-id: http://skia.googlecode.com/svn/trunk@12122 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-04 20:57:36 +00:00
reed@google.com
ac9d306a92
speed up A8 by creating a new entry-point in SkDraw that blits the path's coverage directly into an A8 target, regardless of the previous pixel values.
...
R=bsalomon@google.com , mtklein@google.com
Review URL: https://codereview.chromium.org/56453002
git-svn-id: http://skia.googlecode.com/svn/trunk@12118 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-04 20:10:33 +00:00
reed@google.com
4469938e92
Revert "Revert "add SK_ATTR_DEPRECATED -- will need to disable for chrome, since it triggers a warning""
...
This reverts commit 1e787c38fa71f2a21fd728f1b1d620b9b09b0d3d.
BUG=
Review URL: https://codereview.chromium.org/54603004
git-svn-id: http://skia.googlecode.com/svn/trunk@12057 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-31 17:28:30 +00:00
reed@google.com
6fcbfcead5
Revert "add SK_ATTR_DEPRECATED -- will need to disable for chrome, since it triggers a warning"
...
This reverts commit 1d22c4aaf9d8f053f25194a1ed74b137bfb19497.
git-svn-id: http://skia.googlecode.com/svn/trunk@12056 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-31 16:31:11 +00:00
reed@google.com
081560e3ab
add SK_ATTR_DEPRECATED -- will need to disable for chrome, since it triggers a warning
...
BUG=
R=robertphillips@google.com , senorblanco@chromium.org , vandebo@chromium.org
Review URL: https://codereview.chromium.org/51033004
git-svn-id: http://skia.googlecode.com/svn/trunk@12055 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-31 16:24:08 +00:00
reed@google.com
4db592c408
remove contains(x,y) for rects and rrects ... not well defined, and unused
...
BUG=
R=robertphillips@google.com
Review URL: https://codereview.chromium.org/51953003
git-svn-id: http://skia.googlecode.com/svn/trunk@12022 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-30 17:39:43 +00:00
senorblanco@chromium.org
b295fb6ff3
Change SkImageFilter's cropRect from SkIRect to a CropRect struct, containing an SkRect and flags indicating which parameters are set.
...
NOTE: this will require SK_CROP_RECT_IS_INT=1 to be set in Chrome until Blink has been updated to use SkImageFilter::CropRect. Include https://codereview.chromium.org/26528002/ with the Skia roll.
Note also that SK_CROP_RECT_IS_INT is a temporary measure until all call sites in Blink have been updated to use SkRect.
R=reed@google.com
Review URL: https://codereview.chromium.org/26371002
git-svn-id: http://skia.googlecode.com/svn/trunk@11692 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-10 13:51:19 +00:00
robertphillips@google.com
24ddde9758
Revert 11247, 11250, 11251, 11257, and 11279 to unblock DEPS roll ( https://codereview.chromium.org/24159002/ )
...
11279 Sanitizing source files in Housekeeper-Nightly - https://code.google.com/p/skia/source/detail?r=11279
11257 Canary build fix - https://codereview.chromium.org/23532068
11251 More warnings as errors fixes - https://code.google.com/p/skia/source/detail?r=11251
11250 Warnings as errors fix - https://code.google.com/p/skia/source/detail?r=11250
11247 Initial error handling code - https://chromiumcodereview.appspot.com/23021015
git-svn-id: http://skia.googlecode.com/svn/trunk@11288 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-16 14:04:05 +00:00
robertphillips@google.com
ba6e954140
Revert the revert of 11247, 11250, 11251 and 11279 (Chrome already relies on changes in r11247)
...
git-svn-id: http://skia.googlecode.com/svn/trunk@11287 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-16 13:40:12 +00:00
robertphillips@google.com
478884f7d3
Revert 11247, 11250, 11251 and 11279 to unblock DEPS roll ( https://codereview.chromium.org/24159002/ )
...
11279 Sanitizing source files in Housekeeper-Nightly - https://code.google.com/p/skia/source/detail?r=11279
11251 More warnings as errors fixes - https://code.google.com/p/skia/source/detail?r=11251
11250 Warnings as errors fix - https://code.google.com/p/skia/source/detail?r=11250
11247 Initial error handling code - https://chromiumcodereview.appspot.com/23021015
git-svn-id: http://skia.googlecode.com/svn/trunk@11285 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-16 13:19:11 +00:00
commit-bot@chromium.org
5792cded61
Initial error handling code
...
I made it as simple as possible. The impact seems minimal and it should do what's necessary to make this code secure.
BUG=
R=reed@google.com , scroggo@google.com , djsollen@google.com , sugoi@google.com , bsalomon@google.com , mtklein@google.com , senorblanco@google.com , senorblanco@chromium.org
Author: sugoi@chromium.org
Review URL: https://chromiumcodereview.appspot.com/23021015
git-svn-id: http://skia.googlecode.com/svn/trunk@11247 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-13 12:39:34 +00:00
commit-bot@chromium.org
b8bd6cbbcd
Fix bounds computation in GrAAHairlineRenderer
...
R=robertphillips@google.com , jvanverth@google.com
Author: bsalomon@google.com
Review URL: https://chromiumcodereview.appspot.com/23684008
git-svn-id: http://skia.googlecode.com/svn/trunk@11054 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-03 14:56:17 +00:00
commit-bot@chromium.org
24ab3b0ce5
Add blend optimization helpers and use to convert rect draws to clears.
...
R=robertphillips@google.com , jvanverth@google.com
Author: bsalomon@google.com
Review URL: https://chromiumcodereview.appspot.com/22558003
git-svn-id: http://skia.googlecode.com/svn/trunk@10723 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-14 21:56:37 +00:00
bsalomon@google.com
75796db3b3
Revert "Add blend optimization helpers and use to convert rect draws to clears."
...
This reverts commit r10537.
git-svn-id: http://skia.googlecode.com/svn/trunk@10601 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-07 13:34:14 +00:00
commit-bot@chromium.org
c1cdf21ab8
Add blend optimization helpers and use to convert rect draws to clears.
...
Committed: http://code.google.com/p/skia/source/detail?r=10537
R=robertphillips@google.com , jvanverth@google.com , reed@google.com
Author: bsalomon@google.com
Review URL: https://chromiumcodereview.appspot.com/21877006
git-svn-id: http://skia.googlecode.com/svn/trunk@10562 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-06 15:07:23 +00:00
bsalomon@google.com
9b6a185e36
Revert "Add blend optimization helpers and use to convert rect draws to clears."
...
This reverts commit r10537.
git-svn-id: http://skia.googlecode.com/svn/trunk@10542 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-05 18:27:23 +00:00
commit-bot@chromium.org
66017f6cc5
Add blend optimization helpers and use to convert rect draws to clears.
...
R=robertphillips@google.com , jvanverth@google.com , reed@google.com
Author: bsalomon@google.com
Review URL: https://chromiumcodereview.appspot.com/21877006
git-svn-id: http://skia.googlecode.com/svn/trunk@10537 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-05 16:55:55 +00:00
senorblanco@chromium.org
194d775edc
This patch implements a crop rect for SkImageFilter. It has been implemented for SkColorFilterImageFilter and SkBlurImageFilter as examples.
...
In order to preserve the immutability of SkImageFilters, the crop rect is passed as a constructor parameter. If NULL (the default), the bounds of the input image are used, as before.
This also tightens up the boundary handling for SkImageBlurFilter on the GPU backend. Where we were previously using clamping semantics, we now respect decal semantics (so we don't oversaturate the edges). This brings the GPU and raster backends into closer alignment, but will require some new baselines for the GPU tests.
At a minimum, the following tests will need new baselines: imageblur, imagefiltersbase, imagefilterscropped, spritebitmap.
R=reed@google.com
Committed: https://code.google.com/p/skia/source/detail?r=10251
Review URL: https://codereview.chromium.org/19775006
git-svn-id: http://skia.googlecode.com/svn/trunk@10338 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-24 22:19:24 +00:00
robertphillips@google.com
58c856a54a
Reverting r10251 (Implement crop rect for SkImageFilter) due to Chromium-side unit test failures
...
git-svn-id: http://skia.googlecode.com/svn/trunk@10304 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-24 13:18:06 +00:00
senorblanco@chromium.org
ccf225cebb
This patch implements a crop rect for SkImageFilter. It has been implemented for SkColorFilterImageFilter and SkBlurImageFilter as examples.
...
In order to preserve the immutability of SkImageFilters, the crop rect is passed as a constructor parameter. If NULL (the default), the bounds of the input image are used, as before.
This also tightens up the boundary handling for SkImageBlurFilter on the GPU backend. Where we were previously using clamping semantics, we now respect decal semantics (so we don't oversaturate the edges). This brings the GPU and raster backends into closer alignment, but will require some new baselines for the GPU tests.
At a minimum, the following tests will need new baselines: imageblur, imagefiltersbase, imagefilterscropped, spritebitmap.
R=reed@google.com
Review URL: https://codereview.chromium.org/19775006
git-svn-id: http://skia.googlecode.com/svn/trunk@10251 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-22 20:03:22 +00:00
skia.committer@gmail.com
eed625df23
Sanitizing source files in Skia_Periodic_House_Keeping
...
git-svn-id: http://skia.googlecode.com/svn/trunk@8059 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-09 07:01:15 +00:00