Commit Graph

4849 Commits

Author SHA1 Message Date
Hal Canary
209e4b1b70 Revert "Revert "SkTypeface::getAdvancedMetrics(): cleanup""
This reverts commit 59ad782b2b.

   - SkAdvancedTypefaceMetrics is a struct not a class
   - SkTypeface::PerGlyphInfo is gone
   - s/getAdvancedTypefaceMetrics/getAdvancedMetrics/g
   - s/onGetAdvancedTypefaceMetrics/onGetAdvancedMetrics/g
   - [on]getAdvancedMetrics now return unique_ptr rather than bare ptr.
   - [on]getAdvancedMetrics no longer has parameters. (Only caller always
     used same arguments.)
   - SkAdvancedTypefaceMetrics uses C++11 in-class member initializers.
   - SkAdvancedTypefaceMetrics no longer inherits from SkRefCnt

Change-Id: I91b56e60f7d9de7d46c426c6bd34ce124e0cf00e
Reviewed-on: https://skia-review.googlesource.com/15360
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-05-05 13:53:40 +00:00
Hal Canary
59ad782b2b Revert "SkTypeface::getAdvancedMetrics(): cleanup"
This reverts commit cef018896e.

Reason for revert: broke chromium roll (windows).

Original change's description:
> SkTypeface::getAdvancedMetrics(): cleanup
> 
>   - SkAdvancedTypefaceMetrics is a struct not a class
>   - SkTypeface::PerGlyphInfo is gone
>   - s/getAdvancedTypefaceMetrics/getAdvancedMetrics/g
>   - s/onGetAdvancedTypefaceMetrics/onGetAdvancedMetrics/g
>   - [on]getAdvancedMetrics now return unique_ptr rather than bare ptr.
>   - [on]getAdvancedMetrics no longer has parameters. (Only caller always
>     used same arguments.)
>   - SkAdvancedTypefaceMetrics uses C++11 in-class member initializers.
>   - SkAdvancedTypefaceMetrics no longer inherits from SkRefCnt
> 
> Change-Id: I37571ebcc383ba9eb21bc20c60c734e3ca317582
> Reviewed-on: https://skia-review.googlesource.com/15311
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Commit-Queue: Hal Canary <halcanary@google.com>
> 

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

Change-Id: I84c7d53df566aaf83427e3368edaa02b7b5a9cb8
Reviewed-on: https://skia-review.googlesource.com/15319
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-05-04 18:20:45 +00:00
Hal Canary
cef018896e SkTypeface::getAdvancedMetrics(): cleanup
- SkAdvancedTypefaceMetrics is a struct not a class
  - SkTypeface::PerGlyphInfo is gone
  - s/getAdvancedTypefaceMetrics/getAdvancedMetrics/g
  - s/onGetAdvancedTypefaceMetrics/onGetAdvancedMetrics/g
  - [on]getAdvancedMetrics now return unique_ptr rather than bare ptr.
  - [on]getAdvancedMetrics no longer has parameters. (Only caller always
    used same arguments.)
  - SkAdvancedTypefaceMetrics uses C++11 in-class member initializers.
  - SkAdvancedTypefaceMetrics no longer inherits from SkRefCnt

Change-Id: I37571ebcc383ba9eb21bc20c60c734e3ca317582
Reviewed-on: https://skia-review.googlesource.com/15311
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-05-04 16:57:43 +00:00
Mike Klein
ba9028440b try re-enabling test_diagonal on 565
I just landed a CL that changed dithering enough that it's worth seeing
if this test passes again.

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Android-Clang-PixelC-CPU-TegraX1-arm64-Release-Android,Test-Android-Clang-Nexus10-CPU-Exynos5250-arm-Release-Android

Change-Id: I1dfd27fdc7d8646e0008b667617383c08c7abd5a
Reviewed-on: https://skia-review.googlesource.com/15315
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-05-04 16:37:13 +00:00
Jim Van Verth
060d982036 Combine the ambient and spot alphas into the base color
for geometric shadows. 

This matches the analytic shadow approach better, and
is color space invariant.
Also includes cleanup in SampleAndroidShadows.

Bug: skia:6546
Change-Id: I7a7cd060420dae741f967334c8b19542a14f0bcf
Reviewed-on: https://skia-review.googlesource.com/15228
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-05-04 14:28:28 +00:00
Ethan Nicholas
421fe443f8 Revert "Revert "Revert "eliminated GrGLSLExpr"""
This reverts commit 796001c82e.

Reason for revert: looks to be causing problems in Chrome (https://storage.googleapis.com/chromium-layout-test-archives/WebKit_Linux_Trusty__dbg_/1553/layout-test-results/results.html)

Original change's description:
> Revert "Revert "eliminated GrGLSLExpr""
> 
> This reverts commit 5e550ab57e.
> 
> Bug: skia:
> Change-Id: I4705e47dbd209aa8f43db3d28c856bd3aa9e49ab
> Reviewed-on: https://skia-review.googlesource.com/15187
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> 

TBR=ethannicholas@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I6455a4f16b2dc0d6d1265541f7117e0cfb8dd91c
Reviewed-on: https://skia-review.googlesource.com/15309
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-05-04 13:11:09 +00:00
Stephen White
64dbb89efc GrTessellator: fix for vertex coincident with enclosing edge.
If a previously-enclosing edge coincides exactly with the current 
vertex, there are no two adjacent edges which enclose the vertex.
Since find_enclosing_edges() ensures that the left enclosing edge
is to the left of the vertex, the fix is to split the right 
enclosing edge on the current vertex and restart intersection 
tests.

Bug: 716720
Change-Id: Id26c5b92a6d6139f348e99554638cded37e81a8e
Reviewed-on: https://skia-review.googlesource.com/15261
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2017-05-04 05:10:48 +00:00
Mike Klein
69b1045ce2 disable test_diagonal on 565
We're no longer necessarily going to get exact results as we go along.
Lots of little things like dither, FMA, whether we're using the full
precision pipeline or the old paths, etc.

Change-Id: Iacba1820e79cd1e380d3af7861d9678ca7b93ad8
Reviewed-on: https://skia-review.googlesource.com/15246
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-05-03 20:45:35 +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
Chris Dalton
ff92650206 Convert GrMesh to a struct
Converts GrMesh to a struct and changes the names/semantics of its
fields to be more inline with their GL counterparts. Also renames the
"instancing" feature to "pattern", to avoid ambiguity with hardware
instancing.

Bug: skia:
Change-Id: Ia0999d4f9c83b5dd31f81b9bf4f36ed9abd26286
Reviewed-on: https://skia-review.googlesource.com/15157
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-05-03 19:08:40 +00:00
Robert Phillips
a91e0b7cc2 Allow TextureSamplers to have null GrTexture pointer
Bug: 715488

Change-Id: I69775cbb50d334d81872e236e59368fe65e698ff
Reviewed-on: https://skia-review.googlesource.com/14605
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-05-03 16:59:37 +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
Ethan Nicholas
796001c82e Revert "Revert "eliminated GrGLSLExpr""
This reverts commit 5e550ab57e.

Bug: skia:
Change-Id: I4705e47dbd209aa8f43db3d28c856bd3aa9e49ab
Reviewed-on: https://skia-review.googlesource.com/15187
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-05-03 14:13:41 +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
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
Brian Salomon
5e550ab57e Revert "eliminated GrGLSLExpr"
This reverts commit 93f20f5629.

Reason for revert: Mismerge readded deleted files.

Original change's description:
> eliminated GrGLSLExpr
> 
> Now that skslc performs all of the optimizations (and then some) that
> GrGLSLExpr is responsible for, it's just extra work for no benefit.
> 
> Bug: skia:
> Change-Id: I40b0629e00a33873ed9fc6c0a9f41d8350221f9a
> Reviewed-on: https://skia-review.googlesource.com/14560
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> 

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

Change-Id: Ia8b723594527afe34489fc78a4b49039081b6390
Reviewed-on: https://skia-review.googlesource.com/15154
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-05-02 21:07:32 +00:00
Matt Sarett
26b44df233 Add support for row-by-row jpeg encoding
Reland of:
https://skia-review.googlesource.com/c/14641/

Bug: 713862
Change-Id: I9dca5ede4ebf569c5f80edcfb23a506b6cfa935e
Reviewed-on: https://skia-review.googlesource.com/15144
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-05-02 20:40:10 +00:00
Ethan Nicholas
93f20f5629 eliminated GrGLSLExpr
Now that skslc performs all of the optimizations (and then some) that
GrGLSLExpr is responsible for, it's just extra work for no benefit.

Bug: skia:
Change-Id: I40b0629e00a33873ed9fc6c0a9f41d8350221f9a
Reviewed-on: https://skia-review.googlesource.com/14560
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-05-02 20:05:56 +00:00
Ethan Nicholas
0dd30d9928 sksl support for buffer blocks
Bug: skia:
Change-Id: Ic2cabaf2c7fb23cec7863f2b6152bbed133e0886
Reviewed-on: https://skia-review.googlesource.com/14947
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-05-02 17:39:45 +00:00
Leon Scroggins
c06f309cf5 Revert "Add support for row-by-row jpeg encoding"
This reverts commit 9b848d5749.

Reason for revert: ASAN reports leaked memory [1]. Google3 reports a "delete size mismatch" [2], which I suspect is the same issue.

[1] https://chromium-swarm.appspot.com/task?id=35e2c9fa9eac6310&refresh=10&show_raw=1
[2] https://test.corp.google.com/ui#cl=154838904&flags=CAMQBQ==&id=OCL:154838904:BASE:154839043:1493741642370:9c96115f&t=//chrome/skia/dm_wrapper:dm_wrapper

Original change's description:
> Add support for row-by-row jpeg encoding
> 
> Bug: 713862
> Change-Id: I787b7c49662a00b89ae0ef35845dfbd6be3e6fb1
> Reviewed-on: https://skia-review.googlesource.com/14641
> Commit-Queue: Matt Sarett <msarett@google.com>
> Reviewed-by: Leon Scroggins <scroggo@google.com>
> 

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

Change-Id: Ic5a8d67e0d4a7733662586055ceff086a2ab335d
Reviewed-on: https://skia-review.googlesource.com/15140
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2017-05-02 17:08:35 +00:00
Matt Sarett
9b848d5749 Add support for row-by-row jpeg encoding
Bug: 713862
Change-Id: I787b7c49662a00b89ae0ef35845dfbd6be3e6fb1
Reviewed-on: https://skia-review.googlesource.com/14641
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2017-05-02 16:07:15 +00:00
Greg Daniel
a18d2db2fc Fix VkWrapTest
Fix current breakage on bots.

Bug: skia:
Change-Id: I4b60ef85d941a179d76cccc1a468aaa6437caddc
Reviewed-on: https://skia-review.googlesource.com/15104
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-05-02 16:05:35 +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
Mike Klein
b34ab04884 Revert "Revert "SaveLayerRec::fClipMask -> raw pointer""
This reverts commit 3354969a4a.

Reason for revert: not the problem?

Original change's description:
> Revert "SaveLayerRec::fClipMask -> raw pointer"
> 
> This reverts commit a6b72cb572.
> 
> Reason for revert: red bots
> 
> Original change's description:
> > SaveLayerRec::fClipMask -> raw pointer
> > 
> > Use raw pointers for optional clip mask plumbing, to match the backdrop
> > API.
> > 
> > Change-Id: I7eb0ee5896faf34cc05789ba0703f35a4ab6a4f2
> > Reviewed-on: https://skia-review.googlesource.com/14901
> > Reviewed-by: Mike Reed <reed@google.com>
> > Commit-Queue: Florin Malita <fmalita@chromium.org>
> > 
> 
> TBR=fmalita@chromium.org,reed@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> 
> Change-Id: I4387620cdc3410018af9cef221e5cf8d09015380
> Reviewed-on: https://skia-review.googlesource.com/14955
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> Commit-Queue: Mike Klein <mtklein@chromium.org>
> 

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

Change-Id: I6dde9e0441928f7a7423139a5c39f520f892f4b5
Reviewed-on: https://skia-review.googlesource.com/14958
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-05-01 21:36:43 +00:00
Mike Klein
3354969a4a Revert "SaveLayerRec::fClipMask -> raw pointer"
This reverts commit a6b72cb572.

Reason for revert: red bots

Original change's description:
> SaveLayerRec::fClipMask -> raw pointer
> 
> Use raw pointers for optional clip mask plumbing, to match the backdrop
> API.
> 
> Change-Id: I7eb0ee5896faf34cc05789ba0703f35a4ab6a4f2
> Reviewed-on: https://skia-review.googlesource.com/14901
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Florin Malita <fmalita@chromium.org>
> 

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

Change-Id: I4387620cdc3410018af9cef221e5cf8d09015380
Reviewed-on: https://skia-review.googlesource.com/14955
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-05-01 21:31:40 +00:00
Florin Malita
a6b72cb572 SaveLayerRec::fClipMask -> raw pointer
Use raw pointers for optional clip mask plumbing, to match the backdrop
API.

Change-Id: I7eb0ee5896faf34cc05789ba0703f35a4ab6a4f2
Reviewed-on: https://skia-review.googlesource.com/14901
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2017-05-01 21:26:01 +00:00
bungeman
7575bb1c38 SkFontMgr::matchFamily should not crash on nullptr.
While all systems can resolve a font from just a style request
(without a name) almost no systems specify a default font family.

BUG=skia:6574

Change-Id: If7c81808b62cd5d8212bce2eb4d9c476c45af80a
Reviewed-on: https://skia-review.googlesource.com/14902
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2017-05-01 18:13:02 +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
Florin Malita
53f77bd4fd Initial clip-mask-layer support
SkBitmapDevice-only implementation.

Will add A8 fast path specializations in a follow-up.

Change-Id: I2ccb1ffba3689e92ac90a23e94737471dfb121a1
BUG=skia:6005

Change-Id: I2ccb1ffba3689e92ac90a23e94737471dfb121a1
Reviewed-on: https://skia-review.googlesource.com/14183
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2017-05-01 14:07:10 +00:00
Florin Malita
135c908812 Remove temporary_internal_describeTopLayer
Change-Id: I035b7db84b524be13fb675b75bc402bc9b733cb5
Reviewed-on: https://skia-review.googlesource.com/13803
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2017-04-28 20:44:44 +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
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
Ethan Nicholas
fe53e5828f additional skslc vector optimizations
Bug: skia:
Change-Id: I845d0952c281835a630882ae4026277c93ccf542
Reviewed-on: https://skia-review.googlesource.com/14406
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
2017-04-28 15:02:23 +00:00
Robert Phillips
cd901046ea Disable deferred proxies in Chrome
We will re-enable once the proxy instantiation is moved past the TextureSamplers

Bug: 715488
Change-Id: I4f0dee18fc191d7fffb6a2f4fedd825729ebb057
Reviewed-on: https://skia-review.googlesource.com/14520
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-04-27 21:26:29 +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
Brian Osman
b8a1392b02 Fix uncached getROPixels from GPU images
We were allocating a local bitmap, but then attempting to read into an
uninitialized local pixmap. The only public API that funnels the caching
hint to this function is scalePixels, so I added a test (which previously
failed).

Bug: skia:
Change-Id: Ib4370350be664935b4c85e34c70b675e6d82ba64
Reviewed-on: https://skia-review.googlesource.com/14402
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-04-26 20:59:10 +00:00
Matt Sarett
d59948a171 SkPngCodec: Do not return kInvalidConversion on corrupt png
In this case, the fuzzer thinks there is a bug because we are
returning kInvalidConversion for a corrupt png file.

Bug: skia:6550
Change-Id: I33f588442f5eaa8a4d642e9328750779f9a9ef5d
Reviewed-on: https://skia-review.googlesource.com/14324
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2017-04-26 17:43:38 +00:00
Ethan Nicholas
c81d22f337 broke up SkSLConstantFolding test
Bug: skia:
Change-Id: I496a6d1c82b4d3b6fdb34671de373c34abe90018
Reviewed-on: https://skia-review.googlesource.com/14321
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
2017-04-26 15:52:49 +00:00
Mike Klein
c7be00366b remove to_2dot2 and from_2dot2
The parametric_{r,g,b} stages are just as good now;
under the hood it's all going through approx_powf.

Change-Id: If7f3ae1e24fcee2ddb201c1d66ce1dd64820c89a
Reviewed-on: https://skia-review.googlesource.com/14320
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-04-26 14:38:25 +00:00
Robert Phillips
78de212909 Prevent creation of zero-sized proxies
This wasn't seen locally b.c. it is an assert and I only ran release locally and the CQ also only runs release.

I have added linux_trusty_blink_dbg as a try job.

TBR=bsalomon@google.com
Bug: 715392
Change-Id: I010626cb97e886d2fbfd767f948bc640f0534338
Reviewed-on: https://skia-review.googlesource.com/14361
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-04-26 12:19:31 +00:00
Ethan Nicholas
3deaeb2dc0 sksl can now fold constant vector or matrix equality expressions
Bug: skia:
Change-Id: Icaddae68e53ed3629bcdc04b5f0b541d9e4398e2
Reviewed-on: https://skia-review.googlesource.com/14260
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
2017-04-25 19:39:13 +00:00
Brian Osman
7ab6a7f40b Fix writePixels of sRGB data to legacy GPU surface
Adjusted unit test to verify this behavior.

Bug: skia:6547 chromium:713632 chromium:713702
Change-Id: I6240937b2faf6ccb6adfc9477dc85ae961cdbbb7
Reviewed-on: https://skia-review.googlesource.com/14279
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-04-25 19:28:07 +00:00
Hal Canary
a294be2404 SkDiscardableMemoryPool: modernize
* Use unique_ptr, sk_sp, SkAutoFree, using.
  * Rely on thread-safe static global initializion.

Change-Id: I7c14e0e57622163b1b81b97a218b816fe6d02926
Reviewed-on: https://skia-review.googlesource.com/13818
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2017-04-25 13:12:54 +00:00
Leon Scroggins III
600effbdc7 Improve the Codec_end test and add fixes
Better imitate the original Android bug. Create a stream with
multiple images in it, and verify that it successfully decodes after
decoding once.

This exposes a bug in SkPngCodec, which did not work for interlaced
images.

Test more formats that also happen to succeed: ICO, BMP, and WBMP

This explicitly does *not* attempt to fix sampled or subset
decodes, which already stopped early when decoding as an
optimization.

Change-Id: Ib0b8918f14ba3fb0fa31e9c71c8100dcbeeb465f
Reviewed-on: https://skia-review.googlesource.com/14104
Reviewed-by: Matt Sarett <msarett@google.com>
2017-04-25 11:45:15 +00:00