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
reed@google.com
c7d0ea3cd3
add asScalars() to document when we want to treat SkPoint or SkRect as an array
...
of SkScalars.
Review URL: https://codereview.chromium.org/12530010
git-svn-id: http://skia.googlecode.com/svn/trunk@8041 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-08 16:07:54 +00:00
skia.committer@gmail.com
e16efc1882
Sanitizing source files in Skia_Periodic_House_Keeping
...
git-svn-id: http://skia.googlecode.com/svn/trunk@7406 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-26 07:06:02 +00:00
skia.committer@gmail.com
43a6b6a046
Sanitizing source files in Skia_Periodic_House_Keeping
...
git-svn-id: http://skia.googlecode.com/svn/trunk@7357 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-24 07:06:13 +00:00
reed@google.com
1d6cff7293
add alias for MakeFromIRect (just Make)
...
git-svn-id: http://skia.googlecode.com/svn/trunk@7340 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-23 15:37:56 +00:00
skia.committer@gmail.com
4d28d9889b
Sanitizing source files in Skia_Periodic_House_Keeping
...
git-svn-id: http://skia.googlecode.com/svn/trunk@7240 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-17 07:06:06 +00:00
reed@google.com
6f54724c11
remove legacy build-flags for drawBitmapRect
...
add SkRect::isetWH()
Review URL: https://codereview.appspot.com/7127045
git-svn-id: http://skia.googlecode.com/svn/trunk@7221 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-16 15:15:24 +00:00
skia.committer@gmail.com
d9f7503e0c
Sanitizing source files in Skia_Periodic_House_Keeping
...
git-svn-id: http://skia.googlecode.com/svn/trunk@6362 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-09 02:01:24 +00:00
reed@google.com
6898d52c37
add centerX() and centerY() to SkIRect (because they made me)
...
Review URL: https://codereview.appspot.com/6826078
git-svn-id: http://skia.googlecode.com/svn/trunk@6360 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-08 22:36:19 +00:00
skia.committer@gmail.com
72b2e6fff3
Sanitizing source files in Skia_Periodic_House_Keeping
...
git-svn-id: http://skia.googlecode.com/svn/trunk@6344 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-08 02:03:56 +00:00
bsalomon@google.com
7b7cdd147f
Some improvements to reduce the number of pixels touched in generating alpha clip masks
...
Review URL: https://codereview.appspot.com/6828043
git-svn-id: http://skia.googlecode.com/svn/trunk@6329 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-07 16:17:24 +00:00
reed@google.com
4d3038379d
add more utilities: roundIn(), offsetTo()
...
git-svn-id: http://skia.googlecode.com/svn/trunk@6320 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-06 22:02:51 +00:00
reed@google.com
e1e7d7a6b5
add SkScalarsEqual() so we don't have to use memcmp for arrays of floats.
...
git-svn-id: http://skia.googlecode.com/svn/trunk@6226 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-31 19:59:23 +00:00
bsalomon@google.com
3ab43d5c5b
Minimize use of SkDraw's matrix in SkGpuDevice.
...
R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6604068
git-svn-id: http://skia.googlecode.com/svn/trunk@5906 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-11 19:39:09 +00:00
rmistry@google.com
fbfcd56021
Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/ )
...
This CL is part I of IV (I broke down the 1280 files into 4 CLs).
Review URL: https://codereview.appspot.com/6485054
git-svn-id: http://skia.googlecode.com/svn/trunk@5262 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-23 18:09:54 +00:00
reed@google.com
0bb18bb264
explicitly track if a path is finite or not
...
we need this (it appears) so we can definitively reject non-finite paths
in canvas, before passing them down into the guts.
Review URL: https://codereview.appspot.com/6453047
git-svn-id: http://skia.googlecode.com/svn/trunk@4784 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-26 15:20:36 +00:00
reed@google.com
0d10280190
We often rgn-diff an area >= the other rgn. now we detect that and return empty
...
We do this when we update our devices in SkCanvas.cpp
Review URL: https://codereview.appspot.com/6249073
git-svn-id: http://skia.googlecode.com/svn/trunk@4101 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-31 18:28:59 +00:00
reed@google.com
7b463acd46
speedup SkRect::isFinite() (almost 2x)
...
add SkRect:set(p0, p1) for quick bounds of 2 points
git-svn-id: http://skia.googlecode.com/svn/trunk@3967 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-16 13:35:36 +00:00
robertphillips@google.com
6623fcd1ee
Convert AAClipCache's GrRects to GrIRects
...
http://codereview.appspot.com/6210057/
git-svn-id: http://skia.googlecode.com/svn/trunk@3942 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-15 16:47:23 +00:00
robertphillips@google.com
5d64068a36
Warn if return values from SkRect's Make* methods are ignored
...
http://codereview.appspot.com/6200060/
git-svn-id: http://skia.googlecode.com/svn/trunk@3894 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-10 14:50:44 +00:00
reed@google.com
d6195f956f
add x() and y() aliases for fLeft and fTop (matching SkIRect)
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3737 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-04-19 21:01:24 +00:00
reed@google.com
1607863b60
rename hasValidCoordinates to isFinite (on SkRect) and reimplement for speed
...
git-svn-id: http://skia.googlecode.com/svn/trunk@2811 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-12-06 18:56:37 +00:00
reed@google.com
f0f617a502
add SkRect::intersect(a, b), matching what was already available in SkIRect
...
git-svn-id: http://skia.googlecode.com/svn/trunk@2513 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-10-21 14:05:06 +00:00
reed@google.com
c74ab18130
add accessors to irect
...
git-svn-id: http://skia.googlecode.com/svn/trunk@2399 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-10-03 20:27:14 +00:00
bsalomon@google.com
e174ea4bb1
Fix some warnings when including some Skia headers in Chromium code under VS2008.
...
Review URL: http://codereview.appspot.com/4956058/
git-svn-id: http://skia.googlecode.com/svn/trunk@2209 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-09-01 15:34:14 +00:00
bsalomon@google.com
647a804c3d
Core skia changes to prepare for Gr AA Hairline renderer
...
Review URL: http://codereview.appspot.com/4940045/
git-svn-id: http://skia.googlecode.com/svn/trunk@2160 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-08-23 14:39:01 +00:00
reed@google.com
099d22dbce
add roundOut()
...
git-svn-id: http://skia.googlecode.com/svn/trunk@2019 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-08-01 20:53:19 +00:00