Commit Graph

2737 Commits

Author SHA1 Message Date
Hal Canary
a8565e502d ICC: SkICCGetColorProfileTag supports special cases
Special cases:
  - "sRGB"
  - "AdobeRGB"
  - "DCI-P3"
  - "Linear Transfer with sRGB Gamut"
  - "2.2 Transfer with sRGB Gamut"
  - "sRGB Transfer with DCI-P3 Gamut"
  - "Linear Transfer with DCI-P3 Gamut"
  - "sRGB Transfer with Rec-BT-2020 Gamut"
  - "Linear Transfer with Rec-BT-2020 Gamut"

tools/colorspaceinfo now prints out the Tag.

Also: constants representing gSRGB_TransferFn, g2Dot2_TransferFn, and
gLinear_TransferFn, gDCIP3_TransferFn.

BUG=skia:6720
Change-Id: I92a3f9db9d744d3ec366e4e59afd759ba043c235
Reviewed-on: https://skia-review.googlesource.com/20225
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-07-10 17:08:28 +00:00
Leon Scroggins III
da1893fe3a Fixes for get_images_from_skps
Do not consider kErrorInInput a failure. This probably means a corrupted
image stored in the SKP. This will fix the buildbot.

In addition, fix some other problems:
- Return an error when no SkPicture is created, rather than crashing.
- Use a different name for failed decodes, so they don't get overwritten
  by future failed or successful decodes.

Bug: skia:6840
Change-Id: Ia1d04e145a58495fb955d4b07dbb260cb7a35809
Reviewed-on: https://skia-review.googlesource.com/22031
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2017-07-10 16:37:45 +00:00
Ethan Nicholas
7343c197fc Revert "Make TessellatingPathOp be a non-legacy GrMeshDrawOp"
This reverts commit 086ce11386.

Reason for revert: Looks to be upsetting the bots (grglgpu.cpp(2766): fatal error: "assert(!useHWAA || rt->isStencilBufferMultisampled())")

Original change's description:
> Make TessellatingPathOp be a non-legacy GrMeshDrawOp
> 
> Change-Id: Ic92fdca7bdca91eab3a87e4fea3972ffdcfd5b12
> Reviewed-on: https://skia-review.googlesource.com/21867
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

TBR=jvanverth@google.com,bsalomon@google.com

Change-Id: Ibb0c8f8f4e2dea018b54686ab780535e2f69539a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/22060
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-07-10 15:47:16 +00:00
Brian Salomon
086ce11386 Make TessellatingPathOp be a non-legacy GrMeshDrawOp
Change-Id: Ic92fdca7bdca91eab3a87e4fea3972ffdcfd5b12
Reviewed-on: https://skia-review.googlesource.com/21867
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-07-10 13:24:35 +00:00
Brian Salomon
8fe24272fa Add mock config to tools and run through gms and benchs without crashing.
Change-Id: I7e2474129ef2b15899ad2baeb8d18f39d05da98c
Reviewed-on: https://skia-review.googlesource.com/21820
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-07-07 20:47:38 +00:00
Brian Salomon
a531f25028 Make AAHairlineOp a non-legacy GrDrawMeshOp
Change-Id: I814c696e38c685a294f9696984612807bc94b43d
Reviewed-on: https://skia-review.googlesource.com/21862
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-07-07 20:47:36 +00:00
Brian Salomon
cfe910dc79 Revert "Revert "Make mock GrContext unit testable.""
This reverts commit c867a89b01.

Reason for revert: test

Original change's description:
> Revert "Make mock GrContext unit testable."
> 
> This reverts commit 993e7e2521.
> 
> Reason for revert: Seeing if this fixes the NexusPlayer bots
> 
> Original change's description:
> > Make mock GrContext unit testable.
> > 
> > Bug: skia:
> > Change-Id: I959122f1f2c390832ab1033bcdbdd2ca6cfc0419
> > Reviewed-on: https://skia-review.googlesource.com/20699
> > Reviewed-by: Greg Daniel <egdaniel@google.com>
> > Commit-Queue: Brian Salomon <bsalomon@google.com>
> 
> TBR=egdaniel@google.com,bsalomon@google.com
> 
> Change-Id: I25ed9329962d930fe38108f779ff7083e0e4847e
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/21731
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

TBR=egdaniel@google.com,bsalomon@google.com

Change-Id: I62c579e087db1ff9891cf6c41b3eb40f47561887
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/21733
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-07-06 21:59:18 +00:00
Brian Salomon
c867a89b01 Revert "Make mock GrContext unit testable."
This reverts commit 993e7e2521.

Reason for revert: Seeing if this fixes the NexusPlayer bots

Original change's description:
> Make mock GrContext unit testable.
> 
> Bug: skia:
> Change-Id: I959122f1f2c390832ab1033bcdbdd2ca6cfc0419
> Reviewed-on: https://skia-review.googlesource.com/20699
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

TBR=egdaniel@google.com,bsalomon@google.com

Change-Id: I25ed9329962d930fe38108f779ff7083e0e4847e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/21731
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-07-06 18:21:37 +00:00
Brian Salomon
993e7e2521 Make mock GrContext unit testable.
Bug: skia:
Change-Id: I959122f1f2c390832ab1033bcdbdd2ca6cfc0419
Reviewed-on: https://skia-review.googlesource.com/20699
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-07-06 15:25:35 +00:00
Cary Clark
0933f33996 output flags once
When asking for help on more than one item,
e.g. foo -h me -h oh -h my just print Flags:
once.

TBR=scroggo@google.com

Change-Id: I67080c7390e6bacf4c36096304dd959229fdd07b
Reviewed-on: https://skia-review.googlesource.com/21660
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
2017-07-06 12:56:27 +00:00
Mike Reed
412cda7379 add srgb gamma colorfilters
... faster and more accurate than using SkTableColorFilter

todo: update blink after this lands

Bug:737981
Change-Id: I55b5c60dd23b9d2cbe9d60f83c74be1a8f3dcfcf
Reviewed-on: https://skia-review.googlesource.com/21368
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2017-07-05 20:16:27 +00:00
Hal Canary
466c7d6597 header cleanup
Change-Id: I3f7667a1357194ae2bdd341ad9d46eb93920f404
Reviewed-on: https://skia-review.googlesource.com/21374
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-07-05 15:18:52 +00:00
Eric Boren
101f3f304d Valgrind suppressions for new Debian 9 GPU bot
Bug: skia:
Change-Id: I813fe71812ec65778b48b8b13f238b8df7b8f8cd
Reviewed-on: https://skia-review.googlesource.com/21360
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-06-30 14:53:38 +00:00
Mike Reed
9c1d780228 remove filterSpan from SkColorFilter
Bug: skia:
Change-Id: Ie8a31ea8131c08d251a825622484342e3e174474
Reviewed-on: https://skia-review.googlesource.com/21207
Commit-Queue: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2017-06-29 16:09:37 +00:00
Eric Boren
89cd35795f Fix recipes/tests for new Debian bots
Bug: skia:6612
Change-Id: I2920bb7b1aa3ebb021223ed6345f13f1f9c8bc24
Reviewed-on: https://skia-review.googlesource.com/21141
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
2017-06-28 18:46:16 +00:00
Mike Klein
c2d207603e clean up low-hanging swap_rb
There are two remaining swap_rb uses that both look non-trivial to
replace:
   - sampling out of index8 when the color table is bgra
   - table transforms on bgra inputs in SkColorSpaceXform

I don't think it's a big deal to just leave swap_rb around,
just a little sad.

Change-Id: I3d30200cf867cbf37d6f86572b1574d3e22e3490
Reviewed-on: https://skia-review.googlesource.com/21040
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-06-28 17:41:56 +00:00
Ben Wagner
78f1f5a5e7 Add rest of paint flags to debug canvas.
Allows the Skia debugger to list all the flags on the paint.

Change-Id: I9068965a676809a3e23b066d804506d58910db05
Reviewed-on: https://skia-review.googlesource.com/20689
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-06-23 19:02:12 +00:00
Brian Osman
2ac96dc82c Hack to fix MSAA GL -> Vk transition on Windows Viewer
Bug: skia:
Change-Id: I49417789ab43734a1cbb4010281482970579971d
Reviewed-on: https://skia-review.googlesource.com/20505
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-06-23 17:56:31 +00:00
Brian Salomon
91a3e52552 Move mock gpu and caps, add Gr prefix, and create via GrContext::Create
Change-Id: I02427839f78372e337ed717b071c6baaa8ba4450
Reviewed-on: https://skia-review.googlesource.com/20622
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-06-23 15:42:15 +00:00
Brian Salomon
8c86588d1b Add correctness testing for ANGLE D3D11 ES3
Bug=skia:6776

Change-Id: I51c851d6b80992039c87ae43037721db52958f0c
Reviewed-on: https://skia-review.googlesource.com/20503
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-06-23 14:05:20 +00:00
Jim Van Verth
2e5eaf022e Revert "Revert "Clean up onTransferPixels""
Bug: skia:5126
Change-Id: Ia1eaef56cca266ad4c413e711e63646e913222be
Reviewed-on: https://skia-review.googlesource.com/20445
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2017-06-22 13:14:01 +00:00
Jim Van Verth
ce57552e11 Revert "Clean up onTransferPixels"
This reverts commit f7037d003c.

Reason for revert: Issues on test bots.

Original change's description:
> Clean up onTransferPixels
> 
> Bug: skia:5126
> Change-Id: I323c50e7854744302007b4ae7bd25e5742c14cbc
> Reviewed-on: https://skia-review.googlesource.com/19055
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>

TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com,brianosman@google.com

Change-Id: I923fda4d5cd8c2896fb347f9b2695b7f83d9137b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:5126
Reviewed-on: https://skia-review.googlesource.com/20444
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2017-06-21 15:50:51 +00:00
Jim Van Verth
f7037d003c Clean up onTransferPixels
Bug: skia:5126
Change-Id: I323c50e7854744302007b4ae7bd25e5742c14cbc
Reviewed-on: https://skia-review.googlesource.com/19055
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-06-21 15:28:50 +00:00
Mike Klein
99609bb7ab add memory via to ok
Just like the time via, but instead of printing how long the thing took
to run it prints how much memory was used by the process at peak.

When ok runs in (default) process-per-task mode, this is quite handy.

Change-Id: I331d446e39363a44c545278d7153fa7548e2add0
Reviewed-on: https://skia-review.googlesource.com/20261
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-06-19 19:32:52 +00:00
Greg Daniel
a5cb781c17 Revert "Revert "Add API for flushing surfaces with gpu semaphores""
This reverts commit 7292231905.

This change relands the original plus the follow on change:
https://skia-review.googlesource.com/20059.

Additionally it adds a blacklist for the mac intel bots which
don't see to respect the added fences on the GPU.

Original change's description:
> Revert "Add API for flushing surfaces with gpu semaphores"
> 
> This reverts commit 66366c6978.
> 
> Reason for revert: Failing test on mac bots
> 
> Original change's description:
> > Add API for flushing surfaces with gpu semaphores
> > 
> > BUG=skia:
> > 
> > Change-Id: Ia4bfef784cd5f2516ceccafce958be18a86f91d1
> > Reviewed-on: https://skia-review.googlesource.com/11488
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Reviewed-by: Forrest Reiling <freiling@google.com>
> 
> TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com,brianosman@google.com,freiling@google.com
> 
> Change-Id: I75633a2732d2d48b1926f9ad818a9f1a9196d211
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/20063
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>

TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com,brianosman@google.com,freiling@google.com

Change-Id: I4dc6c0e1deb0398eeb165a34f0a26af7a58259f1
Reviewed-on: https://skia-review.googlesource.com/20141
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-06-16 14:22:34 +00:00
Greg Daniel
7292231905 Revert "Add API for flushing surfaces with gpu semaphores"
This reverts commit 66366c6978.

Reason for revert: Failing test on mac bots

Original change's description:
> Add API for flushing surfaces with gpu semaphores
> 
> BUG=skia:
> 
> Change-Id: Ia4bfef784cd5f2516ceccafce958be18a86f91d1
> Reviewed-on: https://skia-review.googlesource.com/11488
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Forrest Reiling <freiling@google.com>

TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com,brianosman@google.com,freiling@google.com

Change-Id: I75633a2732d2d48b1926f9ad818a9f1a9196d211
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/20063
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-06-15 21:55:03 +00:00
Brian Salomon
10978a6ead Migrate AAConvexPathOp off of GrLegacyMeshDrawOp
Change-Id: If6df4292ec5c78a7f2fdde0a4540f7327e69e294
Reviewed-on: https://skia-review.googlesource.com/20058
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-06-15 21:04:31 +00:00
Greg Daniel
66366c6978 Add API for flushing surfaces with gpu semaphores
BUG=skia:

Change-Id: Ia4bfef784cd5f2516ceccafce958be18a86f91d1
Reviewed-on: https://skia-review.googlesource.com/11488
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Forrest Reiling <freiling@google.com>
2017-06-15 19:49:18 +00:00
Robert Phillips
fbcef6eb8a Clean up GrResourceProvider usage
The only substantive changes are the removal of GrProxy instantiation in:

SkGpuBlurUtils::GaussianBlur
GrSimpleTextureEffect::Make*

Change-Id: I10970609693bd6ff5b3a3c21b41d82642bb277bc
Reviewed-on: https://skia-review.googlesource.com/19965
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-06-15 17:18:19 +00:00
Brian Salomon
baaf439eb5 Revert "Revert "Converts remaining rect ops from GrLegacyMeshDrawOp to GrMeshDrawOp subclasses.""
This reverts commit a0485d9452.

Bug: skia:
Change-Id: If50b2d1af285a6c3c943373bb7258b56e1af28d6
Reviewed-on: https://skia-review.googlesource.com/19961
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-06-15 16:49:40 +00:00
Joe Gregorio
4f12f1e209 [fiddle] Clear the canvas to white before calling draw().
Bug: skia:
Change-Id: I17f1d47c3d04f09ca613e2d3f98d4c73e4bad02c
Reviewed-on: https://skia-review.googlesource.com/19847
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
2017-06-15 13:20:29 +00:00
Brian Salomon
a0485d9452 Revert "Converts remaining rect ops from GrLegacyMeshDrawOp to GrMeshDrawOp subclasses."
This reverts commit 1ec03f33cf.

Revert "Fix logic reversal in NonAAFillRectOp test factory"

This reverts commit 89c1c2552e.

Reason: Unexpected GM changes.

Bug: skia:
Change-Id: I9edf5f0e4a54b5cad86bd438a505aaaef38563de
Reviewed-on: https://skia-review.googlesource.com/19960
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-06-14 23:32:05 +00:00
Brian Salomon
1ec03f33cf Converts remaining rect ops from GrLegacyMeshDrawOp to GrMeshDrawOp subclasses.
Consolidates op factory functions to a rewritten GrRectOpFactory.

Removes GrRenderTargetContext::drawNonAAFilledRect() in favor of creating and adding ops directly by the callers.

Change-Id: I57e5fc739bf4e92b4a4710c739e6d22cce82a479
Reviewed-on: https://skia-review.googlesource.com/17711
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-06-14 20:26:51 +00:00
Mike Reed
d20b5c489b use #ifdef instead of #if for SK_VULKAN
Try to fix android roll

Bug: skia:
Change-Id: Iae32027b299d8a975d3caf70f0f8910541ca972d
Reviewed-on: https://skia-review.googlesource.com/19800
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-06-14 10:23:07 +00:00
Robert Phillips
fcd5fddb02 Revert "Revert "Update skia to use ifdefs for Vulkan code instead of dummy header""
This reverts commit fad9e3f541.

Reason for revert: Can't find the error message anymore (?!?) Let's try again shall we

Original change's description:
> Revert "Update skia to use ifdefs for Vulkan code instead of dummy header"
> 
> This reverts commit c0f8e426c5.
> 
> Reason for revert: Experiment to see if this will unblock the Android roll
> 
> Original change's description:
> > Update skia to use ifdefs for Vulkan code instead of dummy header
> > 
> > Bug: skia:6721
> > Change-Id: I80a4c9f2acc09c174497f625c50ed12a8bb76505
> > Reviewed-on: https://skia-review.googlesource.com/19547
> > Reviewed-by: Mike Klein <mtklein@google.com>
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> 
> TBR=egdaniel@google.com,mtklein@google.com,bsalomon@google.com
> 
> Change-Id: Ib51c1672570f2071a17b6fbde692a5174b0358ce
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:6721
> Reviewed-on: https://skia-review.googlesource.com/19724
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

TBR=egdaniel@google.com,mtklein@google.com,bsalomon@google.com,robertphillips@google.com

Change-Id: Iecef7ddcfe31d82938336120a4193525ac6693be
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:6721
Reviewed-on: https://skia-review.googlesource.com/19782
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-06-14 01:43:38 +00:00
Robert Phillips
fad9e3f541 Revert "Update skia to use ifdefs for Vulkan code instead of dummy header"
This reverts commit c0f8e426c5.

Reason for revert: Experiment to see if this will unblock the Android roll

Original change's description:
> Update skia to use ifdefs for Vulkan code instead of dummy header
> 
> Bug: skia:6721
> Change-Id: I80a4c9f2acc09c174497f625c50ed12a8bb76505
> Reviewed-on: https://skia-review.googlesource.com/19547
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

TBR=egdaniel@google.com,mtklein@google.com,bsalomon@google.com

Change-Id: Ib51c1672570f2071a17b6fbde692a5174b0358ce
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:6721
Reviewed-on: https://skia-review.googlesource.com/19724
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-06-13 22:16:19 +00:00
Greg Daniel
c0f8e426c5 Update skia to use ifdefs for Vulkan code instead of dummy header
Bug: skia:6721
Change-Id: I80a4c9f2acc09c174497f625c50ed12a8bb76505
Reviewed-on: https://skia-review.googlesource.com/19547
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-06-13 18:50:03 +00:00
Robert Phillips
646e4293f0 Retract GrTexture*.h & GrRenderTarget*.h from other headers
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>
2017-06-13 17:21:41 +00:00
Mike Klein
a611be86f0 ok: add 8888 and rp dsts
8888 is just a friendly alias for sw.
rp is the same, but forcing SkRasterPipelineBlitter.

Change-Id: Ie7a809643f21f49d6c696d4a4eac0e1deee7eaf8
Reviewed-on: https://skia-review.googlesource.com/19620
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-06-13 14:25:41 +00:00
Robert Phillips
c4f0a8245c Move Flags from GrRenderTarget to GrTypesPriv.h & rename
The motivation for this is to prevent GrRenderTarget.h appearing in GrRenderTargetProxy.h

Change-Id: I4ef126972c0780cbacb35fa2aa6290777c66eddf
Reviewed-on: https://skia-review.googlesource.com/19521
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-06-13 13:12:17 +00:00
Mike Klein
03a787968a append(from_srgb) -> append_from_srgb(kUnpremul)
No behavior change here, just using the safe, non-asserting API...

Change-Id: I982079a44dad311850b383d1ef44c6f0f4d3edea
Reviewed-on: https://skia-review.googlesource.com/19486
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-06-12 15:23:41 +00:00
Mike Klein
fc3341632f port encode_bitmap_for_png() to SkRasterPipeline
This logically shouldn't change anything, but it does a bit:
   - no diffs in 565
   - sRGB and 8888 show minor diffs, only when unpremul is non-trivial
   - f16 shows minor diffs all over, and major ones in shallow gradients

I think the shallow gradient diffs make sense. F16's high-precision is
being quantized down to a much narrower range (something like 10-40
values), so where the lines are drawn between sRGB bits will come down
to all sorts of things, especially rounding.

Change-Id: I156b7c613b73d6d6089221e61d0c529798ac1f9f
Reviewed-on: https://skia-review.googlesource.com/19449
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-06-12 14:41:15 +00:00
Matt Sarett
ee7c8202eb Remove debug checks for unsupported ICC profiles
This was never fully integrated with our automated image testing.
I feel it has limited usefulness in terms of catching bugs.

Bug: skia:
Change-Id: Iecd0a4e9b664ab0b351debde45ada864379de7ec
Reviewed-on: https://skia-review.googlesource.com/19267
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-06-09 15:26:48 +00:00
Mike Klein
39afa1226f fix f16 -> sRGB in encode_bitmap_for_png()
The existing logic looks wrong to me:
   - clamp premul to [0,1]
   - unpremul, ignoring zero alpha

It seems like we should do:
   - unpremul, avoiding any divide by zero
   - clamp unpremul to [0,1]

Am I misunderstanding this or has this just always been wrong?

Change-Id: I9636b9566c746bc05371e1e660f4e59dde16827b
Reviewed-on: https://skia-review.googlesource.com/19264
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-06-09 14:18:12 +00:00
Robert Phillips
fee2b4ed0f Create a new HDC for each ANGLE context
Bug: skia:6711
Change-Id: I9c4720a8dbad4c6b18efe73e0e61afbdc19627bc
Reviewed-on: https://skia-review.googlesource.com/19090
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-06-09 00:39:00 +00:00
Robert Phillips
cdabbcc3b5 Store context type (rather than backend type) in ContextInfo
Change-Id: I7dbfb735f1f094fa0a025b84f69e06a3533f2815
Reviewed-on: https://skia-review.googlesource.com/19101
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-06-08 20:29:44 +00:00
Brian Osman
b53f48cfec Touch input support for Windows
Had to add some logic to avoid touch and mouse cross-talk, because
(at least on my laptop), the touch screen generates both kinds of
events.

This seems really useful [1] for the many [2] Skia developers with
touch-enabled Windows devices.

----------
1: No, not really.
2: N = 1?

Bug: skia:
Change-Id: Ib888bf4198f2cc0a29a31581ec4b64d3d9008c33
Reviewed-on: https://skia-review.googlesource.com/18920
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-06-07 14:27:09 +00:00
Florin Malita
82d8087b1e Show SkPaint/blendMode in debugger
Change-Id: I4347ab1bf3e26ca3b8c18dead85ec3646d3694bd
Reviewed-on: https://skia-review.googlesource.com/18921
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-06-07 11:53:08 +00:00
Mike Klein
31550dbc98 Revert "Revert "Workaround Adreno driver issue with stencil clears.""
This reverts commit 8b06ed7c9f.

Reason for revert: try again.

Original change's description:
> Revert "Workaround Adreno driver issue with stencil clears."
> 
> This reverts commit 4e8c581f2a.
> 
> Reason for revert: breaks Google3 roll
> 
> Original change's description:
> > Workaround Adreno driver issue with stencil clears.
> > 
> > This also removes the "debug wire rect" which was not used and not implemented for Vulkan.
> > 
> > Also some declared but not implemented methods are removed from GrGLGpu.
> > 
> > Bug: skia:5587
> > 
> > Change-Id: I750051e90e6cfbfad6a6fe20792226182f698bcf
> > Reviewed-on: https://skia-review.googlesource.com/18639
> > Reviewed-by: Chris Dalton <csmartdalton@google.com>
> > Commit-Queue: Brian Salomon <bsalomon@google.com>
> 
> TBR=bsalomon@google.com,csmartdalton@google.com
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:5587
> 
> Change-Id: I65aa16b3f8c70cdef56ff16e16304ba09604c475
> Reviewed-on: https://skia-review.googlesource.com/18924
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: Mike Klein <mtklein@google.com>

TBR=mtklein@google.com,bsalomon@google.com,reviews@skia.org,csmartdalton@google.com
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:5587

Change-Id: Ice49027bda1c1ff7e0362d0680341ac862159850
Reviewed-on: https://skia-review.googlesource.com/18928
Reviewed-by: Mike Klein <mtklein@google.com>
2017-06-06 23:32:28 +00:00
Mike Klein
8b06ed7c9f Revert "Workaround Adreno driver issue with stencil clears."
This reverts commit 4e8c581f2a.

Reason for revert: breaks Google3 roll

Original change's description:
> Workaround Adreno driver issue with stencil clears.
> 
> This also removes the "debug wire rect" which was not used and not implemented for Vulkan.
> 
> Also some declared but not implemented methods are removed from GrGLGpu.
> 
> Bug: skia:5587
> 
> Change-Id: I750051e90e6cfbfad6a6fe20792226182f698bcf
> Reviewed-on: https://skia-review.googlesource.com/18639
> Reviewed-by: Chris Dalton <csmartdalton@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com,csmartdalton@google.com
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:5587

Change-Id: I65aa16b3f8c70cdef56ff16e16304ba09604c475
Reviewed-on: https://skia-review.googlesource.com/18924
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2017-06-06 22:12:48 +00:00
Brian Salomon
4e8c581f2a Workaround Adreno driver issue with stencil clears.
This also removes the "debug wire rect" which was not used and not implemented for Vulkan.

Also some declared but not implemented methods are removed from GrGLGpu.

Bug: skia:5587

Change-Id: I750051e90e6cfbfad6a6fe20792226182f698bcf
Reviewed-on: https://skia-review.googlesource.com/18639
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-06-06 19:36:31 +00:00
Robert Phillips
67d52cf0d8 sk_sp-ify GrResourceProvider some more
I believe this addresses the concerns of this particular bug (although more remains to be done)

Bug: skia:5327
Change-Id: Ie82f08f87b3cf3d7986fe4eeb16a5d2553173913
Reviewed-on: https://skia-review.googlesource.com/18599
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-06-05 18:07:05 +00:00
Robert Phillips
bab680d891 Revert "Destroy ANGLE displays in destroyGLContext"
This reverts commit c1359888c0.

Reason for revert: failing botbots

Original change's description:
> Destroy ANGLE displays in destroyGLContext
> 
> Bug: skia:6711
> Change-Id: I770bb390d7b4e156116411bc6ce796375a6ddf21
> Reviewed-on: https://skia-review.googlesource.com/18588
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> 

TBR=bsalomon@google.com,robertphillips@google.com
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:6711

Change-Id: I2087153f1601dfade8442f0918ffd71e0cacff08
Reviewed-on: https://skia-review.googlesource.com/18621
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-06-05 17:39:32 +00:00
Robert Phillips
c1359888c0 Destroy ANGLE displays in destroyGLContext
Bug: skia:6711
Change-Id: I770bb390d7b4e156116411bc6ce796375a6ddf21
Reviewed-on: https://skia-review.googlesource.com/18588
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-06-05 16:39:05 +00:00
Brian Osman
42bb6acf56 Simplify some Viewer code, and fix a few bugs
The content rect was always identical to the window rect,
so most of the related code did nothing. The translation
limit code is always useful (to avoid dragging the slide
way off-screen with the mouse), so always include it.
The auto-scaling to fit the screen is also still useful,
but just base it on the window rect.

The zoom code has four state variables, only used two of
them, and one was a trivially derived computation. Fold
most of that work into computeMatrix. (The translation
was always zero -- we never changed the zoom center.)

Include fDefaultMatrix in the matrix from computeMatrix,
rather than needing to apply it specially to the canvas.

Don't apply the inverse default matrix to touch or mouse
points. The absolute positions of those touch points is
not important, but because that matrix includes scale
(and sometimes very large or very small scale), it just
had the effect of greatly amplifying or damping the drag
speed. Without it, the slide always pans at the speed of
the touch/mouse drag -- which seems more desirable.

The use of the inverse default matrix was a clever trick,
but it caused the translation (applied to the global mtx)
to be scaled, so the slide was always pinned incorrectly.
Instead, supply the unmodified window rect and the default
matrix, so the trans limit code can do the obvious correct
thing: xform the slide bounds completely, then limit the
translation that will be applied after that. Slides are
now correctly pinned to screen edge regardless of how
much zoom is present in the default matrix.

Note: There are still several bugs related to all of this
code, but given the web of xform state, it's hard to
unravel. The touch gesture still doesn't know about
viewer's zoom, so that's ignored when doing the pinning.
Beyond that, it doesn't even know about window resize -
it only configures the translation limit when setting up
a slide. I had a fix for all of this (doing the
translation limiting in computeMatrix), but then the touch
gesture doesn't know about it, and can accumulate drag
motion that needs to be un-dragged to get back on-screen,
even though the slide is never really translated that far.

SkTouchGesture is in include. No one uses it except viewer:
TBR=bsalomon@google.com

Bug: skia:
Change-Id: I460cc07c3de6d36e63826f57d359faf1facf5ab3
Reviewed-on: https://skia-review.googlesource.com/18524
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-06-05 15:21:43 +00:00
Leon Scroggins III
4b0b00e0c3 Support passing single SKP to get_images_from_skps
In addition to allowing the user to supply a directory, allow them
to supply a file. Simplifies my typical use case of testing a single
file.

Change-Id: I4f268cfb33fc70ff3121135941693023b6840cd3
Reviewed-on: https://skia-review.googlesource.com/18586
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2017-06-05 14:51:33 +00:00
Cary Clark
219b4e81db add nonsquare scale to pathops sorter tool
Change-Id: I1b45992cc6eb18d0f79edcbd97d00d73c66c349a
Reviewed-on: https://skia-review.googlesource.com/18035
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
2017-06-02 19:30:07 +00:00
Stan Iliev
7e910df7f1 Implement an SkImage backed by a Android hardware buffer
Create a new SkImage public API to make an image from an Android
hardware buffer. Implementation is using a SkImageGenerator
derived class GrAndroidBufferImageGenerator.
A new EGLImage texture is created, which is then wrapped with
GrTextureProxy.

Bug: skia:
Change-Id: I610a4c5a58198686ce7c03e9a0adad3f9d2342e0
Reviewed-on: https://skia-review.googlesource.com/17789
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Stan Iliev <stani@google.com>
2017-06-02 14:51:24 +00:00
Joe Gregorio
97b10ac484 [fiddle] Report GL driver info.
Bug: skia:
Change-Id: I5338d6abef062f7da420e8cddafa082bedcfff25
Reviewed-on: https://skia-review.googlesource.com/18310
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
2017-06-01 18:03:45 +00:00
Mike Klein
c6912f712f make SkColorFilter::onAppendStages() pure
Change-Id: I2851e19648fb0478db9b940e86c6ddb2020000b3
Reviewed-on: https://skia-review.googlesource.com/18264
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2017-06-01 14:55:10 +00:00
Mike Reed
25f3805efa slant colorfilter away from filterSpan4f
rename to make it easy to delete any impl that also had onAppendStages...
i.e. rename to make it clear that it is just an impl trick for rasterpipeline.

Bug: skia:
Change-Id: If3c3b2811eff12d399cdf7a77552c01e72c06996
Reviewed-on: https://skia-review.googlesource.com/18234
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2017-05-31 19:54:05 +00:00
Joe Gregorio
a8fabd3f28 Fiddle can use EGL if available.
To test this turn on egl, e.g. --args='skia_use_egl=true', and run by altering the
library path to point to the right directory of the EGL driver you want to use, for example:

  LD_LIBRARY_PATH=/usr/lib/nvidia-367/ ./out/Release/fiddle  | ./tools/fiddle/parse-fiddle-output 

Bug: skia:
Change-Id: I2cce80318925fe88f9407646acb67628a8e48810
Reviewed-on: https://skia-review.googlesource.com/18137
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-05-31 14:23:56 +00:00
Brian Salomon
96789b31f2 Fix resource and skp paths in Android viewer
Docs-Preview: https://skia.org/?cl=18037
Change-Id: If92e561c6c24de1f51f81477d89b927e10308f13
Reviewed-on: https://skia-review.googlesource.com/18037
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-05-26 18:29:48 +00:00
Kevin Lubick
ffce079f4e Enable chromecast gpu perf
The new #ifndef account for what the chromecast sdk
cannot handle (e.g. posix).

Bug: skia:6581
Change-Id: I3d64d25980d80185f8b95c05badee5f665d97cd3
Reviewed-on: https://skia-review.googlesource.com/13811
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2017-05-24 20:30:05 +00:00
Robert Phillips
92de631edd Remove compressed (ETC1) texture support from Ganesh (take 2)
Reland of https://skia-review.googlesource.com/c/17456/ (Remove compressed (ETC1) texture support from Ganesh) but w/o removing third_part\etc1 files

TBR=bsalomon@google.com
Change-Id: I8ec4b7e3ddf47d213cb24c382731c050ffb8847f
Reviewed-on: https://skia-review.googlesource.com/17700
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-05-23 12:45:21 +00:00
Brian Osman
bc262e110a Revert "Remove compressed (ETC1) texture support from Ganesh"
This reverts commit ee26363aaa.

Reason for revert: Failing Google 3 roll.

Original change's description:
> Remove compressed (ETC1) texture support from Ganesh
> 
> Change-Id: If4cf286df87ea87338aba47001d90a5fcc4f2667
> Reviewed-on: https://skia-review.googlesource.com/17456
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> 

TBR=bsalomon@google.com,robertphillips@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Ie1a57187287e03600a69e374501478e93c41415c
Reviewed-on: https://skia-review.googlesource.com/17527
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-05-22 20:14:50 +00:00
Robert Phillips
ee26363aaa Remove compressed (ETC1) texture support from Ganesh
Change-Id: If4cf286df87ea87338aba47001d90a5fcc4f2667
Reviewed-on: https://skia-review.googlesource.com/17456
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-05-22 18:02:52 +00:00
Robert Phillips
b7b7e5fba0 Add fixes & test for isConfigTexturable and isConfigRenderable
This CL fixes:
  isConfigTexturable was returning true for:
            kRG_float for ANGLE ES2 configs
  isConfigRenderable was returning true for:
            kAlpha_8 for ANGLE ES2 configs
  isConfigTexturable and isConfigRenderable were returning true for:
            SBGRA on ES2
  The NexusPlayer was marking RGBA & RG float configs as renderable but not textureable

Bug: 720325

Change-Id: If21361870dbdde8f3e09bc9dff3a394f2a329157
Reviewed-on: https://skia-review.googlesource.com/17387
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-05-22 17:55:48 +00:00
Brian Salomon
154ce91dc9 Replace most uses of GrSurface::desc() with conifg(), width(), etc.
Change-Id: Ic283c0ddf9efa0a467e97e10f5413ba9dfcb414f
Reviewed-on: https://skia-review.googlesource.com/17211
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-05-17 18:56:50 +00:00
Matt Sarett
9f1c403362 Add tool to create test images with interesting color profiles
Bug: skia:
Change-Id: Ia4f892368fceda4a99490f5bd29851837a7a6927
Reviewed-on: https://skia-review.googlesource.com/17212
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-05-17 18:15:20 +00:00
Robert Phillips
318c419d3e Remove RenderTarget pointer from GrRenderTargetOpList::RecordedOp
Change-Id: I08afe531cd9c65af4b3f6b6006bc3eaf7071cfec

Change-Id: I08afe531cd9c65af4b3f6b6006bc3eaf7071cfec
Reviewed-on: https://skia-review.googlesource.com/17117
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-05-17 14:19:40 +00:00
Brian Salomon
05441c40d6 Convert GrOvalOpFactory from GrLegacyMeshDrawOp to GrMeshDrawOp using GrSimpleDrawOpHelper.
Change-Id: Ib9f59ddf1c2c3f2bd0004ae16f842e52f45df8c9
Reviewed-on: https://skia-review.googlesource.com/16832
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2017-05-15 21:11:41 +00:00
Mike Klein
0dc6dd0a3f Add sRGB support to monobench.
We'll now run non-rendering and raster benchmarks,
for simplicity choosing sRGB as the only raster configuration.

$ ninja -C out monobench; and out/monobench "linear_clamp_(3color|pos)\$"
    gradient_linear_clamp_…
    6257  …3color 1x  …pos 1.03x

$ ninja -C out monobench; and out/monobench "linear_clamp_.*[^4][^f]\$"
    gradient_linear_clamp_…
    321  …shallow 1x  …shallow_dither 1x  …3color 1.49x  …hicolor 1.5x  …pos 1.52x

Change-Id: I7282a84c982eb1f11f0ea2dfe39afea66231761c
Reviewed-on: https://skia-review.googlesource.com/16877
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-05-15 20:24:26 +00:00
Greg Daniel
604b197c6b Add support for creating a shared vulkan test context
Bug: skia:
Change-Id: I997c6269e4676bf4cedddcd87e71d107053678bb
Reviewed-on: https://skia-review.googlesource.com/16905
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-05-15 18:12:59 +00:00
Brian Salomon
177266339c Include non-legacy GrMeshDrawOps in GLPrograms test.
Bug: skia:
Change-Id: Ifa0c3ffb5643c84ccdcb339fae75ea5d03a8451c
Reviewed-on: https://skia-review.googlesource.com/16580
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-05-12 19:08:32 +00:00
Brian Salomon
175f588831 Modify SkEventTracer::SetInstance to fail rather than assert if a tracer has already been installed.
Chromium usually calls SetInstance once per process. However, when run in single process more renderer threads will try to set the instance after the browser process already has done so. This allows them to fail gracefully without asserting.

Bug: skia:6603
Change-Id: Ic8a35422d787335aa67eefc07d0658f0fbe73db4
Reviewed-on: https://skia-review.googlesource.com/16664
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-05-12 16:49:07 +00:00
Matt Sarett
ebb1b5c297 Add new SkImageGenerator::getPixels() API, deprecate the old
This is fairly aggressive in that it will break any client
that is currently using SkImageGenerator with kIndex8.
I'm guessing that we don't have any clients doing that.

Bug: skia:6620
Change-Id: Ifd16f5232bb3a9f759c225315c57492d917ed9ca
Reviewed-on: https://skia-review.googlesource.com/16601
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2017-05-12 16:48:17 +00:00
Brian Salomon
ac70f84e7f Move all non-AA fill rect ops off of GrLegacyMeshDrawOp.
This adds perspective to GrNewNonAAFillRectOp, renames it to GrNonAAFillRectOp, and deletes the previous version of that namespace.

Change-Id: I20f35bf019f9c9105e6ec83dda11328451138109
Reviewed-on: https://skia-review.googlesource.com/15634
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-05-10 14:48:47 +00:00
Mike Klein
452a7a248b ok, fix typo: struct -> static
Change-Id: I2b26ccd017d9e66ced41a1af04929e2d83a5a2d5
Reviewed-on: https://skia-review.googlesource.com/16343
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-05-09 22:42:05 +00:00
Mike Klein
62669ad29c ok, add timer via
Change-Id: I3d25a2aa9ae6dacb52779142cea062c7d9df40f5
Reviewed-on: https://skia-review.googlesource.com/16238
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-05-09 22:00:39 +00:00
Brian Osman
13dddce65f Added SkImage::MakeCrossContextFromEncoded
Designed for Flutter's threading architecture, with
an eye to being useful to other clients. Under the
hood, uses a new image generator class to lazily wrap
a texture for multiple GrContexts.

Re-land of https://skia-review.googlesource.com/c/14180/

Bug: skia:
Change-Id: I3dd382640629b79b3058f18fee68d043566e43e5
Reviewed-on: https://skia-review.googlesource.com/15895
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-05-09 18:45:04 +00:00
Eric Karl
5c77975e4c Add flag to avoid stencil buffers in Skia
Certain systems experience a leak in the GL driver associated with
stencil buffers. Attempts to avoid the leak (while still using stencil
buffers) dind't succeed. This patch adds a GrContextOption
fAvoidStencilBuffers. This disables certain path rendering modes, as
well as stencil based masking/clipping.

Bug: 713854
Change-Id: Ifa6c0f2bd5ee395547bda9165d6c79d197ae8b8b
Reviewed-on: https://skia-review.googlesource.com/15253
Commit-Queue: Eric Karl <ericrk@chromium.org>
Reviewed-by: Eric Karl <ericrk@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-05-09 17:41:25 +00:00
Brian Salomon
449d78f5a8 Revert "Added SkImage::MakeCrossContextFromEncoded"
This reverts commit 83b1b3db36.

Reason for revert: unit test failing and asan leaks

Original change's description:
> Added SkImage::MakeCrossContextFromEncoded
> 
> Designed for Flutter's threading architecture, with
> an eye to being useful to other clients. Under the
> hood, uses a new image generator class to lazily wrap
> a texture for multiple GrContexts.
> 
> Bug: skia:
> Change-Id: I6c37b12c8ab5bce94b91190e5f0beb91d31ae81b
> Reviewed-on: https://skia-review.googlesource.com/14180
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> 

TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,brianosman@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I1f0bf580aa0ea2d132e18b64ff610ddac9d073a7
Reviewed-on: https://skia-review.googlesource.com/15892
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-05-08 20:46:26 +00:00
Brian Osman
83b1b3db36 Added SkImage::MakeCrossContextFromEncoded
Designed for Flutter's threading architecture, with
an eye to being useful to other clients. Under the
hood, uses a new image generator class to lazily wrap
a texture for multiple GrContexts.

Bug: skia:
Change-Id: I6c37b12c8ab5bce94b91190e5f0beb91d31ae81b
Reviewed-on: https://skia-review.googlesource.com/14180
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-05-08 19:56:27 +00:00
Mike Klein
39748b2771 port ok to SkPngEncoder
I can't tell you how excited I am to turn down the libpng settings...
anything that saves me a few seconds is a nice quality of life win.

This CL makes ok run in about half the time when producing .pngs.

Profile running `ok gm srgb png` before:
    10.59   s   16.5%    10.59   s          longest_match
    8.98    s   14.0%    8.98    s          png_setup_paeth_row
    8.93    s   13.9%    8.93    s          skia_png_write_find_filter
    7.75    s   12.1%    7.75    s          deflate_slow
    4.63    s    7.2%    4.63    s          std::wait_until(...) const
    959.00 ms    1.5%    959.00 ms          SkPathRef::validate() const
    935.00 ms    1.4%    935.00 ms          sk_to_srgb_hsw
    ...

After:
    2.35    s    8.7%    2.35    s          std::wait_until(...) const
    1.70    s    6.2%    1.70    s          longest_match
    1.19    s    4.4%    1.19    s          deflate_fast
    931.00 ms    3.4%    931.00 ms          SkPathRef::validate() const
    898.00 ms    3.3%    898.00 ms          sk_to_srgb_hsw
    ...

Change-Id: I425c30b2ecd97a0e4a4392779de6301db473ee47
Reviewed-on: https://skia-review.googlesource.com/15547
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Matt Sarett <msarett@google.com>
2017-05-08 17:09:31 +00:00
Chris Dalton
fe199b7d51 Add postFlush call to GrOnFlushCallbackObject
Adds a new postFlush method and renames the class to
GrOnFlushCallbackObject. Also removes the ref counting in favor of
making the callback object a purely virtual interface. ref/unref on the
callback interface would conflict with existing ref/unref methods on the
subclass. It is now the caller’s responsibility to ensure the lifetime
of the callback is tied to that of the context.

Bug: skia:
Change-Id: I2fc1f98c700032e296a36f3a9a09c0753ab47aea
Reviewed-on: https://skia-review.googlesource.com/15463
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-05-05 15:53:36 +00:00
Hal Canary
ce78bad054 header cleanup
Change-Id: I9d93add4e7998d8a1aa37cba9e7829fcbda867d5
Reviewed-on: https://skia-review.googlesource.com/15318
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-05-05 14:06:08 +00:00
Jim Van Verth
e7705780c9 Add ShadowUtils sample.
Also enables mouse support in Viewer.

Change-Id: Iaed08d42a64f591f0cd9b24684b3aee43404ed94
Reviewed-on: https://skia-review.googlesource.com/15313
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-05-04 18:37:55 +00:00
Mike Reed
b9641bd55a force all colorfilters to implement 4f
high-contrast gms differ at most by 1 bit

Bug: skia:
Change-Id: I1308bd105020ea3cd5a30fd3dd322ed134fb5ed5
Reviewed-on: https://skia-review.googlesource.com/15249
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2017-05-04 15:21:39 +00:00
Florin Malita
ab244f045a Revert "Revert "Reland: Remove SkLights include from SkCanvas.h""
This reverts commit 9d5f66d9c2.

Reason for revert: Leon landed Android fixes.

Original change's description:
> Revert "Reland: Remove SkLights include from SkCanvas.h"
> 
> This reverts commit fed00319c9.
> 
> 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>
2017-05-03 19:17:11 +00:00
Florin Malita
9d5f66d9c2 Revert "Reland: Remove SkLights include from SkCanvas.h"
This reverts commit fed00319c9.

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>
2017-05-03 15:41:07 +00:00
Florin Malita
fed00319c9 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>
2017-05-03 13:22:28 +00:00
Mike Klein
16a6144dfd ok, add sRGB support
Change-Id: Ic375a593bcf67aad0d7bd0847ea6bcd0b9ac4ab6
Reviewed-on: https://skia-review.googlesource.com/15160
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-05-03 01:40:35 +00:00
Jim Van Verth
343fe49b82 Remove translateZ and lights from SkCanvas
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>
2017-05-02 21:17:01 +00:00
Jim Van Verth
fbdc080d3c Add wireframe mode to Viewer.
Change-Id: I0ff11088465a4702acf9841a791d76f286ddbaf1
Reviewed-on: https://skia-review.googlesource.com/15147
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2017-05-02 20:27:26 +00:00
Jim Van Verth
4c9155bd66 Remove EXPERIMENTAL_SHADOWING, Part 1
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>
2017-05-02 17:22:44 +00:00
Florin Malita
38aad81a54 Revert "Remove SkLights include from SkCanvas.h"
This reverts commit 9ff301bf91.

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>
2017-05-02 15:42:07 +00:00
Florin Malita
9ff301bf91 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>
2017-05-02 14:50:38 +00:00
Greg Daniel
207282eb5a Make GrBackendTexture take Gr*Info refs in ctor, and copy them.
Bug: skia:
Change-Id: Ic05d3384fa07560fc18c52bb8ae03541a72515f7
Reviewed-on: https://skia-review.googlesource.com/14374
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-05-02 14:08:28 +00:00
Matt Sarett
687cc6c033 colorspaceinfo tool: Add flag to indicate that the input is an icc profile
Bug: skia:
Change-Id: Ieb5cff92bae1aa64df5bc7f3a398514fe5b20f77
Reviewed-on: https://skia-review.googlesource.com/14956
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-05-02 13:22:20 +00:00
Matt Sarett
1fa986c95a Added A2B support to colorspaceinfo tool
Tool now parses A2B images/profiles.
Tool can now display a cross-section based visualization for the color
look-up tables in A2B profiles.

BUG=skia:

Change-Id: I68abb3e947b080c533e283783d7859feea8d35d6
Reviewed-on: https://skia-review.googlesource.com/6119
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
2017-05-01 22:10:58 +00:00
Greg Daniel
bcf612b5d0 Revert "Revert "Plumb the use of GrBackendRenderTarget throughout Skia""
This reverts commit e3bd422faf.

Reason for revert: Pre-req changes have all landed in other projects at this point.

Original change's description:
> Revert "Plumb the use of GrBackendRenderTarget throughout Skia"
> 
> This reverts commit fdd77daedb.
> 
> Reason for revert: Apparently I have a few more build files to update before this can land.
> 
> Original change's description:
> > Plumb the use of GrBackendRenderTarget throughout Skia
> > 
> > Bug: skia:
> > Change-Id: Ib99a58d9552f5c7b8d77c09dcc72fa88326c26aa
> > Reviewed-on: https://skia-review.googlesource.com/14148
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > 
> 
> TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,reviews@skia.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> 
> Change-Id: I984e1909870182474c4c3cce257f01b6a9d8581f
> Reviewed-on: https://skia-review.googlesource.com/14531
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> 

TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,reviews@skia.org
# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: Ib7ab94aada8a7cb80fe38f24daf32f9208c5b169
Reviewed-on: https://skia-review.googlesource.com/14826
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-05-01 14:14:50 +00:00
Cary Clark
2a475eae62 add drawString helper to canvas
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>
2017-04-28 20:41:04 +00:00
Brian Osman
dc87c95382 Combine GPU flush with semaphore API
Bug: skia:
Change-Id: I5f388760d43b19755b2767d95d32065f6d0f926e
Reviewed-on: https://skia-review.googlesource.com/14646
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-04-28 18:25:37 +00:00
Matt Sarett
68b8e3d50d Revert "Revert "Delete copyTo(Allocator), hide copyTo() behind flag""
This reverts commit 0122af08f6.

Reason for revert: Fixed Android callsite

Original change's description:
> Revert "Delete copyTo(Allocator), hide copyTo() behind flag"
> 
> This reverts commit d4a338f4d0.
> 
> Reason for revert: Looks like I missed something I was supposed to delete in Android.
> 
> Original change's description:
> > Delete copyTo(Allocator), hide copyTo() behind flag
> > 
> > Replace uses of copyTo() in Skia.
> > 
> > Bug: skia:6464
> > Change-Id: I921dc53a1c29a5176d18f05741f7c0b5a008e548
> > Reviewed-on: https://skia-review.googlesource.com/14502
> > Commit-Queue: Matt Sarett <msarett@google.com>
> > Reviewed-by: Mike Reed <reed@google.com>
> > 
> 
> TBR=msarett@google.com,reed@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> 
> Change-Id: I4d252940cc6a2462b030007055ea6c229471fc6e
> Reviewed-on: https://skia-review.googlesource.com/14602
> Reviewed-by: Matt Sarett <msarett@google.com>
> Commit-Queue: Matt Sarett <msarett@google.com>
> 

TBR=msarett@google.com,reviews@skia.org,reed@google.com

Change-Id: I81659a820f79f1958fda23cb62513065b57db99d
Reviewed-on: https://skia-review.googlesource.com/14640
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
2017-04-28 15:49:04 +00:00
Mike Reed
0acd7954a9 add helper makeShader for the common Clamp case
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>
2017-04-28 15:36:14 +00:00
Matt Sarett
0122af08f6 Revert "Delete copyTo(Allocator), hide copyTo() behind flag"
This reverts commit d4a338f4d0.

Reason for revert: Looks like I missed something I was supposed to delete in Android.

Original change's description:
> Delete copyTo(Allocator), hide copyTo() behind flag
> 
> Replace uses of copyTo() in Skia.
> 
> Bug: skia:6464
> Change-Id: I921dc53a1c29a5176d18f05741f7c0b5a008e548
> Reviewed-on: https://skia-review.googlesource.com/14502
> Commit-Queue: Matt Sarett <msarett@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
> 

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

Change-Id: I4d252940cc6a2462b030007055ea6c229471fc6e
Reviewed-on: https://skia-review.googlesource.com/14602
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-04-27 20:08:45 +00:00
Greg Daniel
e3bd422faf Revert "Plumb the use of GrBackendRenderTarget throughout Skia"
This reverts commit fdd77daedb.

Reason for revert: Apparently I have a few more build files to update before this can land.

Original change's description:
> Plumb the use of GrBackendRenderTarget throughout Skia
> 
> Bug: skia:
> Change-Id: Ib99a58d9552f5c7b8d77c09dcc72fa88326c26aa
> Reviewed-on: https://skia-review.googlesource.com/14148
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> 

TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I984e1909870182474c4c3cce257f01b6a9d8581f
Reviewed-on: https://skia-review.googlesource.com/14531
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-04-27 18:48:19 +00:00
Greg Daniel
fdd77daedb Plumb the use of GrBackendRenderTarget throughout Skia
Bug: skia:
Change-Id: Ib99a58d9552f5c7b8d77c09dcc72fa88326c26aa
Reviewed-on: https://skia-review.googlesource.com/14148
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-04-27 18:15:38 +00:00
Matt Sarett
d4a338f4d0 Delete copyTo(Allocator), hide copyTo() behind flag
Replace uses of copyTo() in Skia.

Bug: skia:6464
Change-Id: I921dc53a1c29a5176d18f05741f7c0b5a008e548
Reviewed-on: https://skia-review.googlesource.com/14502
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2017-04-27 17:18:03 +00:00
Mike Klein
9fa99614ec In ok thread mode, use wait_util instead of wait_for.
wait_for(delta) is wait_until(steady_clock::now() + delta) under the
hood, so using wait_for() like this implies an extra call to now() that
we can avoid by using wait_until().

We can hoist that call out and just do it once...  the past stays the past.

This is not super important.  Just noticed while profiling.  It's nice
to keep the overhead of the ok tool down so the real work can show.  :)

Change-Id: I89d25a800b63ebcfc229b5b3aa3f2dd621f4e7b4
Reviewed-on: https://skia-review.googlesource.com/14480
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2017-04-27 15:30:27 +00:00
Greg Daniel
ec6ae52168 Use system Vulkan headers except when no building with vulkan support
We now will always use the system vulkan.h files whenever we are building
with vulkan. With non vulkan builds we use our checked in header to so
that we can get the needed symbols for compiling.

Bug: skia:
Change-Id: I352a3e007b33c575cefcfd6752db0b3b12b86a16
Reviewed-on: https://skia-review.googlesource.com/14270
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-04-25 18:30:37 +00:00
Brian Salomon
c1889823de Add new GrVkBackendContext::Create explicitly requiring vk proc getters
Also remove the feature of GrVkGpu that creates the instance/device if the client doesn't provide one.

Change-Id: Ie617313b6c684ed355333a475b80d0aae7e3a026
Reviewed-on: https://skia-review.googlesource.com/14261
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-04-24 21:29:44 +00:00
Brian Osman
80be240001 Enable fence sync support in ES3 test contexts
This (only?) affects ANGLE. Other ES platforms typically go through
EGLGLTestContext, which manually instantiates an EGLFenceSync.

In general, though, ES3 requires this API, so this is safe. Should give us
more accurate (and much less spammy) output from ES3 ANGLE performance
testing.

Bug: skia:
Change-Id: I10a608d21092aaffa4ab76e4b3d2f6e9c5cf09bb
Reviewed-on: https://skia-review.googlesource.com/14063
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-04-21 19:39:16 +00:00
Greg Daniel
e79b473714 Disable use of directly wrapping msaa RTs on Vulkan
Currently the Vulkan backend is set up to always treat the "resolve"
target as the main VkImage in a render target and the msaa is a side cart
image. This makes it difficult to just wrap an msaa image that we don't own.
However, unlike GL the equivalent FBO 0 will never be multisampled so there
isn't much use for the functionality. Once we find a need for it we can find
a way to refactor to make it work.

Bug: skia:
Change-Id: I121e9c72a70c2a6f1aaddba2dbae19d8bddc3998
Reviewed-on: https://skia-review.googlesource.com/13980
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-04-20 20:49:51 +00:00
Greg Daniel
7ef28f35a2 Revert "Revert "Plumb GrBackendTexture throughout skia.""
This reverts commit 7fa5c31c2c.

Reason for revert: Relanding this change now that other fixes have landed.

Original change's description:
> Revert "Plumb GrBackendTexture throughout skia."
> 
> This reverts commit 7da62b9059.
> 
> Reason for revert: fix android roll
> 
> Original change's description:
> > Plumb GrBackendTexture throughout skia.
> > 
> > Bug: skia:
> > Change-Id: I1bae6768ee7229818a83ba608035a1f7867e6875
> > Reviewed-on: https://skia-review.googlesource.com/13645
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
> > 
> 
> TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,brianosman@google.com,reviews@skia.org,stani@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> 
> Change-Id: I5cb8763cc837c83ebc6d10366fe2dd3efe35fb89
> Reviewed-on: https://skia-review.googlesource.com/13773
> Reviewed-by: Stan Iliev <stani@google.com>
> Commit-Queue: Stan Iliev <stani@google.com>
> 

TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,reviews@skia.org,brianosman@google.com,stani@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I92bc074e4fe37fa5c83186afadc472c03802e8f2
Reviewed-on: https://skia-review.googlesource.com/13975
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-04-20 17:17:43 +00:00
Greg Daniel
c819e66993 Check-in vulkan.h into third_party and use that instead of local sdk vulkan.h
This change is needed since once we start getting support for varrying of extensions
and newer version support in general, we need a common vulkan header to compile off of.
Otherwise we will run into problems if clients have older headers that don't include
functions/symbols we are trying to use.

Additionally it has the benefit of not needing to add if SK_VULKAN around code in
include which wants to use vulkan symbols.

This is a reland of the reverted cl: https://skia-review.googlesource.com/13804

Bug: skia:
Change-Id: I9023e80e60d2f2ebbdc8e794ec46d6f5c5c7c917
Reviewed-on: https://skia-review.googlesource.com/13874
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-04-20 13:09:27 +00:00
Joe Gregorio
1e735c0256 [fiddle] Add simple animation support.
BUG=skia:

Change-Id: I6453afb1fe18e210d3c505b56777b8b19501ca2f
Reviewed-on: https://skia-review.googlesource.com/13810
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
2017-04-19 18:46:52 +00:00
Greg Daniel
5238f994bf Revert "Check-in vulkan.h into third_party and use that instead of local sdk vulkan.h"
This reverts commit 3a3bc42b7d.

Reason for revert: still breaking android

Original change's description:
> Check-in vulkan.h into third_party and use that instead of local sdk vulkan.h
> 
> This change is needed since once we start getting support for varrying of extensions
> and newer version support in general, we need a common vulkan header to compile off of.
> Otherwise we will run into problems if clients have older headers that don't include
> functions/symbols we are trying to use.
> 
> Additionally it has the benefit of not needing to add if SK_VULKAN around code in
> include which wants to use vulkan symbols.
> 
> This is a reupload of CL: https://skia-review.googlesource.com/13651
> 
> Bug: skia:
> Change-Id: I091f526b8c4a61774c34834cd7bfb7e2c822ff5c
> Reviewed-on: https://skia-review.googlesource.com/13804
> Reviewed-by: Derek Sollenberger <djsollen@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> 

TBR=djsollen@google.com,egdaniel@google.com,mtklein@google.com,jvanverth@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Ic595e32005761170156499cfb6efc1acfce96001
Reviewed-on: https://skia-review.googlesource.com/13806
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-04-19 14:44:47 +00:00
Greg Daniel
3a3bc42b7d Check-in vulkan.h into third_party and use that instead of local sdk vulkan.h
This change is needed since once we start getting support for varrying of extensions
and newer version support in general, we need a common vulkan header to compile off of.
Otherwise we will run into problems if clients have older headers that don't include
functions/symbols we are trying to use.

Additionally it has the benefit of not needing to add if SK_VULKAN around code in
include which wants to use vulkan symbols.

This is a reupload of CL: https://skia-review.googlesource.com/13651

Bug: skia:
Change-Id: I091f526b8c4a61774c34834cd7bfb7e2c822ff5c
Reviewed-on: https://skia-review.googlesource.com/13804
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-04-19 13:58:52 +00:00
Greg Daniel
df07ddd1f0 Revert "Check-in vulkan.h into third_party and use that instead of local sdk vulkan.h"
This reverts commit edbb7d8860.

Reason for revert: breaking android

Original change's description:
> Check-in vulkan.h into third_party and use that instead of local sdk vulkan.h
> 
> This change is needed since once we start getting support for varrying of extensions
> and newer version support in general, we need a common vulkan header to compile off of.
> Otherwise we will run into problems if clients have older headers that don't include
> functions/symbols we are trying to use.
> 
> Additionally it has the benefit of not needing to add if SK_VULKAN around code in
> include which wants to use vulkan symbols.
> 
> Bug: skia:
> Change-Id: I674a253308596dc75bd23574984ae933923679f9
> Reviewed-on: https://skia-review.googlesource.com/13651
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> 

TBR=mtklein@chromium.org,egdaniel@google.com,mtklein@google.com,jvanverth@google.com,bsalomon@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I179647e6ae213b1b17a9c42ced5e98c6599b96c2
Reviewed-on: https://skia-review.googlesource.com/13774
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-04-19 01:22:52 +00:00
Stan Iliev
7fa5c31c2c Revert "Plumb GrBackendTexture throughout skia."
This reverts commit 7da62b9059.

Reason for revert: fix android roll

Original change's description:
> Plumb GrBackendTexture throughout skia.
> 
> Bug: skia:
> Change-Id: I1bae6768ee7229818a83ba608035a1f7867e6875
> Reviewed-on: https://skia-review.googlesource.com/13645
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> 

TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,brianosman@google.com,reviews@skia.org,stani@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I5cb8763cc837c83ebc6d10366fe2dd3efe35fb89
Reviewed-on: https://skia-review.googlesource.com/13773
Reviewed-by: Stan Iliev <stani@google.com>
Commit-Queue: Stan Iliev <stani@google.com>
2017-04-19 00:23:50 +00:00
Greg Daniel
7da62b9059 Plumb GrBackendTexture throughout skia.
Bug: skia:
Change-Id: I1bae6768ee7229818a83ba608035a1f7867e6875
Reviewed-on: https://skia-review.googlesource.com/13645
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-04-18 21:55:10 +00:00
Greg Daniel
9440345a81 Add backend safe classes for passing in external texture and render targets into gpu
This CL adds the GrBackend* classes as well as just updates the API for SkSurface and
SkImage. The implementation on SkSurface/Image and the plumbing down into Ganesh will
be in an additional CL.

Besides the change to use the type safe classes, we also pull the SurfaceFlags, origin,
samples, out of the descriptor and pass those in directly.

Bug: skia:
Change-Id: I9702981fe26c3d5d7d2cbcf6977ba569d356d854
Reviewed-on: https://skia-review.googlesource.com/13122
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-04-18 20:33:58 +00:00
Greg Daniel
edbb7d8860 Check-in vulkan.h into third_party and use that instead of local sdk vulkan.h
This change is needed since once we start getting support for varrying of extensions
and newer version support in general, we need a common vulkan header to compile off of.
Otherwise we will run into problems if clients have older headers that don't include
functions/symbols we are trying to use.

Additionally it has the benefit of not needing to add if SK_VULKAN around code in
include which wants to use vulkan symbols.

Bug: skia:
Change-Id: I674a253308596dc75bd23574984ae933923679f9
Reviewed-on: https://skia-review.googlesource.com/13651
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-04-18 19:35:22 +00:00
Cary Clark
73e597d0ed keep integral rectangle intersections integral
A pair of coincident lines can generate multiple intersection
points. Path ops is more stable when the intersection T value
is used to recompute the intersection point, but this has
the side-effect of making integral edges intersect at non-integral
values.

While it's worthwhile to fix this, for the moment it is less
disruptive to only worry about keeping intersection values
integral if the original intersection point is integral in
both axes.

Also, fix some debugging code that bit-rotted.

R=msarett@google.com

Change-Id: Iefd27b25d1d21c22b224c174bd59bc6c105033c4
Reviewed-on: https://skia-review.googlesource.com/13721
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
2017-04-18 16:40:48 +00:00
Mike Reed
4edb5d219e hide lockpixels api behind flag
guarded by SK_SUPPORT_OBSOLETE_LOCKPIXELS

needs https://codereview.chromium.org/2820873002/# to land first
Bug: skia:6481
Change-Id: I1c39902cbf6fe99f622adfa8192733b95f7fea09

Change-Id: I1c39902cbf6fe99f622adfa8192733b95f7fea09
Reviewed-on: https://skia-review.googlesource.com/13580
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-04-17 15:33:36 +00:00
Mike Reed
12e946b4bf deprecate odd variants of SkCanvas::readPixels
Bug: skia:6513
Change-Id: I51179a85f0912d3f899c368c30a943d346dd1d05
Reviewed-on: https://skia-review.googlesource.com/13589
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-04-17 15:22:42 +00:00
Hal Canary
d64756e66e tools/check-headers-self-sufficient: optionally test one file at a time
Change-Id: Ie7703e9b6abb7229cd8c2dbcdf305fa4240f416c
Reviewed-on: https://skia-review.googlesource.com/11385
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-04-14 15:37:07 +00:00
Mike Reed
1335a0561e remove dead code around replayClips
Bug: skia:
Change-Id: I208bf41846265524d86f65de660311199fefc158
Reviewed-on: https://skia-review.googlesource.com/13338
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-04-13 15:42:09 +00:00
Chris Dalton
59163ba06c Access EGL_KHR_fence_sync via eglGetProcAddress
Bug: skia:6497
Change-Id: Icf04de6b1facc94e8c45085575cb45189c6c649c
Reviewed-on: https://skia-review.googlesource.com/13306
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-04-13 13:28:03 +00:00
Mike Klein
5a8da16719 tidy up ok help
-m, -s, and -w are now vias.

No real need to advertise -h given that if you just run ok with no
arguments it prints the help, but to be friendly accept -h and --help.

Change-Id: Id23936106cfea7d670cf0eb9773a5851055576f1
Reviewed-on: https://skia-review.googlesource.com/13254
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-04-12 15:34:40 +00:00
Robert Phillips
a90aa2bfd4 consolidate read/writePixels in GrSurfaceContext
Change-Id: I118fcd49990597d4dfea92efd3f9d99e52fdbfab
Reviewed-on: https://skia-review.googlesource.com/11481
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2017-04-10 12:56:33 +00:00
Robert Phillips
bf25d433f4 Make GrCopySurfaceOp friendlier to GrSurfaceProxy (take 2)
Reland of: https://skia-review.googlesource.com/c/11325/ (Make GrCopySurfaceOp friendlier to GrSurfaceProxy)

Change-Id: Ibe7312cebe7793af5803353a1499fbe7874c558f
Reviewed-on: https://skia-review.googlesource.com/11780
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-04-07 15:33:58 +00:00
Robert Phillips
9a121cc6ad Revert "Make GrCopySurfaceOp friendlier to GrSurfaceProxy"
This reverts commit d7cda9a6f0.

Reason for revert: Tegra3!!!!

Original change's description:
> Make GrCopySurfaceOp friendlier to GrSurfaceProxy
> 
> Change-Id: Iba8c068bd96ab154d466e485a9db31dd552138de
> Reviewed-on: https://skia-review.googlesource.com/11325
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> 

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

Change-Id: Idc31d469d94e6e2772ee5714987b3a05bb902d88
Reviewed-on: https://skia-review.googlesource.com/11580
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-04-06 21:17:26 +00:00
Robert Phillips
d7cda9a6f0 Make GrCopySurfaceOp friendlier to GrSurfaceProxy
Change-Id: Iba8c068bd96ab154d466e485a9db31dd552138de
Reviewed-on: https://skia-review.googlesource.com/11325
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-04-06 20:03:40 +00:00
Mike Reed
93b1b4feda add guard for obsolete (non-functioning) replayClips
replayClips has been disabled (broken) for a while.
This CL just attempts to hide the api (will remove
once android's callsite is removed)

Bug: skia:
Change-Id: I35b412addfc0a08ea888a62609888b9b54dce2a6
Reviewed-on: https://skia-review.googlesource.com/11401
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-04-06 12:53:21 +00:00
Brian Salomon
e14bd80db0 Move GrPipelineBuilder into GrRenderTargetContext::addLegacyDrawOp
This makes the legacy code use GrProcessorSet::Analysis in the same manner as the non-GrLegacyMeshDrawOps which enables changes to how analysis works.

Change-Id: I8171e285ac8930beb3ac33cd3c4ee88f217b9e40
Reviewed-on: https://skia-review.googlesource.com/11205
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-04-04 19:46:18 +00:00
Eric Karl
744808823f Respect kRectsMustMatchForMSAASrc_BlitFramebufferFlag in dst setup
Crurently, when preparing a texture for blitFramebuffer, we ignore the
kRectsMustMatchForMSAASrc_BlitFramebufferFlag, and may attempt to
copy from one src rect to a different dst rect.

This change updates initDescForDstCopy and setupDstTexture to allocate
larger textures if necessary and accomodate this flags requirements.

Bug: 658277
Change-Id: If4489ac3192dcf6f9996494c63821279721d0a12
Reviewed-on: https://skia-review.googlesource.com/11141
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-04-04 17:26:38 +00:00
Mike Reed
6b3155c4be Revert[4] "clean up (partially) colortable api""""
Fixes:
- create temp api for android to pass nullptr
- don't release and access sk_sp<SkData> at the same time in parameters

This reverts commit b14131c185.

Bug: skia:
Change-Id: Ic0e4f62520ba9f35455499ed30d306ad19d998a8
Reviewed-on: https://skia-review.googlesource.com/11129
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
2017-04-03 19:29:38 +00:00
Mike Reed
887cdf1128 move vertex-mode enum into SkVertices
BUG=skia:6366

Change-Id: I3c0bf96cce6d32c9b8d12d16a772aaa6f18981aa
Reviewed-on: https://skia-review.googlesource.com/11062
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2017-04-03 15:50:16 +00:00
Brian Salomon
d3ccb0a37f Move pipeline handling out of GrMeshDrawOp.
The monolithic GrPipeline is moved to a subclass GrLegacyDrawMeshOp.

The pipeline used to record a GrMesh draw in a GrMeshDrawOp must now be passed rather than implicitly using the op's pipeline.

Change-Id: I50d77e4dcc8d91a523fa7566ce43a9a291174706
Reviewed-on: https://skia-review.googlesource.com/11002
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-04-03 15:13:48 +00:00
Mike Reed
b14131c185 Revert "Revert[2] "clean up (partially) colortable api"""
This reverts commit 9920b10f52.

Reason for revert: trying to get details on w2k failure

https://chromium-swarm.appspot.com/task?id=354345d34ba3b310&refresh=10

Caught exception 3221225477 EXCEPTION_ACCESS_VIOLATION, was running:
	unit test  HugeBlurImageFilter
	unit test  FontNames
	unit test  Codec_PngRoundTrip
	unit test  ClampRange
	unit test  FontHost
	unit test  ColorMatrixFilter
	f16 image scaled_codec_premul abnormal.wbmp
	565 image brd_android_codec_divisor_0.167 interlaced3.png_0.167
	unit test  Codec_png
	unit test  ImageFilterBlurLargeImage
	unit test  FontObj
	unit test  DrawText
	unit test  GrShape
	565 image brd_android_codec_divisor_0.333 interlaced2.png_0.333
	unit test  PathOpsOpCubicsThreaded
	unit test  PathOpsOpLoopsThreaded
	unit test  FontMgr
	unit test  ColorToHSVRoundTrip
	unit test  Image_Serialize_Encoding_Failure
Likely culprit:
	unit test  Image_Serialize_Encoding_Failure
step returned non-zero exit code: -1073741819


Original change's description:
> Revert[2] "clean up (partially) colortable api""
> 
> This reverts commit 1d1165ca65.
> 
> Bug: skia:
> Change-Id: Idbc0634ae3cec2e79f592d252de8751b077e6408
> Reviewed-on: https://skia-review.googlesource.com/11024
> 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: Ia4e73434b083224baa36092c69526c2f59bb16aa
Reviewed-on: https://skia-review.googlesource.com/11025
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-04-01 17:21:52 +00:00
Mike Reed
9920b10f52 Revert[2] "clean up (partially) colortable api""
This reverts commit 1d1165ca65.

Bug: skia:
Change-Id: Idbc0634ae3cec2e79f592d252de8751b077e6408
Reviewed-on: https://skia-review.googlesource.com/11024
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-04-01 16:46:11 +00:00
Mike Klein
ec61785bbb Revert "Respect kRectsMustMatchForMSAASrc_BlitFramebufferFlag in dst setup"
This reverts commit d58f040532.

Reason for revert: tests/BlendTest is failing on the Nexus Player:

https://chromium-swarm.appspot.com/task?id=353ffc638e202210
https://chromium-swarm.appspot.com/task?id=353ff5e35819ab10



Original change's description:
> Respect kRectsMustMatchForMSAASrc_BlitFramebufferFlag in dst setup
> 
> Crurently, when preparing a texture for blitFramebuffer, we ignore the
> kRectsMustMatchForMSAASrc_BlitFramebufferFlag, and may attempt to
> copy from one src rect to a different dst rect.
> 
> This change updates initDescForDstCopy and setupDstTexture to allocate
> larger textures if necessary and accomodate this flags requirements.
> 
> Bug: 658277
> Change-Id: I9f45a03d4055e0ad87c01e1d826287695096e609
> Reviewed-on: https://skia-review.googlesource.com/10941
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> 

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

Change-Id: I0fd6ca95bbc342f21978783b0103073179017795
Reviewed-on: https://skia-review.googlesource.com/11016
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-04-01 01:54:05 +00:00
Eric Karl
d58f040532 Respect kRectsMustMatchForMSAASrc_BlitFramebufferFlag in dst setup
Crurently, when preparing a texture for blitFramebuffer, we ignore the
kRectsMustMatchForMSAASrc_BlitFramebufferFlag, and may attempt to
copy from one src rect to a different dst rect.

This change updates initDescForDstCopy and setupDstTexture to allocate
larger textures if necessary and accomodate this flags requirements.

Bug: 658277
Change-Id: I9f45a03d4055e0ad87c01e1d826287695096e609
Reviewed-on: https://skia-review.googlesource.com/10941
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-04-01 01:22:45 +00:00
Mike Klein
1d1165ca65 Revert "clean up (partially) colortable api"
This reverts commit 2e491a6a11.

Reason for revert: Windows unit tests failing?

Original change's description:
> clean up (partially) colortable api
> 
> Needs this to land: https://codereview.chromium.org/2789853002/
> 
> Bug: skia:
> Change-Id: I38d916a546b7fa64d000d973e695ddda24a589e7
> Reviewed-on: https://skia-review.googlesource.com/10600
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Matt Sarett <msarett@google.com>
> 

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

Change-Id: I626e7edfcea82576a440dcaa851a04cedee6233f
Reviewed-on: https://skia-review.googlesource.com/10966
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-03-31 16:45:09 +00:00
Robert Phillips
f7a7261b4a Add tracking of unique proxyID beside unique renderTargetID in auditTrail and clearOp
Split out of: https://skia-review.googlesource.com/c/10284/ (Omnibus: Remove GrSurface-derived classes from ops)

Change-Id: I5845a47d94decc455ec3b1f0a5876b1c82aa32e8
Reviewed-on: https://skia-review.googlesource.com/10750
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-03-31 16:11:30 +00:00
Mike Reed
2e491a6a11 clean up (partially) colortable api
Needs this to land: https://codereview.chromium.org/2789853002/

Bug: skia:
Change-Id: I38d916a546b7fa64d000d973e695ddda24a589e7
Reviewed-on: https://skia-review.googlesource.com/10600
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
2017-03-31 15:39:31 +00:00
Brian Salomon
84eef5154b Revert "Respect kRectsMustMatchForMSAASrc_BlitFramebufferFlag in dst setup"
This reverts commit e0ff6ab272.

Reason for revert: a bunch of bots failed.

Original change's description:
> Respect kRectsMustMatchForMSAASrc_BlitFramebufferFlag in dst setup
> 
> Crurently, when preparing a texture for blitFramebuffer, we ignore the
> kRectsMustMatchForMSAASrc_BlitFramebufferFlag, and may attempt to
> copy from one src rect to a different dst rect.
> 
> This change updates initDescForDstCopy and setupDstTexture to allocate
> larger textures if necessary and accomodate this flags requirements.
> 
> Bug: 658277
> Change-Id: I500f10dba5700f5f7a7acad04bcdbc9ac9994835
> Reviewed-on: https://skia-review.googlesource.com/10247
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> 

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

Change-Id: I7fbd6c2652fe71c707d3120b035e0365fbc7fa66
Reviewed-on: https://skia-review.googlesource.com/10920
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-03-31 12:08:24 +00:00
Mike Klein
e15a7b528e ok, most features can be vias
This refactors most features out of ok's core into vias:
   -w    --> a .png dumping via, "png", opening the door to other types
   -m/-s --> a filtering via "filter"

Everything now can print a brief help message too.

Change-Id: I9e653aab98fd57182a6d458c7a80052130980284
Reviewed-on: https://skia-review.googlesource.com/10509
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-03-31 03:03:18 +00:00
Eric Karl
e0ff6ab272 Respect kRectsMustMatchForMSAASrc_BlitFramebufferFlag in dst setup
Crurently, when preparing a texture for blitFramebuffer, we ignore the
kRectsMustMatchForMSAASrc_BlitFramebufferFlag, and may attempt to
copy from one src rect to a different dst rect.

This change updates initDescForDstCopy and setupDstTexture to allocate
larger textures if necessary and accomodate this flags requirements.

Bug: 658277
Change-Id: I500f10dba5700f5f7a7acad04bcdbc9ac9994835
Reviewed-on: https://skia-review.googlesource.com/10247
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-03-31 02:13:05 +00:00
Mike Klein
200f6da4cd ok, unify failure and crash logging
Just as deferred and locked crash logging makes crashes easier to read,
so does deferred and locked failure logging make failures easier to read.

Change-Id: I71578d61b0056f8d7e692149762def1f155c0387
Reviewed-on: https://skia-review.googlesource.com/10280
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-03-28 14:11:38 +00:00
Mike Klein
4a77cf8696 ok, plumb in GrContextFactory
Didn't know what options would be useful here (path renderers?), so I've
left them default.  Obviously we can thread them through TestSrc options.

I now have "841 ok" and no failures on my Linux laptop, though I imagine
the GPU tests are all just no-op'd by the TODO at the bottom of the file.

Change-Id: Id934c0bdb5de96d96f2a391106b5d20116f41979
Reviewed-on: https://skia-review.googlesource.com/10213
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-03-28 12:40:44 +00:00
Mike Klein
6105e4bf2d ok, make tests really work
Here's how things work now:
    ~/skia (tests)> ninja -C out ok; and out/ok test
    ninja: Entering directory `out'
    [2/2] link ok
    112 ok../tests/TestConfigParsing.cpp:336
    configs[i]->getBackend().equals(expectedConfigs[i].backend)
    211 ok, 1 failed../tests/ShadowUtilsTest.cpp:25    Expected shadow
    tessellation to fail but it did not.
    ../tests/ShadowUtilsTest.cpp:30    Expected shadow tessellation to fail but it did not.
    ../tests/ShadowUtilsTest.cpp:36    Expected shadow tessellation to fail but it did not.
    ../tests/ShadowUtilsTest.cpp:42    Expected shadow tessellation to fail but it did not.
    637 ok, 2 failed

Change-Id: I84b108d4fabb538a2674831dd1ca64b149d7d265
Reviewed-on: https://skia-review.googlesource.com/10209
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-03-28 00:26:52 +00:00
Mike Klein
d63442d87c ok: add basic unit test support
Plenty TODO remaining.

This can actually kind of run without a test reporter or GrContext:
    $ out/ok test
    784 ok, 56 crashed
    ... lots of stack traces ...
Most tests don't use the reporter unless they're going to fail.

Change-Id: I7333e2c63ade5e671ebf60022d19390f1fc1c93a
Reviewed-on: https://skia-review.googlesource.com/10201
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-03-27 19:33:31 +00:00
Mike Klein
b338484d23 quiet some annoying logging in unit tests
Noticed all these while adding some unit test support to ok.

Change-Id: Ie33b96da95840628657211cb28b2134fd314a48a
Reviewed-on: https://skia-review.googlesource.com/10202
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-03-27 19:16:59 +00:00
Mike Klein
88f9c1eff9 ok: alias 565 -> sw:ct=565
This is mostly a demo, and to make sure it's easy.
If I'm thinking right, other non-ct options should Just Work.

Change-Id: I295db0fa04921ccdd766e1870e367594ca802462
Reviewed-on: https://skia-review.googlesource.com/10190
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-03-27 17:24:35 +00:00
Mike Klein
59eed0db99 ok: handle concurrent crashes better
lockf() is a simple way to prevent interlaced stack traces when there
are concurrent crashes.  After a crashing process rethrows its signal
and dies for real, the OS unlocks the file for other processes.

I tested this by making SkCanvas::drawRRect() crash on Linux:
20-odd GM crashes with interlaced stack traces before, none after.

Change-Id: I99930756b8c85c552eef7c3a77778e4c00d34c42
Reviewed-on: https://skia-review.googlesource.com/10177
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-03-27 14:54:51 +00:00
Mike Klein
0222e709a3 ok: refactor Src/Dst interactions
This makes everything a lot more like DM, for the same reason:
it's the best way to make Vias work.

Instead of exposing a canvas, Dsts take a Src to draw.  Vias still are
Dsts that wrap Dsts.  They do their internal work in draw() then pass a
proxy Src encapsulating that work to the next Dst's draw().

A little refactoring in ok.cpp allows arbitrary chains of Vias.

I removed the guarantee that Src methods are called in strict order.
It's easy enough to make each Src initialize itself as needed.

I moved the .png encoding back to ok.cpp.  It seemed weird for Dsts to
have to think about files and paths.  One day Dst will want a data()
method for non-image output (.pdf, .skp), and then we'll want ok.cpp to
be the one to coordinate what to write where.

Change-Id: Id4a3674b2d05aef2b5f10e0077df0a8407c07b61
Reviewed-on: https://skia-review.googlesource.com/10175
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-03-25 20:43:01 +00:00
Mike Klein
f5d1a5567e ok: basic Vias
Not sure if these simple Src/Dst interfaces will last.
Vias are a little tricky, and some may be impossible.

Change-Id: I42d19b1ee74b51a830bb781f25a888c0b32ba98c
Reviewed-on: https://skia-review.googlesource.com/10174
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-03-25 17:32:20 +00:00
Mike Klein
7ac04838c5 Spin off non-core parts of ok into their own files.
Now ok.cpp handles only the high level coordination of Srcs and Dsts,
without having to know or care what they are.

Some minor refactoring to things like Options.

Change-Id: I02df890b26d6d069e980a125b6a1ce1a7067b900
Reviewed-on: https://skia-review.googlesource.com/10173
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-03-25 16:13:20 +00:00
Mike Klein
51fe971046 ok: introduce the idea of Dsts
Change-Id: I47ac01f0c2c0f2f7b925de09c18d3c8265398c8a
Reviewed-on: https://skia-review.googlesource.com/10117
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-03-24 21:49:53 +00:00
Matt Sarett
f388093309 Delete SkColorSpace::ColorSpaceFlags
BUG=skia:

Change-Id: Ia0688876915cd773614ca0c4ccd467cf6e7c603e
Reviewed-on: https://skia-review.googlesource.com/10105
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2017-03-24 17:11:26 +00:00
Brian Salomon
528ca9bd91 Run angle in 8 sample msaa on desktop
Change-Id: If752152daabcdb7420fd13863fea4ce49f725aab
Reviewed-on: https://skia-review.googlesource.com/10108
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-03-24 16:40:34 +00:00
Mike Klein
adf7b330bd ok: fix an assert from unbalanced save/restores
The 'dont_clip_to_layer' GM does not balance its layers.  It calls
saveLayer() 3x but restore() only 2x.  This may be a bug in the GM
itself, but I'm not sure so I haven't changed it here.

If ok is writing .pngs, the surface passes ownership of its buffer to an
image snapshot, simply marking it as immutable.  Then, when the surface
is destroyed later, it destroys its inner canvas, which restores its
save stack to zero, actually doing some drawing in the case of
unbalanced saveLayer()s.  We then call notifyPixelsChanged() and hit an
assert saying "you just wrote some pixels but this buffer was marked
immutable."

DM doesn't show this problem because it's doesn't really use surfaces
and images, just bitmaps.  There's no ownership handoff and nothing is
ever immutable, so the condition triggering the assert never comes up.

I'm not really sure where we want to say is the bug:
  - SkCanvas can draw in its destructor?
  - SkSurface doesn't restore to zero before snapping an image?
  - that dont_clip_to_layer should call restore three times?

In any case, this guards against it in ok.

I was using this as a convenient crash to help figure out how to best
save and print stack traces, but now that I've got that worked out we
might as well fix this.

Change-Id: Id6d397f534dd1b50219e0d3078c989a4910883a6
Reviewed-on: https://skia-review.googlesource.com/10140
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-03-24 15:58:50 +00:00
Mike Klein
61e990297a ok: basic crash handling and stack trace dumps
This seems to work pretty nicely for each engine in the expected case of
few crashes.  The serial and thread engines just dump the first crash
stack to stderr before dying, while the fork engine saves all crashes to
a temporary file, then prints that to stderr once everything's finished.

I'm not sold on this TLS solution as being the best way to know what
was running when we crashed, but it's better than printing nothing.

Change-Id: I0aca66529301b1ad9bd51ec728848817586c606d
Reviewed-on: https://skia-review.googlesource.com/10102
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-03-24 15:55:50 +00:00
Mike Klein
9827256c8a Improve TaskEngine::wait_one().
This runs much faster.  Very good idea.

Change-Id: I088aa9588c069a17e4745be55c2397114ee8a2bc
Reviewed-on: https://skia-review.googlesource.com/10053
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-03-23 20:41:20 +00:00
Mike Klein
06432b26c6 ok
Change-Id: I9d01656a9d9b7aa3ab352dd4c168b26da620a903
Reviewed-on: https://skia-review.googlesource.com/9978
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-03-23 18:04:36 +00:00
Brian Salomon
d3b65972aa Mark overridden destructors with 'override' and remove 'virtual'
This silences a new warning in clang 5.0

Change-Id: Ieb5b75a6ffed60107c3fd16075d2ecfd515b55e8
Reviewed-on: https://skia-review.googlesource.com/10006
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-03-22 16:06:18 +00:00
Hal Canary
271d495a68 check-headers-self-sufficient: update
* Translate to python, use multiprocessing to make it wun in reasonanble time.
  * Fix three headers.
  * Move one header.

Change-Id: I0b26f912bb8086ec158d1c0bae76b923ec6121a4
Reviewed-on: https://skia-review.googlesource.com/8490
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-03-21 15:28:12 +00:00
Brian Salomon
dcf0ab0dc5 Switch 16 sample gpu configs to 8 samples
BUG=skia:

Change-Id: I053cce7c05c74860cbace00cd94ea4b96e9a482c
Reviewed-on: https://skia-review.googlesource.com/9889
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
2017-03-20 16:22:17 +00:00
Herb Derby
1a3c4b8cce Eager or Lazy evaluation of sub-drawings for SkDeferredCanvas.
Allow evaluation choice of Lazy or Eager evaluation for SkDeferredCanvas.

Eager is used for drawing to a non-recording canvas to reduce the number of
all operations.

Lazy is used for drawing to a recording canvas to reduce the amount decode/encode
that happens.

R=reed@google.com

Change-Id: I7837c4f6e5911c153e0796162e1170edbc34839e
Reviewed-on: https://skia-review.googlesource.com/9839
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2017-03-20 15:15:33 +00:00
Ben Wagner
1c1c740d27 GetResourceAsData to use SkData::MakeFromFileName directly.
The current code creates an SkFILEStream and then reads all the bytes
from it into an SkData. Instead, let the SkData just mmap the file.

Change-Id: I79e3550a84e6f54ccbbd7284f5cda81ce1fa9221
Reviewed-on: https://skia-review.googlesource.com/9877
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-03-20 14:21:30 +00:00
Brian Salomon
6405e71279 Remove gpu configs that don't have explicit API.
DOCS_PREVIEW= https://skia.org/?cl=9871

Change-Id: I510473cf91d8bee38d1e33424b1ae7b30dc86968
Reviewed-on: https://skia-review.googlesource.com/9871
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-03-20 13:31:49 +00:00
Brian Salomon
50f66d805b Be explicit on test and perf bots about GL vs GLES
This changes the names of several shorthand names for gpu configs to be prefixed either with "gl" or "gles" and makes the bots only use such configs. It adds some missing named configs.

Change-Id: Iea4e0e2ddafe0ac08e623111a15be7335156957c
Reviewed-on: https://skia-review.googlesource.com/9833
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
2017-03-17 19:09:37 +00:00
Brian Osman
b2082afc1d Detect RenderDoc in Windows viewer and make a core profile
BUG=skia:

Change-Id: I03a8a1b1ed9bd2483ddd8e231ba54dc10753b454
Reviewed-on: https://skia-review.googlesource.com/9836
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-03-17 17:43:19 +00:00
Mike Reed
fed9cfdc02 remove legacy virtual for vertices, only support object form
BUG=skia:6366

Change-Id: Ic422fa44a788d3488c050c6218dbfba188bb8f3e
Reviewed-on: https://skia-review.googlesource.com/9835
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2017-03-17 17:03:18 +00:00
Mike Reed
e88a1cb20e Revert[2] "More SkVertices implementation work""
The fix was to release the array of vertices in the picturerecorder
destructor (where we also release textblobs etc.

This reverts commit 1eb3fef136.

BUG=skia:

Change-Id: I3bf4acd6ad209205b0832a3cb7f94cd89dfcefc5
Reviewed-on: https://skia-review.googlesource.com/9826
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-03-17 14:27:33 +00:00
Mike Reed
1eb3fef136 Revert "More SkVertices implementation work"
This reverts commit 14583e11fd.

Reason for revert: leaking

Direct leak of 499104 byte(s) in 2112 object(s) allocated from:
    #0 0x1e195f0 in operator new(unsigned long) (/b/swarm_slave/w/irazbR79/out/Debug/dm+0x1e195f0)
    #1 0x3142b0a in SkVertices::Builder::init(SkCanvas::VertexMode, int, int, SkVertices::Sizes const&) (/b/swarm_slave/w/irazbR79/out/Debug/dm+0x3142b0a)


Original change's description:
> More SkVertices implementation work
> 
> - change virtuals to take const SkVertices*, as we do for TextBobs and Images
> - override onDrawVerticesObject in recording canvases
> - deserialize raw-vertices into SkVertices object
> 
> Possibly a follow-on would intercept the raw-form directly in canvas,
> and remove the virtual, and only support the object form.
> 
> BUG=skia:6366
> 
> Change-Id: I57a932667ccb3b3b004beb802ac3ae6898e3c6e0
> Reviewed-on: https://skia-review.googlesource.com/9633
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> 

TBR=bsalomon@google.com,reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:6366

Change-Id: I40bb7a20698ef6aa0a9ef71a3d6ac4c1473e081c
Reviewed-on: https://skia-review.googlesource.com/9825
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-03-17 13:09:52 +00:00
Mike Reed
14583e11fd More SkVertices implementation work
- change virtuals to take const SkVertices*, as we do for TextBobs and Images
- override onDrawVerticesObject in recording canvases
- deserialize raw-vertices into SkVertices object

Possibly a follow-on would intercept the raw-form directly in canvas,
and remove the virtual, and only support the object form.

BUG=skia:6366

Change-Id: I57a932667ccb3b3b004beb802ac3ae6898e3c6e0
Reviewed-on: https://skia-review.googlesource.com/9633
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-03-17 11:03:38 +00:00
Jim Van Verth
830104632f Rename GrAADistanceFieldPathRenderer to GrSmallPathRenderer
Also disables use of small distance fields in Android framework.

Change-Id: I1ba40ce85aa34d067608587e1fbe1d42e8a42868
Reviewed-on: https://skia-review.googlesource.com/9731
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
2017-03-16 13:22:31 +00:00
Hal Canary
0b83319b7f SkDynamicMemoryWStream::detachAsStream() returns unique_ptr
https://crrev.com/2747183002 must land first.
Change-Id: I65d1285a24d63c2c2f18662d511dea1c399511e1
Reviewed-on: https://skia-review.googlesource.com/9682
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2017-03-15 19:25:45 +00:00
Brian Osman
e0d4fbac00 Viewer's nonlinear blend mode uses SkColorSpaceXformCanvas
Also avoid asserting when untagged images are being transformed.

BUG=skia:

Change-Id: If712f39b5f588b2bc3dc318a5b782badb7662ccf
Reviewed-on: https://skia-review.googlesource.com/9695
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-03-15 15:17:13 +00:00
Ben Wagner
4d1955c43a Fix SkFILEStream.
Change-Id: I8c66e4e3e857227aed3d0bc497982f4c0d96d917
Reviewed-on: https://skia-review.googlesource.com/9498
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2017-03-10 19:58:46 +00:00
Brian Osman
0b791f57c4 Remove ownership aruments from render target wrap functions
We never adopt render targets (just borrow them).

BUG=skia:

Change-Id: Ie899b814a7a81339a8735bbd7ad9facc66e580d7
Reviewed-on: https://skia-review.googlesource.com/9525
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-03-10 15:41:38 +00:00
Robert Phillips
b726d58efc Partially defer SkImage_Gpu
One of SkImageCacherator, GrBitmapTextureMaker, GrImageTextureMaker, GrTextureAdjuster, GrTextureProducer or SkImage has to take the first step. This is probably the least odd of the options.

Change-Id: Ie167034553451f4b3633a5a1548dbd4d75839b3d
Reviewed-on: https://skia-review.googlesource.com/9488
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-03-10 15:02:11 +00:00
Brian Salomon
649a3411f9 Add a separate draw function to GrRenderTargetContext for GrMeshDrawOp derived classes.
The first phase of deferring GrPipeline creation until flush will apply only to GrDrawOp subclasses that do not derive from GrMeshDrawOp. This change prepares for that by creating separate draw functions on GrRenderTargetContext for GrMeshDrawOp-derived ops. This is temporary and will incrementally be undone as pipeline-creation deferral rolls out to the GrMeshDrawOps in a later phase of this work.


Change-Id: I0f5b71fe913f3273cfe9e965f7d8bbe7f01ad0ef
Reviewed-on: https://skia-review.googlesource.com/9481
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-03-09 19:26:13 +00:00
Brian Osman
28b1252bab Added MSAA selection to viewer GUI
On Windows, we need to reconstruct the window to allow setting a new
pixel format with a different sample count.

Added some code that maintains window size/position across these changes.
Previously, just cycling through backends would cause the window to move,
as the "default" position would cycle across the screen. Now it's pinned.

BUG=skia:

Change-Id: Iecbe7a490577382043ffe5a88c910b4c0be2ed5c
Reviewed-on: https://skia-review.googlesource.com/9085
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-03-08 22:48:57 +00:00
Mike Reed
8310f0e051 Revert "remove SkClipVisitor"
This reverts commit 91b961d33d.

Reason for revert: need to update caller in android

Original change's description:
> remove SkClipVisitor
> 
> With new device clipping, this is unsupported on SkCanvas
> 
> BUG=skia:
> 
> Change-Id: I39443f213be1005b8b9208d604e4bfb31cbda424
> Reviewed-on: https://skia-review.googlesource.com/9349
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> 

TBR=bsalomon@google.com,robertphillips@google.com,reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Change-Id: I22df0c66ec564ca32355179d2ee5ea14bff7b1d5
Reviewed-on: https://skia-review.googlesource.com/9456
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-03-08 21:42:51 +00:00
Brian Osman
4749b8c1b8 Maintain window position and size when re-created
Eliminates a UI oddity on Windows when cycling through backends.

BUG=skia:

Change-Id: I83f0325054def80bb9b6e5a9886461f8aad215ae
Reviewed-on: https://skia-review.googlesource.com/9453
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-03-08 21:11:50 +00:00
Brian Osman
3b65598bce Make SkGr.h private and remove unused functions
BUG=skia:

Change-Id: I6699d00c5412ed9d9bf14b032a08b06b1c766bce
Reviewed-on: https://skia-review.googlesource.com/9398
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-03-08 20:55:21 +00:00
Brian Salomon
41eac798f8 Add instanced rendering command line flag to viewer.
Previously this could only be turned on at runtime.

Change-Id: I1b626584fba17fcf8ff64135dd93f98c7f40821d
Reviewed-on: https://skia-review.googlesource.com/9445
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-03-08 20:26:17 +00:00
Mike Reed
91b961d33d remove SkClipVisitor
With new device clipping, this is unsupported on SkCanvas

BUG=skia:

Change-Id: I39443f213be1005b8b9208d604e4bfb31cbda424
Reviewed-on: https://skia-review.googlesource.com/9349
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-03-08 19:53:01 +00:00
Robert Phillips
c013892711 Add a unique ID to GrOpLists and return it from GrRenderTargetContext::addDrawOp
This is to support the preFlush callbacks

Change-Id: I8513ea08b6516681566eceafa789b2ee7925ebce
Reviewed-on: https://skia-review.googlesource.com/9199
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-03-08 17:33:41 +00:00
Brian Salomon
837fcb68ff Use glXCreateContextAttribsARB in viewer to make it easier to attach RenderDoc.
Change-Id: I0cc82fe826b81a082b579f60af3d9ef35d5fe351
Reviewed-on: https://skia-review.googlesource.com/9407
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2017-03-08 16:25:50 +00:00
Brian Salomon
99a339069c Add viewer GUI options for desktop and Android to toggle instanced rendering.
BUG=skia:

Change-Id: I42674abfb7ee764f676100ac0e84cc0f07620bec
Reviewed-on: https://skia-review.googlesource.com/9396
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-03-07 21:05:52 +00:00
Mike Reed
a1361364e6 Revert[6] "Remove SkDraw from device-draw methods, and enable device-centric clipping.""""""
Previous failure was failure to detect that the clip wasn't wide-open when
optimizing for retain-vs-discard in copy-on-write. gm:copy_on_write_retain
detected this. Now fixed by adding new method to SkBaseDevice.h

This reverts commit 27d07f0acb.

BUG=skia:6214

Change-Id: I532d16ec075a4525c2a550b1157bcec695dd8efd
Reviewed-on: https://skia-review.googlesource.com/9341
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2017-03-07 15:43:03 +00:00
Brian Salomon
467921e5e6 Move GrDrawOp pipeline/clip processing to GrRenderTargetContext
This is currently done in GrOpList. However, it can trigger resource creation, which in turn can trigger a flush. In the future flushing may destroy the op list.

Change-Id: I21cb1e10060bf31c95431c0511fcfff637cd6498
Reviewed-on: https://skia-review.googlesource.com/9304
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-03-07 15:11:24 +00:00
Brian Osman
92004807f2 Add legacy++ to viewer (sRGB w/nonlinear blending)
BUG=skia:6242

Change-Id: I696de8eac61aebaf5cb07d8874bde3c7bd470277
Reviewed-on: https://skia-review.googlesource.com/9299
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-03-06 17:21:08 +00:00