aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkCanvas.cpp
Commit message (Collapse)AuthorAge
...
* hide virtual and rename to onMakeComposedGravatar Mike Reed2018-02-19
| | | | | | | | Bug: skia: Change-Id: Ic18ee2af3273f81ebec9c9031162e808186c0acd Reviewed-on: https://skia-review.googlesource.com/108300 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Reland "remove SkCanvas::kIsOpaque_SaveLayerFlag"Gravatar Mike Klein2018-02-07
| | | | | | | | | | | | | | | | | | | | | | | This reverts the revert 9ff8c8c073ba553dc8b22bb9aacc23949292f72f. Original: This is a performance-only hint that no one but fuzzers is using. It's even explicitly filtered out in Android. The fuzzers have noticed they can trick us into allocating uninitialized memory and treating it as opaque, blending uninitialized pixels, etc. Since no one's using this, we can just kill the bit. Bug: skia:7566, chromium:808830 Docs-Preview: https://skia.org/?cl=105282 Change-Id: I4326c663f777aa373ff7ec9f319519da9729350d Reviewed-on: https://skia-review.googlesource.com/105282 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Revert "remove SkCanvas::kIsOpaque_SaveLayerFlag"Gravatar Mike Klein2018-02-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 9a7a2ee5ad8453a985d7d76c1e0ebb50d17fec63. Reason for revert: still need to update blink_headless in Google3 Original change's description: > remove SkCanvas::kIsOpaque_SaveLayerFlag > > This is a performance-only hint that no one but fuzzers > is using. It's even explicitly filtered out in Android. > > The fuzzers have noticed they can trick us into allocating > uninitialized memory and treating it as opaque, blending > uninitialized pixels, etc. > > Since no one's using this, we can just kill the bit. > > Bug: skia:7566, chromium:808830 > > Change-Id: Id74a85e51bc4d0907b4127eb9ac5b02576f8f0a7 > Reviewed-on: https://skia-review.googlesource.com/104441 > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Mike Klein <mtklein@chromium.org> TBR=mtklein@chromium.org,fmalita@chromium.org,reed@google.com Change-Id: I10d3c7e5184b9322715a5bfb6a7106292c8876a3 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7566, chromium:808830 Reviewed-on: https://skia-review.googlesource.com/104781 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
* remove SkCanvas::kIsOpaque_SaveLayerFlagGravatar Mike Klein2018-02-07
| | | | | | | | | | | | | | | | | | This is a performance-only hint that no one but fuzzers is using. It's even explicitly filtered out in Android. The fuzzers have noticed they can trick us into allocating uninitialized memory and treating it as opaque, blending uninitialized pixels, etc. Since no one's using this, we can just kill the bit. Bug: skia:7566, chromium:808830 Change-Id: Id74a85e51bc4d0907b4127eb9ac5b02576f8f0a7 Reviewed-on: https://skia-review.googlesource.com/104441 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* don't draw images with nonfinite dst boundsGravatar Mike Reed2018-01-30
| | | | | | | | Bug: skia: Change-Id: I95f32f8b9d6c47c3d95c0a19f7fdaaa6a648ef09 Reviewed-on: https://skia-review.googlesource.com/101745 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "hide picture virtuals (no public callers)"Gravatar Mike Klein2018-01-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 8005bff7e631a269f0dfaae93ff9963dc0e5ff39. Reason for revert: hwui, flutter, and headless blink in G3 all still using these. Original change's description: > hide picture virtuals (no public callers) > > This prepares the way for a clean impl of a "placeholder" picture that never unrolls > > Bug: skia: > Change-Id: I3b5785c5c94432b54e9a7dc280b2a6e716592473 > Reviewed-on: https://skia-review.googlesource.com/100260 > Commit-Queue: Mike Reed <reed@google.com> > Reviewed-by: Mike Klein <mtklein@chromium.org> TBR=mtklein@chromium.org,mtklein@google.com,reed@google.com Change-Id: I385789dd420588ea9a9390c8a44c6ecb96c7f358 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/100880 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
* hide picture virtuals (no public callers)Gravatar Mike Reed2018-01-27
| | | | | | | | | | This prepares the way for a clean impl of a "placeholder" picture that never unrolls Bug: skia: Change-Id: I3b5785c5c94432b54e9a7dc280b2a6e716592473 Reviewed-on: https://skia-review.googlesource.com/100260 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* require finite blob boundsGravatar Mike Reed2018-01-23
| | | | | | | | | | inspired by https://fuzzer.skia.org/category/image_filter_deserialize/file/aW5jbHVkZS9jb3JlL1NrUGFpbnQuaA==? Bug: skia: Change-Id: I490585b9fdc0b4b29565849478b97ed7f5057ca1 Reviewed-on: https://skia-review.googlesource.com/98800 Reviewed-by: Kevin Lubick <kjlubick@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Set empty device clip when an image filter has zero boundsGravatar Xianzhu Wang2018-01-22
| | | | | | | | | | | | | | When an image filter has zero input bounds, we should not paint any contents of it, so we should set an empty clip. This is like the case that the clip rect doesn't intersect with the image filter's input bounds. Bug: chromium:771643 Change-Id: I063c14128dacb83e3572bd2ef4dfeee93c871064 Reviewed-on: https://skia-review.googlesource.com/96943 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Stephen White <senorblanco@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* check for crazy bounds from fuzzerGravatar Mike Reed2018-01-19
| | | | | | | | Bug: skia:7471 Change-Id: I1d6e2059a0c4f2b705d3b0fe2694f17b68c3ae5c Reviewed-on: https://skia-review.googlesource.com/97122 Reviewed-by: Kevin Lubick <kjlubick@google.com> Commit-Queue: Mike Reed <reed@google.com>
* update pipe for lattice and shadowrecGravatar Mike Reed2018-01-03
| | | | | | | | | | | - move some lattice routines into shared helper (SkCanvasPriv) Bug: skia: Change-Id: Ibbb80dd7461c7fd3082a0220604ab42cbb8815be Reviewed-on: https://skia-review.googlesource.com/90540 Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Reed <reed@google.com>
* devirtualize SkCanvas getClipBounds methodsGravatar Mike Klein2017-11-29
| | | | | | | | | | | | | | We no longer have any subclasses overriding the virtual hooks, and we've seen subtle bugs come up back when they did. In all modes, SkCanvas can answer these queries itself. BUG=chromium:781238 Change-Id: I37c7511c7bd00c638faacbe4bee89f785691453f Reviewed-on: https://skia-review.googlesource.com/77202 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* rename overloaded methods as speculative fix/diagnosticGravatar Mike Reed2017-11-15
| | | | | | | | Bug:783136 Change-Id: I95df299bd9e1c6263b8e79b23fbe90340bd950e9 Reviewed-on: https://skia-review.googlesource.com/72240 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* add surfaceprops param to SkCanvas::MakeRasterDirectGravatar Mike Reed2017-11-08
| | | | | | | | Bug: skia: Change-Id: I8b69280469cdf34c3c3cb126db9457a712143f88 Reviewed-on: https://skia-review.googlesource.com/68701 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* Remove trailing whitespace.Gravatar Ben Wagner2017-10-09
| | | | | | | | | | | Also adds a presubmit to prevent adding trailing whitespace to source code in the future. Change-Id: I41a4df81487f6f00aa19b188f0cac6a3377efde6 Reviewed-on: https://skia-review.googlesource.com/57380 Reviewed-by: Ravi Mistry <rmistry@google.com> Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Convert NULL and 0 to nullptr.Gravatar Ben Wagner2017-08-28
| | | | | | | | | | | | | | 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>
* Cleanup tracing macros for use by the Android frameworkGravatar Derek Sollenberger2017-08-16
| | | | | | | Change-Id: I1b918cc55a5faba1e5c1e02ffeda5d5713866edd Reviewed-on: https://skia-review.googlesource.com/35282 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Derek Sollenberger <djsollen@google.com>
* Remove SkLightingShader and associated classesGravatar Robert Phillips2017-08-07
| | | | | | | | Change-Id: I8050414c30dfdb5df23ca79955adc5ba3a29d3f5 Reviewed-on: https://skia-review.googlesource.com/31140 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Assert text passed to canvas is initialized.Gravatar Ben Wagner2017-08-01
| | | | | | | | | | | | | | | | A new fuzzer appears to be complaining about using uninitialized glyph ids. These uninitilized glyph ids appear to be comming from far up the stack, but they don't actually get used until much later. If Skia is passed uninitialized memory in a draw call it will of course eventually need to use it and be blamed when it does. This change will make it obvious if the issue is up stack from Skia. BUG=chromium:750070,chromium:750071,chromium:750072 Change-Id: Ic6ca2f6af3620ad4a31cb017570f42550360891a Reviewed-on: https://skia-review.googlesource.com/29421 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Ben Wagner <bungeman@google.com>
* Normalize canvas tracingGravatar Brian Osman2017-07-26
| | | | | | | | | | | | | | Only trace the non-virtual entry points, and only the last such function on any chain before dispatching to the onXXX virtual. Cuts down on nested event chatter, and adds in events for several draw functions that had no tracing at all. Bug: skia: Change-Id: I89648769d4c900e27159e4f51af889347fc0f196 Reviewed-on: https://skia-review.googlesource.com/26900 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Automatically prepend "disabled-by-default-" to TRACE categoriesGravatar Brian Osman2017-07-26
| | | | | | | | | | | Ensures that all Skia events are disabled by default in Chrome, and eliminates redundant typing. Bug: skia: Change-Id: I289c5e5a01084fcf4cccf512da65a4727f4aeca2 Reviewed-on: https://skia-review.googlesource.com/26880 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Tracing macro cleanup continuedGravatar Brian Osman2017-07-26
| | | | | | | | | | | - Remove one especially chatty event, and one pointless test - Use TRACE_FUNC everywhere, rather than manual strings Bug: skia: Change-Id: Icb795294009150ca9a260436738d79546a733337 Reviewed-on: https://skia-review.googlesource.com/26701 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Brian Osman <brianosman@google.com>
* Add category support to JSON and SkDebugf tracingGravatar Brian Osman2017-07-21
| | | | | | | | Bug: skia: Change-Id: I4d0bdb9d954e49b79ace0552d7b74b36a512c00d Reviewed-on: https://skia-review.googlesource.com/25642 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Brian Osman <brianosman@google.com>
* clean read/write pixels signatures, augment SkSurface APIGravatar Mike Reed2017-07-21
| | | | | | | | | | | For now, not adding writePixels to surface, since it appears we may not be able to remove writePixels from canvas :( Bug: skia:3216 Change-Id: I64ccebb31effacffe615ae4537fb46a161a6768d Reviewed-on: https://skia-review.googlesource.com/25562 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Mike Reed <reed@google.com>
* guard references to SkColorTableGravatar Mike Reed2017-07-18
| | | | | | | | Bug: skia:6828 Change-Id: I0c8c78e70b118f51cb59dc45675e4ddcd4776108 Reviewed-on: https://skia-review.googlesource.com/24260 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com>
* SkDevice::drawBitmap takes x,y, not matrixGravatar Hal Canary2017-06-27
| | | | | | | | | Motivation: a simpler call should make it easier for SkPDF to learn how to do drawBitmap with A8 bitmap and a maskfilter. Change-Id: I1a5d190b40b0e9e08fa8876d265a9835a3e9987d Reviewed-on: https://skia-review.googlesource.com/20961 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Retract GrTexture*.h & GrRenderTarget*.h from other headersGravatar Robert Phillips2017-06-13
| | | | | | | | | This does push some additional work (& includes) into the .cpp files. Change-Id: I27c847e371802270d13594dcc22aae44039990bb Reviewed-on: https://skia-review.googlesource.com/19660 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* SkSTArenaAllocGravatar Florin Malita2017-05-24
| | | | | | | | | Syntactic sugar, gets rid of some boilerplate. Change-Id: Ibdb28b7a8f1d5e4a4e18c12d423b987d7194e340 Reviewed-on: https://skia-review.googlesource.com/17837 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Herb Derby <herb@google.com>
* color-correct patchGravatar Mike Reed2017-05-23
| | | | | | | | | | | Key work is to correctly convert SkColor corners into linear floats, then interpolate, then (correctly) convert back to SkColors. Bug: skia:6659 Change-Id: Iaf0ab842d7a4f8f3481e609903cec83814e5a749 Reviewed-on: https://skia-review.googlesource.com/17533 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Add GM to verify that drawX == (path.addX, drawPath)Gravatar Brian Osman2017-05-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This demonstrates a new kind of hybrid unit test/GM. It creates a grid of cells. In each cell, we do two renders that are expected to produce the same result. For each cell, we render the two results overlaid, and highlight any differing pixels in red. Assuming there is a diff, the area around the largest diff is drawn zoomed in from both images. Matching cells are outlined in green, failing cells are outlined in red. Triaging this GM just involves answering the question: "Are there any red boxes?" "Good" example: https://screenshot.googleplex.com/909P3tvS55f.png "Bad" example: https://screenshot.googleplex.com/oXBWbEKw5ur.png To get more tests to pass, (and fix an assert in Ganesh), I've gone ahead and enforced that user supplied rects (in drawRect and drawOval) are always sorted once they hit the canvas virtuals. Currently, drawArc rejects empty ovals, but I added the same assert to onDrawArc, if we decide to change the strategy there. Re-land of: https://skia-review.googlesource.com/c/16983/ Bug: skia: Change-Id: I48f85de5f2bcb7fdc9558c2fd80cb1f20800b244 Reviewed-on: https://skia-review.googlesource.com/17270 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Revert "Add GM to verify that drawX == (path.addX, drawPath)"Gravatar Greg Daniel2017-05-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 78d1b428a8e8a0b76e88e9266d2893136acd5906. Reason for revert: break preabandongpu bot Original change's description: > Add GM to verify that drawX == (path.addX, drawPath) > > This demonstrates a new kind of hybrid unit test/GM. > It creates a grid of cells. In each cell, we do two > renders that are expected to produce the same result. > For each cell, we render the two results overlaid, > and highlight any differing pixels in red. Assuming > there is a diff, the area around the largest diff > is drawn zoomed in from both images. > > Matching cells are outlined in green, failing cells > are outlined in red. Triaging this GM just involves > answering the question: "Are there any red boxes?" > > "Good" example: https://screenshot.googleplex.com/909P3tvS55f.png > "Bad" example: https://screenshot.googleplex.com/oXBWbEKw5ur.png > > To get more tests to pass, (and fix an assert > in Ganesh), I've gone ahead and enforced that user > supplied rects (in drawRect and drawOval) are > always sorted once they hit the canvas virtuals. > Currently, drawArc rejects empty ovals, but I added > the same assert to onDrawArc, if we decide to change > the strategy there. > > Bug: skia: > Change-Id: I021a18c85e234298e1d29f333662683d996dd42c > Reviewed-on: https://skia-review.googlesource.com/16983 > Commit-Queue: Brian Osman <brianosman@google.com> > Reviewed-by: Mike Klein <mtklein@chromium.org> > Reviewed-by: Mike Reed <reed@google.com> > TBR=mtklein@chromium.org,mtklein@google.com,brianosman@google.com,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Bug: skia: Change-Id: Id1ead4e22115c49cad5d0adb6151ede81734b4d3 Reviewed-on: https://skia-review.googlesource.com/17269 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Add GM to verify that drawX == (path.addX, drawPath)Gravatar Brian Osman2017-05-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This demonstrates a new kind of hybrid unit test/GM. It creates a grid of cells. In each cell, we do two renders that are expected to produce the same result. For each cell, we render the two results overlaid, and highlight any differing pixels in red. Assuming there is a diff, the area around the largest diff is drawn zoomed in from both images. Matching cells are outlined in green, failing cells are outlined in red. Triaging this GM just involves answering the question: "Are there any red boxes?" "Good" example: https://screenshot.googleplex.com/909P3tvS55f.png "Bad" example: https://screenshot.googleplex.com/oXBWbEKw5ur.png To get more tests to pass, (and fix an assert in Ganesh), I've gone ahead and enforced that user supplied rects (in drawRect and drawOval) are always sorted once they hit the canvas virtuals. Currently, drawArc rejects empty ovals, but I added the same assert to onDrawArc, if we decide to change the strategy there. Bug: skia: Change-Id: I021a18c85e234298e1d29f333662683d996dd42c Reviewed-on: https://skia-review.googlesource.com/16983 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Reed <reed@google.com>
* move shadows to device virtualGravatar Mike Reed2017-05-17
| | | | | | | | | | | | | This CL keeps the impl for each device backend in the utils file for simplicity (shared helpers). Future CLs may move into their respective impl as they become more specialized. Bug: skia: Change-Id: I97ce6cdcc5106ebf4c84778f943cc32d0b7613c1 Reviewed-on: https://skia-review.googlesource.com/15893 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* Sort all user-supplied rects before computeFastBoundsGravatar Brian Osman2017-05-13
| | | | | | | | | | | | | | | | https://codereview.chromium.org/908353002 fixed drawRect 2+ years ago, but drawOval and drawArc were still susceptible. This version ensures that all rects are sorted before we do the bounds check. Added a new makeSorted helper to simplify the code, and an assert to catch any future oversight. All other drawing functions compute their bounds rect in some way that already ensures it is sorted. Bug: skia: Change-Id: I8926b2dbe9d496d0876f1ac5313bd058ae4568b7 Reviewed-on: https://skia-review.googlesource.com/16702 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Revert "Revert "Reland: Remove SkLights include from SkCanvas.h""Gravatar Florin Malita2017-05-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 9d5f66d9c21eda7d3e2ed47654180c0c4b6e38b1. Reason for revert: Leon landed Android fixes. Original change's description: > Revert "Reland: Remove SkLights include from SkCanvas.h" > > This reverts commit fed00319c9bafa41c8df658708030c072b301a41. > > Reason for revert: breaking the Android roll. > > Original change's description: > > Reland: Remove SkLights include from SkCanvas.h > > > > SkLights.h pulls in a bunch of other headers and is not needed (fwdecl > > works fine). > > > > Change-Id: I3ed97cd7861e51dcb7cfa7950a97b420dbc6fbfb > > TBR=reed@google.com > > Reviewed-on: https://skia-review.googlesource.com/15143 > > Commit-Queue: Florin Malita <fmalita@chromium.org> > > Reviewed-by: Florin Malita <fmalita@chromium.org> > > > > TBR=fmalita@chromium.org,reed@google.com > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Change-Id: I3b0e69f1d04d160f16a5567b09982d35cc9ca84e > Reviewed-on: https://skia-review.googlesource.com/15195 > Reviewed-by: Florin Malita <fmalita@chromium.org> > Commit-Queue: Florin Malita <fmalita@chromium.org> > TBR=msarett@google.com,reviews@skia.org,fmalita@chromium.org,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I0a1c2f9df61f16987ab72dfb4f3a205fbcc37667 Reviewed-on: https://skia-review.googlesource.com/15229 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Revert "Reland: Remove SkLights include from SkCanvas.h"Gravatar Florin Malita2017-05-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit fed00319c9bafa41c8df658708030c072b301a41. Reason for revert: breaking the Android roll. Original change's description: > Reland: Remove SkLights include from SkCanvas.h > > SkLights.h pulls in a bunch of other headers and is not needed (fwdecl > works fine). > > Change-Id: I3ed97cd7861e51dcb7cfa7950a97b420dbc6fbfb > TBR=reed@google.com > Reviewed-on: https://skia-review.googlesource.com/15143 > Commit-Queue: Florin Malita <fmalita@chromium.org> > Reviewed-by: Florin Malita <fmalita@chromium.org> > TBR=fmalita@chromium.org,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I3b0e69f1d04d160f16a5567b09982d35cc9ca84e Reviewed-on: https://skia-review.googlesource.com/15195 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Reland: Remove SkLights include from SkCanvas.hGravatar Florin Malita2017-05-03
| | | | | | | | | | | SkLights.h pulls in a bunch of other headers and is not needed (fwdecl works fine). Change-Id: I3ed97cd7861e51dcb7cfa7950a97b420dbc6fbfb TBR=reed@google.com Reviewed-on: https://skia-review.googlesource.com/15143 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Florin Malita <fmalita@chromium.org>
* Remove translateZ and lights from SkCanvasGravatar Jim Van Verth2017-05-02
| | | | | | | | Bug: skia:6557 Change-Id: I0dbf70c4131ab59e7fc6c674a6587767af98e13a Reviewed-on: https://skia-review.googlesource.com/15151 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Remove EXPERIMENTAL_SHADOWING, Part 1Gravatar Jim Van Verth2017-05-02
| | | | | | | | | Bug: skia:6557 Change-Id: I6482d74be7b360c93141a73dd80c67854530c7a1 Reviewed-on: https://skia-review.googlesource.com/15101 Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Revert "Remove SkLights include from SkCanvas.h"Gravatar Florin Malita2017-05-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 9ff301bf918cd85d9f67047f10631b7a74345a90. Reason for revert: need to update G3, Flutter. Original change's description: > Remove SkLights include from SkCanvas.h > > SkLights.h pulls in a bunch of other headers and is not needed (fwdecl > works fine). > > Change-Id: Id2d7176eb3bf4609f72f46d513eebf59318f542f > Reviewed-on: https://skia-review.googlesource.com/14904 > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Florin Malita <fmalita@chromium.org> > TBR=mtklein@google.com,fmalita@chromium.org,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I4799ad5b31aaeaf529c8b912bbe09aa8869a5e6c Reviewed-on: https://skia-review.googlesource.com/15107 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Remove SkLights include from SkCanvas.hGravatar Florin Malita2017-05-02
| | | | | | | | | | SkLights.h pulls in a bunch of other headers and is not needed (fwdecl works fine). Change-Id: Id2d7176eb3bf4609f72f46d513eebf59318f542f Reviewed-on: https://skia-review.googlesource.com/14904 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Revert "Revert "SaveLayerRec::fClipMask -> raw pointer""Gravatar Mike Klein2017-05-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 3354969a4a4adcea159f3a0b01ad0a7c04fc9115. Reason for revert: not the problem? Original change's description: > Revert "SaveLayerRec::fClipMask -> raw pointer" > > This reverts commit a6b72cb5729306fdd676d739c1e2c53afa0786a7. > > Reason for revert: red bots > > Original change's description: > > SaveLayerRec::fClipMask -> raw pointer > > > > Use raw pointers for optional clip mask plumbing, to match the backdrop > > API. > > > > Change-Id: I7eb0ee5896faf34cc05789ba0703f35a4ab6a4f2 > > Reviewed-on: https://skia-review.googlesource.com/14901 > > Reviewed-by: Mike Reed <reed@google.com> > > Commit-Queue: Florin Malita <fmalita@chromium.org> > > > > TBR=fmalita@chromium.org,reed@google.com > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Change-Id: I4387620cdc3410018af9cef221e5cf8d09015380 > Reviewed-on: https://skia-review.googlesource.com/14955 > Reviewed-by: Mike Klein <mtklein@chromium.org> > Commit-Queue: Mike Klein <mtklein@chromium.org> > TBR=mtklein@chromium.org,reviews@skia.org,fmalita@chromium.org,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I6dde9e0441928f7a7423139a5c39f520f892f4b5 Reviewed-on: https://skia-review.googlesource.com/14958 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Revert "SaveLayerRec::fClipMask -> raw pointer"Gravatar Mike Klein2017-05-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit a6b72cb5729306fdd676d739c1e2c53afa0786a7. Reason for revert: red bots Original change's description: > SaveLayerRec::fClipMask -> raw pointer > > Use raw pointers for optional clip mask plumbing, to match the backdrop > API. > > Change-Id: I7eb0ee5896faf34cc05789ba0703f35a4ab6a4f2 > Reviewed-on: https://skia-review.googlesource.com/14901 > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Florin Malita <fmalita@chromium.org> > TBR=fmalita@chromium.org,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I4387620cdc3410018af9cef221e5cf8d09015380 Reviewed-on: https://skia-review.googlesource.com/14955 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* SaveLayerRec::fClipMask -> raw pointerGravatar Florin Malita2017-05-01
| | | | | | | | | | Use raw pointers for optional clip mask plumbing, to match the backdrop API. Change-Id: I7eb0ee5896faf34cc05789ba0703f35a4ab6a4f2 Reviewed-on: https://skia-review.googlesource.com/14901 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Initial clip-mask-layer supportGravatar Florin Malita2017-05-01
| | | | | | | | | | | | | | SkBitmapDevice-only implementation. Will add A8 fast path specializations in a follow-up. Change-Id: I2ccb1ffba3689e92ac90a23e94737471dfb121a1 BUG=skia:6005 Change-Id: I2ccb1ffba3689e92ac90a23e94737471dfb121a1 Reviewed-on: https://skia-review.googlesource.com/14183 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Remove temporary_internal_describeTopLayerGravatar Florin Malita2017-04-28
| | | | | | | Change-Id: I035b7db84b524be13fb675b75bc402bc9b733cb5 Reviewed-on: https://skia-review.googlesource.com/13803 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* add drawString helper to canvasGravatar Cary Clark2017-04-28
| | | | | | | | | | | | | | | | | | Many tests and examples use drawText with a guess of how long the text is in bytes, or a call to strlen(). Add a helper to SkCanvas to simplify these examples. Add another helper for SkString. R=reed@google.com Change-Id: I0204a31e938f065606f08ee7cd9a6b36db791ee2 Reviewed-on: https://skia-review.googlesource.com/13642 Commit-Queue: Cary Clark <caryclark@google.com> Reviewed-by: Cary Clark <caryclark@google.com> Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Cary Clark <caryclark@skia.org>
* add helper makeShader for the common Clamp caseGravatar Mike Reed2017-04-28
| | | | | | | | Bug: skia: Change-Id: I22cac56f35fed16daede0cf1b3e34dfa6f5ae3ea Reviewed-on: https://skia-review.googlesource.com/14625 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Scrub DeviceCMGravatar Florin Malita2017-04-28
| | | | | | | | | | | * remove unused fMatrix, fMatrixStorage * fPaint -> std::unique_ptr<> * fDevice -> sk_sp<> Change-Id: I790b54bfc4d8154216e620a8c1642f3955fe7be0 Reviewed-on: https://skia-review.googlesource.com/14624 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* remove dead code around SK_SUPPORT_LEGACY_CANVAS_READPIXELSGravatar Mike Reed2017-04-20
| | | | | | | | Bug: skia:6513 Change-Id: I8e4e0ffb371ae5b1af972110339e57d491ad9ff1 Reviewed-on: https://skia-review.googlesource.com/13779 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>