Commit Graph

104 Commits

Author SHA1 Message Date
Michael Ludwig
3b39b7f5c6 Alias canComputeFastBounds to affectsTransparentBlack
This moves SkImageFilter's API closer to SkColorFilter's, and also
updates SkRecordDraw's PaintMayAffectTransparentBlack to be less
conservative.

Originally:
-canComputeFastBounds() handled aggregating behavior of the entire graph
  but it's a public API
-affectsTransparentBlack() was the private virtual for a specific node

Now:
-affectsTransparentBlack() handles aggregating behavior of the graph and
  is part of SkImageFilter_Base (mirroring SkColorFilter_Base).
-added onAffectsTransparentBlack() to clarify the per-node virtual that
  they can override.
-canComputeFastBounds() simply returns !affectsTransparentBlack().

There are some usages in our code that I kept using canComputeFastBounds
(e.g. SkPaint's computefastBounds) because it kept naming consistent.
In other places I updated to use affectsTransparentBlack since I thought
that made it clearer why we were checking that behavior.

Bug: skia:12282
Change-Id: I7b58372c127b4d8d9097d6c0de64486e822d2342
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436296
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2021-08-04 19:11:19 +00:00
Mike Reed
821a84558b remove dead code from old drawimage virtuals
Bug: skia:7650
Change-Id: Ie6bce2130519655645b7c5602d364cd0e1d6fdf3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/356358
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2021-01-21 01:26:15 +00:00
Mike Reed
4f23dec742 Reland "Add new virts, hide old ones"
This reverts commit 8f924ac0ce.

Reason for revert: suppressions landed for fuchsia images to rebaseline

Original change's description:
> Revert "Add new virts, hide old ones"
>
> This reverts commit c56e2e5aa6.
>
> Reason for revert: suspected of breaking chrome roll
>
> Original change's description:
> > Add new virts, hide old ones
> >
> > Add virtuals for the draw methods that now take sampling/filtermode.
> >
> > drawImage
> > drawImageRect
> > drawImageLattice
> > drawAtlas
> >
> > Add a flag that can remove the older virtuals, once each client has
> > stopped overriding them. In that situation, the older public methods
> > will simplify extract the sampling from the paint, and call the new
> > public methods.
> >
> > Bug: skia:11105, skia:7650
> > Change-Id: I8b0029727295caa983e8148fc743a55cfbecd043
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/347022
> > Commit-Queue: Mike Reed <reed@google.com>
> > Reviewed-by: Florin Malita <fmalita@chromium.org>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
>
> TBR=bsalomon@google.com,fmalita@chromium.org,reed@google.com
>
> Change-Id: I0a90952c11a180d918126ea06a630f4a0bf9b49b
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:11105
> Bug: skia:7650
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/348194
> Reviewed-by: Derek Sollenberger <djsollen@google.com>
> Commit-Queue: Derek Sollenberger <djsollen@google.com>

TBR=djsollen@google.com,bsalomon@google.com,fmalita@chromium.org,reed@google.com

# Not skipping CQ checks because this is a reland.

Bug: skia:11105
Bug: skia:7650
Change-Id: Ia2b4537a2d330460b7554278d2c05075cf27162a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/348876
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-12-30 15:21:01 +00:00
Derek Sollenberger
8f924ac0ce Revert "Add new virts, hide old ones"
This reverts commit c56e2e5aa6.

Reason for revert: suspected of breaking chrome roll

Original change's description:
> Add new virts, hide old ones
>
> Add virtuals for the draw methods that now take sampling/filtermode.
>
> drawImage
> drawImageRect
> drawImageLattice
> drawAtlas
>
> Add a flag that can remove the older virtuals, once each client has
> stopped overriding them. In that situation, the older public methods
> will simplify extract the sampling from the paint, and call the new
> public methods.
>
> Bug: skia:11105, skia:7650
> Change-Id: I8b0029727295caa983e8148fc743a55cfbecd043
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/347022
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com,fmalita@chromium.org,reed@google.com

Change-Id: I0a90952c11a180d918126ea06a630f4a0bf9b49b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:11105
Bug: skia:7650
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/348194
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
2020-12-30 13:41:52 +00:00
Mike Reed
c56e2e5aa6 Add new virts, hide old ones
Add virtuals for the draw methods that now take sampling/filtermode.

drawImage
drawImageRect
drawImageLattice
drawAtlas

Add a flag that can remove the older virtuals, once each client has
stopped overriding them. In that situation, the older public methods
will simplify extract the sampling from the paint, and call the new
public methods.

Bug: skia:11105, skia:7650
Change-Id: I8b0029727295caa983e8148fc743a55cfbecd043
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/347022
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-12-29 21:36:08 +00:00
Mike Reed
f7cce2b243 Remove dead code (from old flags)
"SK_SUPPORT_LEGACY_CANVASMATRIX33",
  "SK_SUPPORT_LEGACY_MATRIX_FACTORIES",
  "SK_SUPPORT_LEGACY_SCALEPIXELS_PARAM",

Change-Id: I6e20ba7c553317ce0c2c0c3a6d6706a3555dd51c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/343112
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-12-11 02:35:49 +00:00
Mike Reed
1a4140e598 deprecate getTotalMatrix
Change-Id: Iec7d67f4ec3fdf4d5280f3de3d6146a69a60c646
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/339995
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-12-03 17:37:35 +00:00
Mike Reed
420a9ba7b5 Switch to m44 for the rest of canvas virtuals
Guard flag has been added to clients

Change-Id: Ib61a48781f5dbd52279c8f4257ba3e22fb2704e0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/338596
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-11-25 21:50:37 +00:00
Mike Klein
4c690b442f add metadata to calculated bounds
For Flutter, mark each bounds rect as a draw or not.

saveLayer() is the trickiest part: it doesn't draw, but its paired
restore() does, while a restore() paired with save() doesn't.

Change-Id: I5f0dc61ad5543265c5ea2bf41b236f57915847b9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/273501
Reviewed-by: Emmanuel Garcia <egarciad@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-02-27 19:12:35 +00:00
Mike Reed
9403c3897f Revert "Reland "Revert "allow clients to opt into new didTranslate/didScale"""
This reverts commit f66bba6018.

Reason for revert: sheriff thinks it may be the bot, so landing

Original change's description:
> Reland "Revert "allow clients to opt into new didTranslate/didScale""
> 
> This reverts commit d7ce7ac8d1.
> 
> Reason for revert: breaks Test-Debian10-GCC-GCE-CPU-AVX2-x86-Debug-All-Docker
> 
> Original change's description:
> > Revert "Revert "allow clients to opt into new didTranslate/didScale""
> > 
> > This reverts commit 4a46758db8.
> > 
> > Add guard to Flutter
> > 
> > Change-Id: Ief0e5cb36af13c8f00a36a617d0384622012d644
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263937
> > Reviewed-by: Mike Reed <reed@google.com>
> > Commit-Queue: Mike Reed <reed@google.com>
> 
> TBR=reed@google.com
> 
> Change-Id: I3291c4dfe18d6e751e61f55ed9b22a01f0c8ad72
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263860
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>

TBR=reed@google.com

Change-Id: I3111a034291c2320e5ff33f8c2072354f836440f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263939
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-01-13 14:41:12 +00:00
Mike Reed
f66bba6018 Reland "Revert "allow clients to opt into new didTranslate/didScale""
This reverts commit d7ce7ac8d1.

Reason for revert: breaks Test-Debian10-GCC-GCE-CPU-AVX2-x86-Debug-All-Docker

Original change's description:
> Revert "Revert "allow clients to opt into new didTranslate/didScale""
> 
> This reverts commit 4a46758db8.
> 
> Add guard to Flutter
> 
> Change-Id: Ief0e5cb36af13c8f00a36a617d0384622012d644
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263937
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>

TBR=reed@google.com

Change-Id: I3291c4dfe18d6e751e61f55ed9b22a01f0c8ad72
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263860
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-01-12 20:06:08 +00:00
Mike Reed
d7ce7ac8d1 Revert "Revert "allow clients to opt into new didTranslate/didScale""
This reverts commit 4a46758db8.

Add guard to Flutter

Change-Id: Ief0e5cb36af13c8f00a36a617d0384622012d644
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263937
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-01-12 19:53:18 +00:00
Mike Reed
4a46758db8 Revert "allow clients to opt into new didTranslate/didScale"
This reverts commit cb6b9e3c35.

Reason for revert: flutter-roll, and possibly Debian10?

Original change's description:
> allow clients to opt into new didTranslate/didScale
> 
> Before
>     148.97  	canvas_matrix_4x4	8888
>     139.96  	canvas_matrix_3x3	8888
>     139.81  	canvas_matrix_2x3	8888
>     183.13  	canvas_matrix_scale	8888
>     153.72  	canvas_matrix_trans	8888
> 
> After
>     ...
>     114.68  	canvas_matrix_scale	8888
>     112.96  	canvas_matrix_trans	8888
> 
> Change-Id: I79d20ea6ab6aa9609143c7abf4acaa8ca08dd58f
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263818
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Mike Reed <reed@google.com>

TBR=reed@google.com

Change-Id: I49f6c7af4917cf268fa2ed009677748b7d4a3bbc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263936
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-01-12 10:56:38 +00:00
Mike Reed
cb6b9e3c35 allow clients to opt into new didTranslate/didScale
Before
    148.97  	canvas_matrix_4x4	8888
    139.96  	canvas_matrix_3x3	8888
    139.81  	canvas_matrix_2x3	8888
    183.13  	canvas_matrix_scale	8888
    153.72  	canvas_matrix_trans	8888

After
    ...
    114.68  	canvas_matrix_scale	8888
    112.96  	canvas_matrix_trans	8888

Change-Id: I79d20ea6ab6aa9609143c7abf4acaa8ca08dd58f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263818
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-01-12 01:40:57 +00:00
Mike Reed
a092028439 Revert "new virtuals for canvas ctm"
This reverts commit 2076b04d15.

Reason for revert: speculative: breaking google3 flutter scuba?

Original change's description:
> new virtuals for canvas ctm
> 
> 1. Feature: Clients need to override didConcat44() (new data)
> 2. Perf: Clients need to override didTranslate (and now didScale) so our
>          default impls can be empty.
> 
> Need SK_SUPPORT_LEGACY_CANVAS_MATRIX_VIRTUALS flag to stage this in
> clients (anyone who subclasses SkCanvas)
> 
> Before (with flag)
>     120.87  	canvas_matrix_4x4	8888
>     108.10 ?	canvas_matrix_3x3	8888
>     108.13 ?	canvas_matrix_2x3	8888
>     141.54  	canvas_matrix_scale	8888
>     128.04  	canvas_matrix_trans	8888
> 
> After (without the flag)
>     ...
>      90.79  	canvas_matrix_scale	8888
>      94.51  	canvas_matrix_trans	8888
> 
> bug: skia:9768
> 
> Change-Id: I6f500138dd6b2b24754dc065c650d0bd3c341540
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263349
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Florin Malita <fmalita@chromium.org>

TBR=fmalita@chromium.org,reed@google.com

Change-Id: I9c2e39ea0aa2b19d40eb6454c233258ab7f35829
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263564
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-01-10 14:26:41 +00:00
Mike Reed
2076b04d15 new virtuals for canvas ctm
1. Feature: Clients need to override didConcat44() (new data)
2. Perf: Clients need to override didTranslate (and now didScale) so our
         default impls can be empty.

Need SK_SUPPORT_LEGACY_CANVAS_MATRIX_VIRTUALS flag to stage this in
clients (anyone who subclasses SkCanvas)

Before (with flag)
    120.87  	canvas_matrix_4x4	8888
    108.10 ?	canvas_matrix_3x3	8888
    108.13 ?	canvas_matrix_2x3	8888
    141.54  	canvas_matrix_scale	8888
    128.04  	canvas_matrix_trans	8888

After (without the flag)
    ...
     90.79  	canvas_matrix_scale	8888
     94.51  	canvas_matrix_trans	8888

bug: skia:9768

Change-Id: I6f500138dd6b2b24754dc065c650d0bd3c341540
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263349
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2020-01-10 13:30:11 +00:00
Michael Ludwig
55edb50262 Update tests to use new image filter factories
Bug: skia:9280
Change-Id: Id8253baa6ca387b6f2f0583f29b2c25cc1005545
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230880
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-08-05 15:15:45 +00:00
Mike Klein
c0bd9f9fe5 rewrite includes to not need so much -Ifoo
Current strategy: everything from the top

Things to look at first are the manual changes:

   - added tools/rewrite_includes.py
   - removed -Idirectives from BUILD.gn
   - various compile.sh simplifications
   - tweak tools/embed_resources.py
   - update gn/find_headers.py to write paths from the top
   - update gn/gn_to_bp.py SkUserConfig.h layout
     so that #include "include/config/SkUserConfig.h" always
     gets the header we want.

No-Presubmit: true
Change-Id: I73a4b181654e0e38d229bc456c0d0854bae3363e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209706
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-04-24 16:27:11 +00:00
Mike Klein
8f4e224541 de-Sk tools/debugger
Change-Id: I489a54860139d1820471aa0330b29a8ae9eca31e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/202316
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-03-20 18:27:01 +00:00
Mike Reed
704a3429e6 Abandon onDrawText and its variants, turn everything into textblobs
Follow-ups assuming this sticks:
- remove client overrides, so we can remove the (empty) base class virtuals
- mark as obsolete the .skp enums for these entrypoints, and note date
- remove glyphrunlist helpers that now may not have any callers
- remove DrawCommands related to these entrypoints

Bug: skia:
Change-Id: I44b4e6ef3bee61911e77b9b2ab73f82c0817536a
Reviewed-on: https://skia-review.googlesource.com/c/175240
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2018-12-06 21:54:20 +00:00
Mike Klein
738b80d8a5 Don't use getDeviceClipBounds() to bound pic ops.
The values returned by SkCanvas::getDeviceClipBounds() are in the right
space, but have extra constraints on them that are not desirable for
bounding the logical bounds of draw operations:

  - they are integral
  - they are non-negative

We've been intersecting the bounds of each operation with these bounds,
which means we're mixing these bogus constraints into the bounds of each
recorded operation.  This percolates up to the SkPicutre cull rect too.

The most egregious way to see the problem is to record a draw op
entirely in negative space... it'll come back with empty logical bounds
rather than its correct (negative-space) bounds.  I've added a test
for this, and another test I also think should be passing but left
making it so as a follow up.

I've had to disable a couple tests asserting clips affect the bounds. :/

A possible follow-up might go back to using the clips to tighten the
bounds of the ops, just so long as we take the original user bounds and
map them with the CTM through to device space ourselves, rather than
relying on the recording canvas' clip stack.  I think this means we'd
need to maintain our own stack of device-space float SkRect clip bounds
while calculating these op bounds.

Bug: skia:7735
Change-Id: I6bf15f6b2a9ba4329a4eeae7f9d57aa8729ec1bb
Reviewed-on: https://skia-review.googlesource.com/126002
Commit-Queue: Mike Klein <mtklein@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@chromium.org>
Reviewed-by: Brian Osman <brianosman@google.com>
2018-05-04 18:56:13 +00:00
Cary Clark
e041e31926 remove canvas internal private
interfaces not called externally
and aren't used internally

R=robertphillips@google.com,reed@google.com
Bug: skia:6455
Change-Id: Iee98ce4380a28a831d9bffe99932b54421dd339a
Reviewed-on: https://skia-review.googlesource.com/112481
Commit-Queue: Cary Clark <caryclark@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-03-06 19:06:16 +00:00
Ben Wagner
a93a14a998 Convert NULL and 0 to nullptr.
This was created by looking at warnings produced by clang's
-Wzero-as-null-pointer-constant. This updates most issues in
Skia code. However, there are places where GL and Vulkan want
pointer values which are explicitly 0, external headers which
use NULL directly, and possibly more uses in un-compiled
sources (for other platforms).

Change-Id: Id22fbac04d5c53497a53d734f0896b4f06fe8345
Reviewed-on: https://skia-review.googlesource.com/39521
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-08-28 17:48:57 +00:00
reed
374772bd61 Revert[8] "replace SkXfermode obj with SkBlendMode enum in paints"
This reverts commit c245574ba3.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2396953002

TBR=

Review-Url: https://codereview.chromium.org/2396953002
2016-10-05 17:33:03 -07:00
Mike Reed
c245574ba3 Revert[7] "replace SkXfermode obj with SkBlendMode enum in paints"
This reverts commit Ib4a154cdd5f5d1dcac921ef50d53b79a2d6a1be8.

Reason for revert: new assert from 100K bot

Original change's description:
> Revert[6] "replace SkXfermode obj with SkBlendMode enum in paints"
> 
> - perform version check in CreateProc for XfermodeImageFilter and ArithmeticImageFilter
> This reverts commit 3ed485f424.
> 
> BUG=skia:
> 
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2992
> 
> Change-Id: Ib4a154cdd5f5d1dcac921ef50d53b79a2d6a1be8
> Reviewed-on: https://skia-review.googlesource.com/2992
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
> 

TBR=reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I848e5a69c5cd67f2c14889f4f0a346652578c4ff
Reviewed-on: https://skia-review.googlesource.com/3023
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2016-10-05 20:20:14 +00:00
Mike Reed
2b2fc7db4f Revert[6] "replace SkXfermode obj with SkBlendMode enum in paints"
- perform version check in CreateProc for XfermodeImageFilter and ArithmeticImageFilter
This reverts commit 3ed485f424.

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2992

Change-Id: Ib4a154cdd5f5d1dcac921ef50d53b79a2d6a1be8
Reviewed-on: https://skia-review.googlesource.com/2992
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2016-10-05 18:31:17 +00:00
Mike Reed
3ed485f424 Revert[5] "replace SkXfermode obj with SkBlendMode enum in paints"
This reverts commit I0fa5c58af428f3da8565465d1219a34ef8417d9a.

Reason for revert: failing to deserialize some of the 100K

Original change's description:
> Revert[4] "replace SkXfermode obj with SkBlendMode enum in paints"
> 
> This reverts commit 2cbcd12281.
> 
> BUG=skia:
> 
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2924
> 
> Change-Id: I0fa5c58af428f3da8565465d1219a34ef8417d9a
> Reviewed-on: https://skia-review.googlesource.com/2924
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
> 

TBR=reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I1805a57eef5ebcac203da5989c8539345ecf806f
Reviewed-on: https://skia-review.googlesource.com/2962
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2016-10-04 21:35:56 +00:00
Mike Reed
1834242ec6 Revert[4] "replace SkXfermode obj with SkBlendMode enum in paints"
This reverts commit 2cbcd12281.

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2924

Change-Id: I0fa5c58af428f3da8565465d1219a34ef8417d9a
Reviewed-on: https://skia-review.googlesource.com/2924
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2016-10-04 20:09:34 +00:00
Mike Reed
2cbcd12281 Revert "Revert "Revert "replace SkXfermode obj with SkBlendMode enum in paints"""
This reverts commit I86875511a13497112827cbaed1dbd7639e9e3d10.

legacy (100K) skp failure

Original change's description:
> Revert "Revert "replace SkXfermode obj with SkBlendMode enum in paints""
> 
> This reverts commit ce02e71758.
> 
> BUG=skia:
> 
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2878
> 
> Change-Id: I86875511a13497112827cbaed1dbd7639e9e3d10
> Reviewed-on: https://skia-review.googlesource.com/2878
> Reviewed-by: Matt Sarett <msarett@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
> 

TBR=msarett@google.com,reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Ife6f0cf3a22b3e8cf885a188f7f44e1ff62e06a5
Reviewed-on: https://skia-review.googlesource.com/2881
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2016-10-03 21:34:36 +00:00
Mike Reed
70cdb396eb Revert "Revert "replace SkXfermode obj with SkBlendMode enum in paints""
This reverts commit ce02e71758.

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2878

Change-Id: I86875511a13497112827cbaed1dbd7639e9e3d10
Reviewed-on: https://skia-review.googlesource.com/2878
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2016-10-03 20:02:20 +00:00
Mike Reed
ce02e71758 Revert "replace SkXfermode obj with SkBlendMode enum in paints"
This reverts commit I4fb489ba6b3f77b458f7e4a99f79c7ad10859135.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> replace SkXfermode obj with SkBlendMode enum in paints
> 
> BUG=skia:5814
> 
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2714
> 
> Change-Id: I4fb489ba6b3f77b458f7e4a99f79c7ad10859135
> Reviewed-on: https://skia-review.googlesource.com/2714
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
> 

TBR=bsalomon@google.com,fmalita@chromium.org,fmalita@google.com,reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I3e43f79ef5c1709929663fe63cc1f67cd78270b7
Reviewed-on: https://skia-review.googlesource.com/2871
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2016-10-03 18:03:29 +00:00
Mike Reed
0591897548 replace SkXfermode obj with SkBlendMode enum in paints
BUG=skia:5814

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2714

Change-Id: I4fb489ba6b3f77b458f7e4a99f79c7ad10859135
Reviewed-on: https://skia-review.googlesource.com/2714
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2016-10-03 17:17:10 +00:00
robertphillips
c416912da4 Update DropShadowImageFilter to sk_sp
TBR=reed@google.com

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1861843002

Review URL: https://codereview.chromium.org/1861843002
2016-04-06 08:40:59 -07:00
reed
e8f3062a36 switch surface to sk_sp
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1817383002
CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot

Review URL: https://codereview.chromium.org/1817383002
2016-03-23 18:59:25 -07:00
reed
9ce9d6772d update callsites for Make image factories
not forced yet, as we still have the build-guard. waiting on chrome CL

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1810813003

TBR=

Review URL: https://codereview.chromium.org/1810813003
2016-03-17 10:51:11 -07:00
mtklein
e9d2052e49 Record concat as Concat.
This seems to cause very slight diffs on GMs.
https://gold.skia.org/search2?issue=1462983002&unt=true&query=source_type%3Dgm&master=false

I'm not sure I understand why.
The diffs to at least pictureshader look like improvements.

BUG=skia:4584

Review URL: https://codereview.chromium.org/1462983002
2015-11-19 12:08:24 -08:00
halcanary
6950de6c41 Comments Style: s/skbug.com/bug.skia.org/
DOCS_PREVIEW= https://skia.org/?cl=1432503003

Review URL: https://codereview.chromium.org/1432503003
2015-11-07 05:29:00 -08:00
mtklein
40732b34a1 SkRecord refactor: fill bounds array instead of BBH directly
This should be a strict refactor, just pulling out the bounds array.
(It's the rescued nice parts of a dead-end CL targeting skia:4492.)

BUG=skia:

Review URL: https://codereview.chromium.org/1424553002
2015-10-24 07:45:47 -07:00
halcanary
96fcdcc219 Style Change: NULL->nullptr
DOCS_PREVIEW= https://skia.org/?cl=1316233002

Review URL: https://codereview.chromium.org/1316233002
2015-08-27 07:41:16 -07:00
mtklein
c6ad06acef unsigned -> int for counts and indices in picture-related code
also, (C)

BUG=skia:

Review URL: https://codereview.chromium.org/1300163002
2015-08-19 09:51:01 -07:00
reed
e47829b6b1 flag to use const& instead of const* for src-rect
BUG=skia:

Review URL: https://codereview.chromium.org/1272713005
2015-08-06 10:02:53 -07:00
reed
562fe4767c remove all guards for changes to drawBitmapRect / drawImageRect
BUG=skia:

Review URL: https://codereview.chromium.org/1239193002
2015-07-28 07:35:14 -07:00
reed
a5517e2b19 add src-rect-constraint to drawImageRect
Follow-on work
- unify around SrcRectConstraint (i.e. drawBitmapRect)
- remove silly drawBitmapRectToRect alias
- clean-up (possibly remove) alias problems around drawBitmapRect + IRect parameter

BUG=skia:

Review URL: https://codereview.chromium.org/1228083004
2015-07-14 10:54:12 -07:00
mtklein
36352bf5e3 C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla}
NOPRESUBMIT=true

BUG=skia:
DOCS_PREVIEW= https://skia.org/?cl=1037793002

Review URL: https://codereview.chromium.org/1037793002
2015-03-25 18:17:32 -07:00
schenney
23d8593f81 Update SkPicture cull rects with RTree information
When computed, the RTree for an SkPicture will have a root
bounds that reflects the best bounding information available,
rather than the best estimate at the time the picture recorder
is created. Given that creators frequently don't know ahead of
time what will be drawn, the RTree bound is often tighter.

Perf testing on Chrome indicates a small raster performance
advantage. For upcoming painting changes in Chrome the
performance advantage is much larger.

BUG=

Committed: https://skia.googlesource.com/skia/+/2dd3b6647dc726f36fd8774b3d0d2e83b493aeac

Review URL: https://codereview.chromium.org/971803002
2015-03-06 16:20:28 -08:00
joshualitt
a0865b4620 Revert of Update SkPicture cull rects with RTree information (patchset #6 id:140001 of https://codereview.chromium.org/971803002/)
Reason for revert:
Might be breaking deps roll

Original issue's description:
> Update SkPicture cull rects with RTree information
>
> When computed, the RTree for an SkPicture will have a root
> bounds that reflects the best bounding information available,
> rather than the best estimate at the time the picture recorder
> is created. Given that creators frequently don't know ahead of
> time what will be drawn, the RTree bound is often tighter.
>
> Perf testing on Chrome indicates a small raster performance
> advantage. For upcoming painting changes in Chrome the
> performance advantage is much larger.
>
> BUG=
>
> Committed: https://skia.googlesource.com/skia/+/2dd3b6647dc726f36fd8774b3d0d2e83b493aeac

TBR=mtklein@google.com,schenney@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

Review URL: https://codereview.chromium.org/977413003
2015-03-05 12:18:38 -08:00
schenney
2dd3b6647d Update SkPicture cull rects with RTree information
When computed, the RTree for an SkPicture will have a root
bounds that reflects the best bounding information available,
rather than the best estimate at the time the picture recorder
is created. Given that creators frequently don't know ahead of
time what will be drawn, the RTree bound is often tighter.

Perf testing on Chrome indicates a small raster performance
advantage. For upcoming painting changes in Chrome the
performance advantage is much larger.

BUG=

Review URL: https://codereview.chromium.org/971803002
2015-03-05 07:43:10 -08:00
mtklein
bfd5bff75c Simplify SkBBH::insert API
No one's exploiting the ability to take ownership of the array anymore.

BUG=skia:

Review URL: https://codereview.chromium.org/913833002
2015-02-10 13:44:27 -08:00
mtklein
72c9faab45 Fix up all the easy virtual ... SK_OVERRIDE cases.
This fixes every case where virtual and SK_OVERRIDE were on the same line,
which should be the bulk of cases.  We'll have to manually clean up the rest
over time unless I level up in regexes.

for f in (find . -type f); perl -p -i -e 's/virtual (.*)SK_OVERRIDE/\1SK_OVERRIDE/g' $f; end

BUG=skia:

Review URL: https://codereview.chromium.org/806653007
2015-01-09 10:06:40 -08:00
robertphillips
783fe16b8e Rename SkDrawPictureCallback to SkPicture::AbortCallback
Committed: https://skia.googlesource.com/skia/+/7ef197255deb4e2fa64c03c7130d56ddf164e83c

Review URL: https://codereview.chromium.org/829983003
2015-01-07 07:28:41 -08:00