aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
Commit message (Collapse)AuthorAge
* Add SkICC::rawTransferFnData()Gravatar Matt Sarett2017-01-26
| | | | | | | | | BUG=skia: Change-Id: I912b044a0091a4d396c954d1ad1d84f5f8d50f56 Reviewed-on: https://skia-review.googlesource.com/7366 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* add test for big cubic -- currently disabledGravatar Mike Reed2017-01-26
| | | | | | | | | BUG=skia: Change-Id: Ief11a1e54d427b1241b47f3cfab5b44fb656443a Reviewed-on: https://skia-review.googlesource.com/7607 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Move SkGammaColorFilter to tools, limit to sRGBGravatar Brian Osman2017-01-26
| | | | | | | | | | | Similarly, limit GrGammaEffect to sRGB (and rename it). BUG=skia: Change-Id: I88feef11ab7040bca2fa4c2eed71923ded87a0d0 Reviewed-on: https://skia-review.googlesource.com/7375 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Remove redundant caps field from GrProcessorTestDataGravatar Brian Salomon2017-01-25
| | | | | | | Change-Id: Ic31338f08d1bd5b55ffab75d30c0f54436c8b917 Reviewed-on: https://skia-review.googlesource.com/7510 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Use GrSurfaceContext::read/write-Pixels moreGravatar Robert Phillips2017-01-25
| | | | | | | | Change-Id: I04bcaf91aa7a43e0563e332c1fe2836d762a04d4 Reviewed-on: https://skia-review.googlesource.com/7520 Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Add test for bad reuse of SkJpegCodec internal stateGravatar Matt Sarett2017-01-25
| | | | | | | | | | | | This is a test for the following fix: https://skia-review.googlesource.com/c/7451/ b/34637813 Change-Id: I3fdb0d7d50537948039b75c3a22454e789ca810a Reviewed-on: https://skia-review.googlesource.com/7454 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com>
* Revert "Remove SkImage::MakeTextureFromPixmap"Gravatar Brian Osman2017-01-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 8ccbbb455c6ef194920c47e846b95b50f5017138. Reason for revert: Chrome perf regression BUG=chrome:684483 Original change's description: > Remove SkImage::MakeTextureFromPixmap > > Another step towards reducing the number of texture upload paths. > > BUG=skia: > > Change-Id: Ica185e7334f52dc9ebf87e21fe6f60589ef87bb3 > Reviewed-on: https://skia-review.googlesource.com/7346 > Commit-Queue: Brian Osman <brianosman@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> > TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com,cblume@google.com # Not skipping CQ checks because original CL landed > 1 day ago. BUG=skia: Change-Id: I8bf6970b764018f3ebcac8123e4d6a8ad05317ff Reviewed-on: https://skia-review.googlesource.com/7484 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* conservativelyContainsRect is assertingGravatar Mike Reed2017-01-24
| | | | | | | | | BUG=skia:6156 Change-Id: Iea571f001e9a4c4e70313c1bd49fb4e3c598869a Reviewed-on: https://skia-review.googlesource.com/7423 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Reed <reed@google.com>
* restore bool version of clip-boundsGravatar Mike Reed2017-01-24
| | | | | | | | | BUG=skia: Change-Id: I94e35566cf5bcd250515c71a566dd79030e2acb4 Reviewed-on: https://skia-review.googlesource.com/7430 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* make SkPath::conservativelyContainsRect consume degenerate segmentsGravatar Lee Salzman2017-01-23
| | | | | | | | | BUG=skia: Change-Id: I3a39318bceaf6c95a50d84961d93af4ba62550e3 Reviewed-on: https://skia-review.googlesource.com/6900 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Stop tracking whether GrFragmentProcessors read their inputGravatar Brian Salomon2017-01-23
| | | | | | | Change-Id: Id5338901978b97289798eaef873527597bd8dfd6 Reviewed-on: https://skia-review.googlesource.com/7414 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Move shader register setup to SkRasterPipelineBlitter.Gravatar Mike Klein2017-01-23
| | | | | | | | | | | | | | | | | | | | | We've been seeding the initial values of our registers to x+0.5,y+0.5, 1,0, 0,0,0,0 (useful values for shaders to start with) in all pipelines. This CL changes that to do so only when blitting, and only when we have a shader. The nicest part of this change is that SkRasterPipeline itself no longer needs to have a concept of y, or what x means. It just marches x through [x,x+n), and the blitter handles y and layers the meaning of "dst x coordinate" onto x. This ought to make SkSplicer a little easier to work with too. dm --src gm --config f16 srgb 565 all draws the same. Change-Id: I69d8c1cc14a06e5dfdd6a7493364f43a18f8dec5 Reviewed-on: https://skia-review.googlesource.com/7353 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Reland "Refactor trimming logic for read/writePixels()"Gravatar Matt Sarett2017-01-23
| | | | | | | | | | | | | | | | | | | | | | | Original CL: https://skia-review.googlesource.com/c/7326/ (1) Move trimming logic into Bitmap/Pixmap level for raster. Everything goes through here, so we'll only do the work once. (2) This means it also goes to GPU level. (3) Always use SkReadPixelsRec rather than inlining the logic. (4) Create an SkWritePixelsRec to encapsulate write trimming. (5) Disabled kIndex8 as a dst - always. CQ_INCLUDE_TRYBOTS=skia.primary:Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug BUG=skia:6021 Change-Id: I25a964e3c610c4e36d195a255e2150657baec649 Reviewed-on: https://skia-review.googlesource.com/7404 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* change clip-bounds getters to always return the rectGravatar Mike Reed2017-01-23
| | | | | | | | | | | | | | | | | | (actually fixes undefined result in getClipBounds) future CLs - update all callers to new apis - move/rename virtuals BUG=skia: DOCS_PREVIEW= https://skia.org/?cl=7400 Change-Id: I45b93014e915c0d1c36d97d948c9ac8931f23258 Reviewed-on: https://skia-review.googlesource.com/7400 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "Refactor trimming logic for read/writePixels()"Gravatar Matt Sarett2017-01-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 977f64cbfad1ecd7fd4b1231c694c7e828fda1f0. Reason for revert: Triggering nanobench asserts Original change's description: > Refactor trimming logic for read/writePixels() > > (1) Move trimming logic into Bitmap/Pixmap level for > raster. Everything goes through here, so we'll > only do the work once. > (2) This means it also goes to GPU level. > (3) Always use SkReadPixelsRec rather than inlining > the logic. > (4) Create an SkWritePixelsRec to encapsulate write > trimming. > (5) Disabled kIndex8 as a dst - always. > > BUG=skia:6021 > > Change-Id: I748f50c3b726f7c6de5462e2b1ccb54bc387a510 > Reviewed-on: https://skia-review.googlesource.com/7326 > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Matt Sarett <msarett@google.com> > TBR=msarett@google.com,brianosman@google.com,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:6021 Change-Id: If9aacc6ce8b20e3dfe8a0f22ebca653f28356175 Reviewed-on: https://skia-review.googlesource.com/7379 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Matt Sarett <msarett@google.com>
* Revert "offset angle check edge in common"Gravatar Cary Clark2017-01-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit d2eb581ebc8f8009e80cccccd74d5b341ef5bd5b. Reason for revert: broke Google3 MSAN run of dm Original change's description: > offset angle check edge in common > > When curves cross, their intersection points may be nearby, but not exactly the same. > Sort the angles formed by the crossing curves when all angles don't have the same > origin. > > This sets up the framework to solve test case that currently fail (e.g., joel6) but > does not fix all related test cases (e.g., joel9). > > All older existing test cases, including extended tests, pass. > > Rework the test framework to better report when tests expected to produce failing > results now pass. > > Add new point and vector operations to support offset angles. > > TBR=reed@google.com > BUG=skia:6041 > > Change-Id: I67c651ded0a25e99ad93d55d6a35109b3ee3698e > Reviewed-on: https://skia-review.googlesource.com/6624 > Commit-Queue: Cary Clark <caryclark@google.com> > Reviewed-by: Cary Clark <caryclark@google.com> > TBR=caryclark@google.com,reviews@skia.org # Not skipping CQ checks because original CL landed > 1 day ago. BUG=skia:6041 Change-Id: I43db0808522ac44aceeb4f70e296167ea84a3663 Reviewed-on: https://skia-review.googlesource.com/7373 Commit-Queue: Cary Clark <caryclark@google.com> Reviewed-by: Cary Clark <caryclark@google.com>
* Refactor trimming logic for read/writePixels()Gravatar Matt Sarett2017-01-23
| | | | | | | | | | | | | | | | | | | (1) Move trimming logic into Bitmap/Pixmap level for raster. Everything goes through here, so we'll only do the work once. (2) This means it also goes to GPU level. (3) Always use SkReadPixelsRec rather than inlining the logic. (4) Create an SkWritePixelsRec to encapsulate write trimming. (5) Disabled kIndex8 as a dst - always. BUG=skia:6021 Change-Id: I748f50c3b726f7c6de5462e2b1ccb54bc387a510 Reviewed-on: https://skia-review.googlesource.com/7326 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* clipstack is now privateGravatar Mike Reed2017-01-21
| | | | | | | | | | BUG=skia: Change-Id: I91e601d59eb5d46de17c280898ca01fcfab89e5c NOTREECHECKS=True Reviewed-on: https://skia-review.googlesource.com/7362 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Remove SkImage::MakeTextureFromPixmapGravatar Brian Osman2017-01-20
| | | | | | | | | | | Another step towards reducing the number of texture upload paths. BUG=skia: Change-Id: Ica185e7334f52dc9ebf87e21fe6f60589ef87bb3 Reviewed-on: https://skia-review.googlesource.com/7346 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Continue making Ganesh use absolute texture coordinates - take 2Gravatar Robert Phillips2017-01-20
| | | | | | | | | | | | The idea here is that the GrCoordTransform will actually hold a GrTextureProxy (rather than a GrTexture) and then, in GrGLSLPrimitiveProcessor::GetTransformMatrix, use the instantiated width & height (when uploading the transform matrix) Relanding of: https://skia-review.googlesource.com/c/6977/ Change-Id: Ibc9b9e354f7fc23b1a6e6e4fe7c9fe3cef771c02 Reviewed-on: https://skia-review.googlesource.com/7265 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* offset angle check edge in commonGravatar Cary Clark2017-01-20
| | | | | | | | | | | | | | | | | | | | | | | | When curves cross, their intersection points may be nearby, but not exactly the same. Sort the angles formed by the crossing curves when all angles don't have the same origin. This sets up the framework to solve test case that currently fail (e.g., joel6) but does not fix all related test cases (e.g., joel9). All older existing test cases, including extended tests, pass. Rework the test framework to better report when tests expected to produce failing results now pass. Add new point and vector operations to support offset angles. TBR=reed@google.com BUG=skia:6041 Change-Id: I67c651ded0a25e99ad93d55d6a35109b3ee3698e Reviewed-on: https://skia-review.googlesource.com/6624 Commit-Queue: Cary Clark <caryclark@google.com> Reviewed-by: Cary Clark <caryclark@google.com>
* Remove GrTestTargetGravatar Robert Phillips2017-01-20
| | | | | | | Change-Id: I4d2e1aa54732ff75b44a197255035c0e04548219 Reviewed-on: https://skia-review.googlesource.com/7327 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Replace some GrSurface:read/writePixels with the GrSurfaceContext equivalentGravatar Robert Phillips2017-01-20
| | | | | | | Change-Id: I7b11a323b0c74ee70f52b1bd8be376fb7188cb19 Reviewed-on: https://skia-review.googlesource.com/7204 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Replaced all calls to fragmentPosition() with sk_FragCoordGravatar Ethan Nicholas2017-01-19
| | | | | | | | | BUG=skia: Change-Id: I179576e148ea6caf6e1c40f0a216421898bcb35d Reviewed-on: https://skia-review.googlesource.com/5941 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Fix reset and deleting behavior.Gravatar Herb Derby2017-01-19
| | | | | | | | | | * Reset the Arena state. * Call all the dtors before deleting the blocks. Change-Id: I6d90463966ac7bf9f0a4fda229f67d508c86bebb Reviewed-on: https://skia-review.googlesource.com/7308 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Added constant propagation and better variable liveness tracking to skslc.Gravatar Ethan Nicholas2017-01-19
| | | | | | | | | | | | | | | | | | This allows skslc to track the values of variables with constant values across multiple statements and replace variable references with constant values where appropriate. The improved liveness tracking allows skslc to realize that a variable is no longer alive if all references to it have been replaced. It is not yet doing much with this information; better dead code elimination is coming in a followup change. BUG=skia: Change-Id: I068c5d2e9a362e75299b1de1f4575339f5ddc3bb Reviewed-on: https://skia-review.googlesource.com/7302 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* new hacky api to get cliprgn for androidGravatar Mike Reed2017-01-19
| | | | | | | | | BUG=skia: Change-Id: I42711a474906084adb3c888a599ae02505726484 Reviewed-on: https://skia-review.googlesource.com/7220 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "Added constant propagation and better variable liveness tracking to"Gravatar Ethan Nicholas2017-01-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit f54b07121f81a56145fb118a2e18841fc135717d. Reason for revert: ASAN failure Original change's description: > Added constant propagation and better variable liveness tracking to > skslc. > > This allows skslc to track the values of variables with constant > values across multiple statements and replace variable references with > constant values where appropriate. > > The improved liveness tracking allows skslc to realize that a > variable is no longer alive if all references to it have been > replaced. It is not yet doing much with this information; better > dead code elimination is coming in a followup change. > > BUG=skia: > > Change-Id: I6bf267d478b769caf0063ac3597dc16bbe618cb4 > Reviewed-on: https://skia-review.googlesource.com/7033 > Commit-Queue: Ethan Nicholas <ethannicholas@google.com> > Reviewed-by: Greg Daniel <egdaniel@google.com> > TBR=egdaniel@google.com,ethannicholas@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Change-Id: Id2e26bce96b27df73948f8b32d3dff2e358ae0d6 Reviewed-on: https://skia-review.googlesource.com/7274 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
* Added constant propagation and better variable liveness tracking toGravatar Ethan Nicholas2017-01-19
| | | | | | | | | | | | | | | | | | | | skslc. This allows skslc to track the values of variables with constant values across multiple statements and replace variable references with constant values where appropriate. The improved liveness tracking allows skslc to realize that a variable is no longer alive if all references to it have been replaced. It is not yet doing much with this information; better dead code elimination is coming in a followup change. BUG=skia: Change-Id: I6bf267d478b769caf0063ac3597dc16bbe618cb4 Reviewed-on: https://skia-review.googlesource.com/7033 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Don't require GrPipelineBuilder to build GrPipelineGravatar Brian Salomon2017-01-19
| | | | | | | Change-Id: Ic978913aa9dd0811eac102755934d77b4853a568 Reviewed-on: https://skia-review.googlesource.com/7207 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Use fixed size buffer for RLE bmpsGravatar Leon Scroggins III2017-01-19
| | | | | | | | | | | | | | | | | | | | | | | An RLE bmp reports how many bytes it should contain. This number may be incorrect, or it may be a very large number. Previously, we buffered all bytes in a single allocation. Instead, use a fixed size buffer and only read what fits into the buffer. We already have code to refill the buffer if there is more data, so rely on that to keep reading. Choose an arbitrary size for the buffer. It is larger than the maximum possible number of bytes we need to read at once. Add a test with a test image that reports a very large number for the number of bytes it should contain. With the old method, we would allocate 4 gigs of memory to decode this image, which is unnecessary and may result in OOM. BUG=b/33251605 Change-Id: I6d66eace626002725f62237617140cab99ce42f3 Reviewed-on: https://skia-review.googlesource.com/7028 Commit-Queue: Leon Scroggins <scroggo@google.com> Reviewed-by: Matt Sarett <msarett@google.com>
* Revert "Fix reset and deleting behavior."Gravatar Herb Derby2017-01-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 412a86d014783be99a7a9a0fae407791b95806e8. Reason for revert: <INSERT REASONING HERE> Original change's description: > Fix reset and deleting behavior. > > * Reset the Arena state. > * Call all the dtors before deleting the blocks. > > TBR=mtklein@google.com > > Change-Id: Iac320fec16e572cc9a6184c1f580089ab720f036 > Reviewed-on: https://skia-review.googlesource.com/7221 > Reviewed-by: Herb Derby <herb@google.com> > Commit-Queue: Herb Derby <herb@google.com> > TBR=herb@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I4f4d34e0190a60d418f11326a9a9688d7487b8d8 Reviewed-on: https://skia-review.googlesource.com/7261 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Fix reset and deleting behavior.Gravatar Herb Derby2017-01-18
| | | | | | | | | | | | * Reset the Arena state. * Call all the dtors before deleting the blocks. TBR=mtklein@google.com Change-Id: Iac320fec16e572cc9a6184c1f580089ab720f036 Reviewed-on: https://skia-review.googlesource.com/7221 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Revert "Disallow readPixels() conversions from untagged srcs to tagged dsts"Gravatar Matt Sarett2017-01-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit ccfd1083a7b9d546735ddd1037f3240635cce72d. Reason for revert: Roll is failing. Original change's description: > Disallow readPixels() conversions from untagged srcs to tagged dsts > > This might break the roll into Chrome. But let's see how. > > BUG=skia:6021 > > Change-Id: I2698b5d6fe72d01bed0dc64703b592a03d441a80 > Reviewed-on: https://skia-review.googlesource.com/7127 > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Matt Sarett <msarett@google.com> > TBR=msarett@google.com,brianosman@google.com,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:6021 Change-Id: I4b62178fd7c23f43cf69ca69fc14526ecd503956 Reviewed-on: https://skia-review.googlesource.com/7205 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Matt Sarett <msarett@google.com>
* Disallow readPixels() conversions from untagged srcs to tagged dstsGravatar Matt Sarett2017-01-18
| | | | | | | | | | | This might break the roll into Chrome. But let's see how. BUG=skia:6021 Change-Id: I2698b5d6fe72d01bed0dc64703b592a03d441a80 Reviewed-on: https://skia-review.googlesource.com/7127 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Move read/write-Pixels up to GrSurfaceContextGravatar Robert Phillips2017-01-18
| | | | | | | | | | | | | | This still needs to be propagated out in several ways: replace more instances of GrSurface::read/write-Pixels add colorSpace to more instances of the TextureContext but it establishes a beach-head and is exciting enough as is. Change-Id: If86035aa0245e70b54541e83722b3c75bc5ade13 Reviewed-on: https://skia-review.googlesource.com/7172 Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Revert "Continue making Ganesh use absolute texture coordinates"Gravatar Joe Gregorio2017-01-17
| | | | | | | | | | | This reverts commit 4493a9dc9df8cf306a974bde7e0e9c5470ebcdc9. Reason for revert: Continuing failures https://luci-milo.appspot.com/swarming/task/33c693c3539a1410 Change-Id: Id371d6df6a875a5f6872f4ebd91b08a354d949de Reviewed-on: https://skia-review.googlesource.com/7125 Commit-Queue: Joe Gregorio <jcgregorio@google.com> Reviewed-by: Joe Gregorio <jcgregorio@google.com>
* Pass GrAppliedClip to pipeline creation.Gravatar Brian Salomon2017-01-17
| | | | | | | | | This skips adding the clip's coverage processor to the GrPipelineBuilder before creating GrPipeline. Change-Id: I1282dd8600701ab2b6a049abd8ad571abbbcbbe5 Reviewed-on: https://skia-review.googlesource.com/7020 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Continue making Ganesh use absolute texture coordinatesGravatar Robert Phillips2017-01-17
| | | | | | | | | The idea here is that the GrCoordTransform will actually hold a GrTextureProxy (rather than a GrTexture) and then, in GrGLSLPrimitiveProcessor::GetTransformMatrix, use the instantiated width & height (when uploading the transform matrix) Change-Id: Ibac3a540fcb1967ceef571157d41c1937acfadf8 Reviewed-on: https://skia-review.googlesource.com/6977 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Remove (most) usage of MakeTextureFromPixmapGravatar Brian Osman2017-01-17
| | | | | | | | | | | | | | Planning to remove this API entirely, as it's not really needed. There is one remaining call-site that requires a bigger change, so I want to land these first. BUG=skia: Change-Id: I6c6ae88202291c4896c1ba8f47824596ac8a150f Reviewed-on: https://skia-review.googlesource.com/7105 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Reland "Add SkImageInfoValidConversion() and SkImageInfoIsValid"Gravatar Matt Sarett2017-01-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original is at: https://skia-review.googlesource.com/c/6887/ The only change to the original is to temporarily comment out a check in SkImageInfoPriv.h until a Chrome unit test can be fixed. The idea is share these standards for the following: SkImage::readPixels() SkCanvas::readPixels() SkCanvas::writePixels() SkBitmap::readPixels() SkPixmap::readPixels() On the raster side, SkPixmap::readPixels() is the right place to check, because all raster calls go through there eventually. Then at lower levels (ex: SkPixelInfo), we can assert. There's not really a unifying location for gpu calls, so I've added this in multiple places. I haven't really dug into the gpu code to SkASSERT() on invalid cases that we will have already caught. Follow-up work: Similar refactor for SkReadPixelRec::trim(). Code cleanup in SkPixelInfo::CopyPixels() BUG=skia:6021 Change-Id: I6a16f9479bc09e3c87e10c72b0378579f1a70866 Reviewed-on: https://skia-review.googlesource.com/7104 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Simplify GrProcOptInfo initialization.Gravatar Brian Salomon2017-01-17
| | | | | | | | | | | | | Removes unused single channel tracking. Makes it so that only the op/gp can initiate lcd coverage. Makes GrProcOptInfo fragment processor analysis continuable. Change-Id: I003a8aa3836bb64d04b230ddee581dc500e613a9 Reviewed-on: https://skia-review.googlesource.com/7039 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* hide getClipStackGravatar Mike Reed2017-01-17
| | | | | | | | | BUG=skia:6122 Change-Id: I0aca03b349541174ced019f4f2116e0015c980c4 Reviewed-on: https://skia-review.googlesource.com/7097 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* add and test SkFixed15::to_u8()Gravatar Mike Klein2017-01-17
| | | | | | | Change-Id: Iedbcd2d938122cdc8f6b235745eb6165e348c237 Reviewed-on: https://skia-review.googlesource.com/7108 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Herb Derby <herb@google.com>
* Temporarily restore FixedAllocTest.cppGravatar Mike Klein2017-01-17
| | | | | | | | | | This adds it back as an empty file, so that the existing Android DM build keeps working. We can remove it once DM's Android build config is generated with gn_to_bp.py too. Change-Id: I27b8ff480044a0824d24395c4498bf593cdd9747 Reviewed-on: https://skia-review.googlesource.com/7102 Reviewed-by: Mike Klein <mtklein@chromium.org>
* Remove SkFallbackAlloc and SkFixedAlloc.Gravatar Herb Derby2017-01-16
| | | | | | | | | | | CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-ASAN;skia.primary:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN TBR=reed@google.com Change-Id: I1000dc9ed8ad65b249798759d9af99f47fc237d2 Reviewed-on: https://skia-review.googlesource.com/6809 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Revert "Add SkImageInfoValidConversion() and SkImageInfoIsValid"Gravatar Brian Osman2017-01-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit cf5d6caff7a58f1c7ecc36d9a91ccdada5fc7b78. Reason for revert: Chrome DEPS roll failing, based on the unit tests, I suspect this is the cause. Original change's description: > Add SkImageInfoValidConversion() and SkImageInfoIsValid > > The idea is share these standards for the following: > SkImage::readPixels() > SkCanvas::readPixels() > SkCanvas::writePixels() > SkBitmap::readPixels() > SkPixmap::readPixels() > > On the raster side, SkPixmap::readPixels() is the right > place to check, because all raster calls go through > there eventually. Then at lower levels (ex: SkPixelInfo), > we can assert. > > There's not really a unifying location for gpu calls, > so I've added this in multiple places. I haven't really > dug into the gpu code to SkASSERT() on invalid cases > that we will have already caught. > > Follow-up work: > Similar refactor for SkReadPixelRec::trim(). > Code cleanup in SkPixelInfo::CopyPixels() > > BUG=skia:6021 > > Change-Id: I91ecce10e46c1a6530f0af24a9eb8226dbecaaa2 > Reviewed-on: https://skia-review.googlesource.com/6887 > Reviewed-by: Brian Osman <brianosman@google.com> > Reviewed-by: Mike Reed <reed@google.com> > TBR=mtklein@google.com,msarett@google.com,brianosman@google.com,reed@google.com,reviews@skia.org # Not skipping CQ checks because original CL landed > 1 day ago. BUG=skia:6021 Change-Id: I63b88e90bdbb3051a14de00ac73a8351ab776d25 Reviewed-on: https://skia-review.googlesource.com/7095 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Revert "move SkDevice.h and SkBitmapDevice.h contents in to src headers"Gravatar Mike Reed2017-01-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 2f719a6b9214997e4cc24646d4b280038962b836. Reason for revert: <INSERT REASONING HERE> swf/transform/jsrunner/swiffy_canvas.h caller included SkDevice.h, but really wanted SkBitmap and SkColor Original change's description: > move SkDevice.h and SkBitmapDevice.h contents in to src headers > > BUG=skia: > > Change-Id: I3d8d313f0500c13db21cb973fed4064ec3816912 > Reviewed-on: https://skia-review.googlesource.com/7082 > Reviewed-by: Florin Malita <fmalita@chromium.org> > Commit-Queue: Mike Reed <reed@google.com> > TBR=bungeman@google.com,fmalita@chromium.org,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Change-Id: I40f7f1e4ad62685facdd39492da7a0b105178221 Reviewed-on: https://skia-review.googlesource.com/7087 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Reed <reed@google.com>
* move SkDevice.h and SkBitmapDevice.h contents in to src headersGravatar Mike Reed2017-01-13
| | | | | | | | | BUG=skia: Change-Id: I3d8d313f0500c13db21cb973fed4064ec3816912 Reviewed-on: https://skia-review.googlesource.com/7082 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* Fix ASANGravatar Matt Sarett2017-01-13
| | | | | | | | | | | NOTREECHECKS=true BUG=skia: Change-Id: I8104112ade6671b06fb5eb83b73f691fee99ea80 Reviewed-on: https://skia-review.googlesource.com/7081 Commit-Queue: Kevin Lubick <kjlubick@google.com> Reviewed-by: Kevin Lubick <kjlubick@google.com>