Commit Graph

2847 Commits

Author SHA1 Message Date
Mike Reed
0933bc9b67 Revert "Revert "resources: remove most uses of GetResourcePath()""
This reverts commit cca2300559.

Reason for revert: think I guessed wrong about g32 -- unreverting

Original change's description:
> Revert "resources: remove most uses of GetResourcePath()"
> 
> This reverts commit 5093a539de.
> 
> Reason for revert: google3 seems broken
> 
> Original change's description:
> > resources: remove most uses of GetResourcePath()
> > 
> > Going forward, we will standardize on GetResourceAsData(), which will
> > make it easier to run tests in environments without access to the
> > filesystem.
> > 
> > Also: GetResourceAsData() complains when a resource is missing.
> > This is usually an error.
> > 
> > Change-Id: Iaf70b71b0ca5ed8cd1a5538a60ef185ae8736188
> > Reviewed-on: https://skia-review.googlesource.com/82642
> > Reviewed-by: Hal Canary <halcanary@google.com>
> > Commit-Queue: Hal Canary <halcanary@google.com>
> 
> TBR=halcanary@google.com,scroggo@google.com
> 
> Change-Id: Ic5a7c0167c995a672e6b06dc92abe00564432214
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/83001
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>

TBR=halcanary@google.com,scroggo@google.com,reed@google.com

Change-Id: I5a46e4de61186a8a5eb9cacd3275e24e311d5a07
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/82942
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-12-09 01:27:50 +00:00
Mike Reed
cca2300559 Revert "resources: remove most uses of GetResourcePath()"
This reverts commit 5093a539de.

Reason for revert: google3 seems broken

Original change's description:
> resources: remove most uses of GetResourcePath()
> 
> Going forward, we will standardize on GetResourceAsData(), which will
> make it easier to run tests in environments without access to the
> filesystem.
> 
> Also: GetResourceAsData() complains when a resource is missing.
> This is usually an error.
> 
> Change-Id: Iaf70b71b0ca5ed8cd1a5538a60ef185ae8736188
> Reviewed-on: https://skia-review.googlesource.com/82642
> Reviewed-by: Hal Canary <halcanary@google.com>
> Commit-Queue: Hal Canary <halcanary@google.com>

TBR=halcanary@google.com,scroggo@google.com

Change-Id: Ic5a7c0167c995a672e6b06dc92abe00564432214
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/83001
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-12-08 21:09:19 +00:00
Hal Canary
53e5e7d4ce resources: resource identifiers don't begin with leading slash
Change-Id: I52522ffffbf0f5176ac9156cd563b41d6fdde59f
Reviewed-on: https://skia-review.googlesource.com/82940
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-12-08 20:03:18 +00:00
Hal Canary
5093a539de resources: remove most uses of GetResourcePath()
Going forward, we will standardize on GetResourceAsData(), which will
make it easier to run tests in environments without access to the
filesystem.

Also: GetResourceAsData() complains when a resource is missing.
This is usually an error.

Change-Id: Iaf70b71b0ca5ed8cd1a5538a60ef185ae8736188
Reviewed-on: https://skia-review.googlesource.com/82642
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-12-08 19:30:48 +00:00
Hal Canary
c465d13e6f resources: orgainize directory.
Should make it easier to ask just for images.

Change-Id: If821743dc924c4bfbc6b2b2d29b14affde7b3afd
Reviewed-on: https://skia-review.googlesource.com/82684
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2017-12-08 17:16:00 +00:00
Brian Salomon
f06c358267 Remove instanced rendering
Change-Id: I4219b1d23a647b849ee41fe71b53e1c45edfc3f4
Reviewed-on: https://skia-review.googlesource.com/82241
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-12-08 13:41:10 +00:00
Greg Daniel
afb7ec7a40 Revert "Revert "Add define to use customize vulkan header.""
This reverts commit b351817588.

Reason for revert: Relanding with android fixes

Original change's description:
> Revert "Add define to use customize vulkan header."
>
> This reverts commit a492eb0e1f.
>
> Reason for revert: Breaking Android roll (b/c builds tools?)
>
> Original change's description:
> > Add define to use customize vulkan header.
> >
> > Bug: skia:
> > Change-Id: Ia87c81a54603a02b2f8f51a735bf173a49afe6c7
> > Reviewed-on: https://skia-review.googlesource.com/81121
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
>
> TBR=egdaniel@google.com,bsalomon@google.com
>
> Change-Id: I80a685bf88af909865f274ffc61686be57e8c313
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/81740
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

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

Change-Id: Ia701e884bfa3799dc73002f892feb2ecafe9da12
Reviewed-on: https://skia-review.googlesource.com/81742
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-12-07 18:29:39 +00:00
Brian Salomon
384fab467e sk_spification of GrGpu creation.
Make GrContext::MakeGL take interface as sk_sp.

Make GrContext::MakeVulkan take GrVkBackendContext as sk_sp.

Change-Id: I13c22a57bd281c51738f503d9ed3418d35a466df
Reviewed-on: https://skia-review.googlesource.com/81842
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-12-07 17:56:59 +00:00
Brian Salomon
b351817588 Revert "Add define to use customize vulkan header."
This reverts commit a492eb0e1f.

Reason for revert: Breaking Android roll (b/c builds tools?)

Original change's description:
> Add define to use customize vulkan header.
> 
> Bug: skia:
> Change-Id: Ia87c81a54603a02b2f8f51a735bf173a49afe6c7
> Reviewed-on: https://skia-review.googlesource.com/81121
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

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

Change-Id: I80a685bf88af909865f274ffc61686be57e8c313
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/81740
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-12-07 13:19:51 +00:00
Mike Reed
fadbfcd4ab upgrade SkReadBuffer to always validate
Bug: skia:
Change-Id: I054560b66c6cde346d939015326d8547879d2c4b
Reviewed-on: https://skia-review.googlesource.com/81160
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2017-12-06 21:33:00 +00:00
Greg Daniel
a492eb0e1f Add define to use customize vulkan header.
Bug: skia:
Change-Id: Ia87c81a54603a02b2f8f51a735bf173a49afe6c7
Reviewed-on: https://skia-review.googlesource.com/81121
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-12-06 21:29:49 +00:00
Mike Klein
bbfe515474 remove ThermalManager
It throttles 1000x more than intended, and I suspect that some of the
trip points it uses to decide when to throttle make no sense.  We've
already turned it off on the Nexus 5x.

Change-Id: Idf556a83fe61ccc5f63c7bede3eecbe80087e28b
Reviewed-on: https://skia-review.googlesource.com/81303
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-12-06 21:25:29 +00:00
Mike Reed
60691a5127 add serial procs to pictures
Bug: skia:7380
Change-Id: Ic1b7e437316c7913711cf5cb119e3fe904cd2c05
Reviewed-on: https://skia-review.googlesource.com/76980
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-12-05 20:33:18 +00:00
Chris Dalton
a32a3c32c3 Add analytic clip FPs that read from the CCPR atlas
Bug: skia:7190
Change-Id: Ie31d368f52910e6917efdeb1b024370b06fc11ee
Reviewed-on: https://skia-review.googlesource.com/77160
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-12-05 18:06:18 +00:00
Brian Osman
bb4b20a265 Keep animation running while moving the mouse in viewer (on Windows)
Animated slides (like addarc) would appear to pause while dragging the
mouse around. This was because the message queue was never empty - we
would just alternate handling WM_MOUSEMOVE and WM_PAINT messages. Forcing
an onIdle before each onPaint appears to fix the problem.

Bug: skia:
Change-Id: I1d19f83c2cf480f327420a2682a074213847d062
Reviewed-on: https://skia-review.googlesource.com/80620
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-12-05 15:39:01 +00:00
Brian Osman
6f3eac9b5d Fix sample modifier keys for mouse events
Bug: skia:
Change-Id: I0fc4f15abc44ff0a1b6b92e238e7abda35e7bacb
Reviewed-on: https://skia-review.googlesource.com/79904
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-12-05 14:05:31 +00:00
Mike Reed
2484660d1b add util to compare images
Bug: skia:
Change-Id: Ia64e517c2fbb5560243c07ab17a887a104e07559
Reviewed-on: https://skia-review.googlesource.com/79721
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-12-04 21:28:09 +00:00
Chris Dalton
d1ec4105f7 Fix ANGLE build with extended clang warnings
Add newline-eof to the list of ignroed warnings.
Fix shadowed fields.

Bug: skia:
Change-Id: I4985ce2495194a7f805af98c4f42c44691086e36
Reviewed-on: https://skia-review.googlesource.com/79681
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-12-04 20:54:40 +00:00
Chris Dalton
1ef80942b3 turn on extended Clang warnings on Windows too
Plus some small rearrangements of the various warning lists.

Change-Id: Ied58f940341d69ddab971a529fd01b1e96b65641
Reviewed-on: https://skia-review.googlesource.com/67720
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-12-04 19:29:51 +00:00
Brian Salomon
80654c16bd Exit from GLTestAtlasTextRenderer early if GL version is not supported.
Change-Id: I3586619ba0ced188cdb4848ae8cb4e07bc12efe3
Reviewed-on: https://skia-review.googlesource.com/79420
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-12-01 21:21:19 +00:00
Cary Clark
3cd22cc543 working on skimage
working on skimage

Docs-Preview: https://skia.org/?cl=76562
Bug: skia:
Change-Id: I288d2a9bbbdf01bff9efd5f0a9d308d3c76391a4
Reviewed-on: https://skia-review.googlesource.com/76562
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
2017-12-01 17:13:39 +00:00
Brian Osman
3ac99cfaa2 Add 'Save to SKP' option to Viewer
Bug: skia:
Change-Id: Iea3794ce8710c84f2529b78b21655f2bf6aaa90e
Reviewed-on: https://skia-review.googlesource.com/79160
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-12-01 17:05:29 +00:00
Brian Osman
fa91627a75 Move some bits from views to sk_app
Most of these are required for sk_app, and have nothing to do with the
code that's left in views at this point. No presubmit due to missing
copyright in third-party public domain code.


No-Presubmit: true
Bug: skia:
Change-Id: If725f755f7f12f26b6bdc0cacfb136557b831bcf
Reviewed-on: https://skia-review.googlesource.com/78981
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-12-01 14:47:10 +00:00
Chris Dalton
706a6ff60c Add "lazy" texture proxies
Adds ultra-deferred proxies that are instantiated by a user-supplied
callback during flush.

Bug: skia:7190
Change-Id: I75a7ac6dba953c3b0a99febc203a7f4d2f3789fc
Reviewed-on: https://skia-review.googlesource.com/76461
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-11-30 15:37:12 +00:00
Brian Osman
ede860e91c Delete even more unused views code
Bug: skia:
Change-Id: I41480aa89dfcd8cb7e016e477cbabe354f35ce8a
Reviewed-on: https://skia-review.googlesource.com/75480
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-11-29 18:12:35 +00:00
Ravi Mistry
19ea45ef53 Exclude URLs only for some page sets
Bug: skia:7348
Change-Id: Iabf4c0d0bf83a0caeeb06027e5617a18900ac5fc
Reviewed-on: https://skia-review.googlesource.com/77180
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2017-11-29 16:26:57 +00:00
Mike Reed
d395596165 remove writeBitmap from SkWriteBuffer -- unused
Bug: skia:
Change-Id: I8809e7e138d64cc30389e8efc76265011b287611
Reviewed-on: https://skia-review.googlesource.com/77060
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-11-28 20:12:08 +00:00
Ravi Mistry
0f8e4dbd28 Make RecreateSKPs bot fail if capturing SKPs fails + exclude failing page sets
Bug: skia:7348
Change-Id: I8dd6337d2efeb1aaa71ac41fcb82b9a22bbd7531
Reviewed-on: https://skia-review.googlesource.com/76220
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2017-11-28 17:30:27 +00:00
Robert Phillips
7f1b4f8cc3 Fix issues related to backend texture/rendertarget creation
Change-Id: I640ea5f316e9e4aba778f450655e74636199e0b1
Reviewed-on: https://skia-review.googlesource.com/76440
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-11-28 13:03:47 +00:00
Mike Klein
7b093b7742 remove SkDebugCanvas clip query overrides
We don't think these are important, and it's looking
like overriding these methods at all is a bad idea.

While here we can remove kVizImageHeight and width too, as they're
unused.  After all these deletions the comment about methods inherited
from SkCanvas no longer applies.

Change-Id: I036eb9ccca4821516a287daec9847addd529a28c
Reviewed-on: https://skia-review.googlesource.com/76480
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-11-27 23:16:08 +00:00
Mike Klein
aa73b96760 clean up SkDeferredCanvas
To our knowledge it's not used.
Its defer- mode in DM isn't even run on the bots.

Change-Id: Ifebfa2a77bfed8370eb421d379697f04fa2c8608
Reviewed-on: https://skia-review.googlesource.com/76420
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-11-27 21:31:26 +00:00
Robert Phillips
c34aa9d51a Add Fiddle DrawOptions for the backend objects
Change-Id: I720125f134394a8b923d6e883941d20715945d73
Reviewed-on: https://skia-review.googlesource.com/73340
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-11-27 17:22:26 +00:00
Brian Salomon
cf7e1d06bc Make EGL test context access GL via GrGLInterface
Bug: skia:7334
Change-Id: I5153ef83ae350648a15d6dc427b03d464258608b
Reviewed-on: https://skia-review.googlesource.com/75980
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-11-27 16:50:26 +00:00
Cary Clark
a560c4796f bookmaker refresh
Add support for more operator overloads.
Add SkSurface, SkPoint, SkIPoint, SkIPoint16 docs.
(SkImage doc skeleton added, but not really started.)
Force recompile all examples.

Docs-Preview: https://skia.org/?cl=67726
Bug: skia:6898
Change-Id: If9e2d23f79d5db64146dd22588f5cac970614b8a
Reviewed-on: https://skia-review.googlesource.com/67726
Commit-Queue: Cary Clark <caryclark@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
2017-11-27 16:12:56 +00:00
Brian Osman
4f99e58252 Remove a huge pile of views code
All of this is dead when not using the old SkWindow framework.

TBR=reed@google.com

Bug: skia:
Change-Id: I0f6ab18987a98469bfd367d5bc10967300dfd3ca
Reviewed-on: https://skia-review.googlesource.com/75384
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-11-22 18:59:44 +00:00
Yuqian Li
b2ba6644cf Add threaded backend to viewer
Bug: skia:
Change-Id: Ibf672921f8a05705e7262aad0b1f3f1e6fc0ef9c
Reviewed-on: https://skia-review.googlesource.com/75382
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
2017-11-22 17:34:44 +00:00
Brian Osman
7784facfad Remove old iOSShell code
Bug: skia:
Change-Id: Ia737ee97b145aa637641454aff211af00049a460
Reviewed-on: https://skia-review.googlesource.com/74661
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-11-21 22:19:19 +00:00
Brian Osman
07b56b2f38 Add XY to zoom window
Bug: skia:7332
Change-Id: I3a7d5cf20c75bb288d5aa0fa9046e77a669aad64
Reviewed-on: https://skia-review.googlesource.com/74560
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-11-21 20:23:11 +00:00
Brian Osman
eff04b5ec2 Remove SampleApp and convert HelloWorld to sk_app
There is still a large amount of views code that could be trimmed down,
but which is used to implement samples (in viewer). Seemed simpler to
remove some of this code in pieces.

Bug: skia:
Change-Id: Ia3415060d03c8de604a154e3dc38379b754daab6
Reviewed-on: https://skia-review.googlesource.com/72801
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-11-21 18:37:19 +00:00
Brian Salomon
0c1c2b39dd Make SkAtlasTextTarget use glyph IDs
Bug: skia:
Change-Id: Idefd69f02f62fea22c41a3476676773221c3ae81
Reviewed-on: https://skia-review.googlesource.com/73700
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-11-20 18:33:38 +00:00
Brian Salomon
40dc8a71f5 Add clear function to TestAtlasTextRendering interface
Bug: skia:
Change-Id: I24563abe5e72e57e6764ddf6aca76ccf098cc488
Reviewed-on: https://skia-review.googlesource.com/73640
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-11-20 17:59:48 +00:00
Brian Salomon
cbcb0a12ad Revert "Revert "Add Atlas Text interface for rendering SDF glyphs.""
This reverts commit 9c2202ffc2.

Bug: skia:
Change-Id: I482ddf74f8e40d3d0908c840ba5c6ff981ccefbd
Reviewed-on: https://skia-review.googlesource.com/73345
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-11-19 18:55:18 +00:00
Greg Daniel
9c2202ffc2 Revert "Add Atlas Text interface for rendering SDF glyphs."
This reverts commit 39631f3df1.

Reason for revert: break google3 rool

Original change's description:
> Add Atlas Text interface for rendering SDF glyphs.
> 
> This new API is built upon SDF text atlas code from the GPU backend. Unlike using the GPU
> backend to draw text, this set of interfaces allows the client to render the SDF glyphs. The
> client issues text draws to potentially multiple targets and then the client flushes. The
> client then gets commands from Skia with data to put into a texture atlas and vertices to
> draw that reference the texture. The client is responsible for creating the texture, uploading
> the SDF data to the texture, and drawing the vertices provided by Skia.
> 
> Change-Id: Ie9447e19b85f0ce1c2b942e5216c787a74f335d3
> Reviewed-on: https://skia-review.googlesource.com/59360
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

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

Change-Id: I4aad0c99e645b476fd8ba25731f2a10e8802bb25
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/73420
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-11-18 13:32:08 +00:00
Brian Salomon
39631f3df1 Add Atlas Text interface for rendering SDF glyphs.
This new API is built upon SDF text atlas code from the GPU backend. Unlike using the GPU
backend to draw text, this set of interfaces allows the client to render the SDF glyphs. The
client issues text draws to potentially multiple targets and then the client flushes. The
client then gets commands from Skia with data to put into a texture atlas and vertices to
draw that reference the texture. The client is responsible for creating the texture, uploading
the SDF data to the texture, and drawing the vertices provided by Skia.

Change-Id: Ie9447e19b85f0ce1c2b942e5216c787a74f335d3
Reviewed-on: https://skia-review.googlesource.com/59360
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-11-17 20:35:06 +00:00
Brian Salomon
55ad774812 Revert "Revert "Add method to sk_gpu_test::TestContext to automatically restore the previous context.""
This reverts commit 1e09e461d2.

Change-Id: I95d5544a7baaa078536790493ce4119816a77e94
Reviewed-on: https://skia-review.googlesource.com/72903
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-11-17 16:22:56 +00:00
Robert Phillips
57e0828fad Add backend GPU objects to fiddle app
TBR=bsalomon@google.com
Change-Id: I8876a4657f837436322150925233e0f36c91e8f0
Reviewed-on: https://skia-review.googlesource.com/72641
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
2017-11-17 12:53:55 +00:00
Brian Osman
1e09e461d2 Revert "Add method to sk_gpu_test::TestContext to automatically restore the previous context."
This reverts commit 5627d65146.

Reason for revert: Google3

Original change's description:
> Add method to sk_gpu_test::TestContext to automatically restore the previous context.
> 
> The motivation for this is to allow a GM to create a GL context, do some some work in it, and then return to the context that was set when it was invoked.
> 
> Change-Id: Ie8496072a10f8f3ff36a08889e593a6ca961b61a
> Reviewed-on: https://skia-review.googlesource.com/70720
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

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

Change-Id: Ifb79638c9d4500ca3be9a5be39a5ad78b20247c1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/72981
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-11-16 22:31:39 +00:00
Brian Salomon
5627d65146 Add method to sk_gpu_test::TestContext to automatically restore the previous context.
The motivation for this is to allow a GM to create a GL context, do some some work in it, and then return to the context that was set when it was invoked.

Change-Id: Ie8496072a10f8f3ff36a08889e593a6ca961b61a
Reviewed-on: https://skia-review.googlesource.com/70720
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2017-11-16 16:30:53 +00:00
Brian Salomon
dcfca431e3 Use GrContextFactories that produce a single GrContext in unit tests.
This is to alleviate problems due to the command buffer getting bent out of shape when the current
OpenGL context is switched out from under it (because we ran a test with a native GL context). This,
however is not a full solution. More changes will be required to ensure that after running each
command buffer or native test we bind the null context. This does allow us to take a step in that
direction without breaking anything too badly. Moreover, there is no real benefit to reusing a
GrContextFactory.

Modifies DEF_GPUTEST to take GrContextOptions rather than a factory to use. Tests were already using
their own factories anyway.

In tests that use GrContextFactory the factory instance is moved to the inner loop.

Modifies gpucts and skia_test to not use persistent GrContextFactories.

Change-Id: Ie7a36793545c775f2f30653ead6fec93a3d22717
Reviewed-on: https://skia-review.googlesource.com/71861
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-11-15 22:03:07 +00:00
Mike Klein
f436fbc422 slice GMs by native font platform, not by emoji format
Right now the native font platform implies what emoji formats are
supported, and we hope to support more than one per platform.  Let's
get these formats out of the name.

As with most other font-y things, only the NativeFont bots are going to
get back anything interesting now.  The others will see no emoji font
and an empty emoji sample text string.

I'm going to look at a pre-baked testing SkTypeface that serves as an
emoji font for the non-NativeFont bots next.

Change-Id: Ie1374fc0e988bfe20ae21208e2f7e0a66a68fcb1
Reviewed-on: https://skia-review.googlesource.com/71762
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-11-15 16:52:56 +00:00