Commit Graph

8440 Commits

Author SHA1 Message Date
Ben Wagner
cd224b17e8 Revert "SkRefCnt, SkTypes: fix includes for clients"
This reverts commit 61582510ee.

Reason for revert: Chromium should now be fixed.

Original change's description:
> SkRefCnt, SkTypes: fix includes for clients
>
> Change-Id: I1cfdc03963eaab9687608974958d20411806cfeb
> Reviewed-on: https://skia-review.googlesource.com/136592
> Commit-Queue: Hal Canary <halcanary@google.com>
> Reviewed-by: Hal Canary <halcanary@google.com>

TBR=halcanary@google.com

Change-Id: I1a3588ed9e19ee5884f8a907abcfc2aa00cfe5e9
Reviewed-on: https://skia-review.googlesource.com/136700
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2018-06-21 20:06:19 +00:00
Cary Clark
a6c75fda12 make includes available for flutter
temporarily copy SkBase64.h until flutter can
move to using the one in include/util

Copy TRACE_EVENT_PHASE_* into its own file
in include/util; the only part of SkTraceEventCommon.h
that flutter needs.

R=reed@google.com,chinmaygarde@google.com

Bug: skia:7741
Change-Id: I8671edbf1d6b6b868bde98aa9ad04abcb85a43a0
Reviewed-on: https://skia-review.googlesource.com/135870
Reviewed-by: Chinmay Garde <chinmaygarde@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Cary Clark <caryclark@skia.org>
2018-06-21 18:12:47 +00:00
Cary Clark
472ab81032 abort really big path fuzzing
This adds a couple of special cases
to stop the fuzzer from timing out.

The first occurs when the fuzzer generates
a very large path with very large quads.
Count the subdivisions and stop after a while.

The second occurs with a normal path and
1D path effect with a very small advance.
Count the points and stop after a while.

R=reed@google.com,bsalomon@google.com,kjlubick@google.com
Bug: oss-fuzz:8349,oss-fuzz:8805
Change-Id: I86130e3f512f48e5a39335412435eabc245ed193
Reviewed-on: https://skia-review.googlesource.com/135709
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Cary Clark <caryclark@skia.org>
2018-06-21 16:42:37 +00:00
Hal Canary
51382998dc Mark all deleted methods private
Change-Id: I33f51efeaeabcdd7add2a88d89ecc9c1e8c054d7
Reviewed-on: https://skia-review.googlesource.com/135380
Auto-Submit: Hal Canary <halcanary@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
2018-06-21 16:37:32 +00:00
Hal Canary
61582510ee SkRefCnt, SkTypes: fix includes for clients
Change-Id: I1cfdc03963eaab9687608974958d20411806cfeb
Reviewed-on: https://skia-review.googlesource.com/136592
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
2018-06-21 14:42:31 +00:00
Ben Wagner
c2a29fcc78 Remove utility include from SkTypes.h
No longer needed by SkTypes.

Change-Id: I7af305cea2d2a5989992b5ffe76dabae85b18fe9
Reviewed-on: https://skia-review.googlesource.com/136246
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2018-06-20 21:44:57 +00:00
Hal Canary
224796587a SkRefCnt.h no longer uses SkTLogic.h
Change-Id: Iaeb886c1c80ea1603dc86ed40c8cfffec333b456
Reviewed-on: https://skia-review.googlesource.com/136244
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-06-20 21:22:57 +00:00
Ben Wagner
b70e3b4831 Remove SkTSwap.
No longer used. Use swappable instead.

Change-Id: I76935f33ac084dbe067c34de7fb332e51a063cb6
Reviewed-on: https://skia-review.googlesource.com/136221
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2018-06-20 18:19:17 +00:00
Hal Canary
c36f7e735f SkTypes.h: general cleanup
- SkToBool now inline function.
 - SK_Invalid{Gen|Unique}ID, SK_MSecMax now constexpr.
 - SkNoncopyable deleted methods marked private.
 - Consistant comment style.

Change-Id: I1af6889fdf4274d6d698e8f11b29075dbe39ba12
Reviewed-on: https://skia-review.googlesource.com/135446
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-06-20 15:20:11 +00:00
Hal Canary
e2098c4936 SkFontMgr.h is a core header.
Change-Id: Idad3c8b6961bb617afedb8e353060b9044edaee3
Reviewed-on: https://skia-review.googlesource.com/136066
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
2018-06-20 14:46:28 +00:00
Mike Reed
846bb413e1 iwyu
Bug: skia:
Change-Id: Ie061614626d1cea13a26f1974f35f931cc8eef6d
Reviewed-on: https://skia-review.googlesource.com/135962
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-06-19 22:28:18 +00:00
Brian Salomon
0560bd612b Move GrSwizzle.h from include/private to src/gpu.
Change-Id: I2d992404f540c7f8a1cd5ff633148d92ec50d4fa
Reviewed-on: https://skia-review.googlesource.com/135860
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
2018-06-19 21:44:28 +00:00
Brian Salomon
23c55b6b18 Move GrGLSL.h from include/private to src/gpu/glsl.
Nothing public was including this and it was included unnecessarily in many places.

Change-Id: Iee960b3e67981ab41af7442cc43391f2f57eb551
Reviewed-on: https://skia-review.googlesource.com/135787
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-06-19 21:23:18 +00:00
Mike Reed
0917fad2c6 move imagefilters into separate dir and flag for build.gn
Requires https://chromium-review.googlesource.com/c/chromium/src/+/1105062

Bug: skia:
Change-Id: I948056234efa57c0f727a61d5fb3258034de5199
Reviewed-on: https://skia-review.googlesource.com/135566
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-06-19 20:16:38 +00:00
Brian Salomon
92be2f74db Revert "Revert "Change how vertex/instance attributes are handled in geometry processors.""
This reverts commit 5045e501d2.

TBR=csmartdalton@google.com

Change-Id: Ifbf5f1d8f8ef340fdc69653e931b6d68d4bf0854
Reviewed-on: https://skia-review.googlesource.com/135862
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-06-19 20:01:29 +00:00
Robert Phillips
c994a93b32 Move op memory storage to GrContext (take 2)
TBR=bsalomon@google.com

Change-Id: I4a448694d4114d83cd3a720cfc8bd37de51733d1
Reviewed-on: https://skia-review.googlesource.com/135707
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-06-19 19:51:20 +00:00
ziadb
bceddbcb72 SkAR: drawing text, shapes, rotation modes enabled, translating objects
To run this app, you need to create an out directory as such:
bin/gn gen out/arm64 --args='ndk="NDK_PATH" target_cpu="ABI"'

For now, the only supported ABI is arm64

Change-Id: I012f0c6a0550d80a0028f42177d5ca72974d848d
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/130980
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ziad Ben Hadj-Alouane <ziadb@google.com>
2018-06-19 19:10:54 +00:00
Kevin Lubick
f203078309 Revert "added GrSkSLFP and converted DitherEffect to use it"
This reverts commit dfbfc738a9.

Reason for revert: Seems to be breaking DDL/ASAN bots

Original change's description:
> added GrSkSLFP and converted DitherEffect to use it
>
> Bug: skia:
> Change-Id: I84b71165eab1712355f3c7669cee2d33d259f3df
> Reviewed-on: https://skia-review.googlesource.com/124504
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

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

Change-Id: Ic4c3978aaba0391f2f8bb1316a456e3821a3a2f2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/135700
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2018-06-19 12:23:21 +00:00
Ben Wagner
f08d1d0ce1 Stop using SkTSwap.
Use std::swap instead. It does not appear that any external user
specializes SkTSwap, but some may still use it. This removes all use in
Skia so that SkTSwap can later be removed in a smaller CL. After that
the <utility> include can be removed from SkTypes.h.

Change-Id: If03d4ee07dbecda961aa9f0dc34d171ef5168753
Reviewed-on: https://skia-review.googlesource.com/135578
Reviewed-by: Hal Canary <halcanary@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2018-06-19 02:06:31 +00:00
Mike Klein
5045e501d2 Revert "Change how vertex/instance attributes are handled in geometry processors."
This reverts commit 19c1233c44.

Reason for revert: want to make sure Google3 can roll

Original change's description:
> Change how vertex/instance attributes are handled in geometry processors.
> 
> * No longer register vertex/instance attributes on base class, just counts
> 
> * Separate instance and vertex attributes and remove InputRate and offset
> 
> * Make attributes constexpr where possible
> 
> Change-Id: I1f1d5e772fa177a96d2aeb805aab7b69f35bfae6
> Reviewed-on: https://skia-review.googlesource.com/132405
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Chris Dalton <csmartdalton@google.com>

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

Change-Id: I4800632515e14fbf54af52826928ac915657b59f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/135661
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-06-19 01:41:10 +00:00
Ethan Nicholas
dfbfc738a9 added GrSkSLFP and converted DitherEffect to use it
Bug: skia:
Change-Id: I84b71165eab1712355f3c7669cee2d33d259f3df
Reviewed-on: https://skia-review.googlesource.com/124504
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-06-18 18:40:58 +00:00
Mike Klein
e72e773ad0 remove SkTCast
SkTCast is functionally equivalent to reinterpret_cast.

The comment about SkTCast helping to avoid strict alising issues is not
true.  Dereferencing a pointer cast to a pointer of an unrelated type is
always undefined, even if smuggled through a union like in SkTCast.

To really avoid aliasing issues, you need to make a union[1] of the two
value types, or better, memcpy between values.  I've had to fix
MatrixText.cpp where switching to reinterpret_cast actually let Clang
notice and warn that we're exploiting undefined behavior, and
GrSwizzle.h and SkCamera.cpp caught by GCC.

I've switched SkTLList over to use SkAlignedSTStorage, which seems
to help convince some GCC versions that fObj is used in a sound way.

[1] The union punning trick is non-standard in C++, but GCC and MSVC
both explicitly support it.  I believe Clang does not officially
explicitly support it, but probably does quietly for GCC compatibility.

Change-Id: I71822e82c962f9aaac8be24d3c0f39f4f8b05026
Reviewed-on: https://skia-review.googlesource.com/134947
Commit-Queue: Mike Klein <mtklein@chromium.org>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Mike Klein <mtklein@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-06-18 17:22:18 +00:00
Brian Salomon
19c1233c44 Change how vertex/instance attributes are handled in geometry processors.
* No longer register vertex/instance attributes on base class, just counts

* Separate instance and vertex attributes and remove InputRate and offset

* Make attributes constexpr where possible

Change-Id: I1f1d5e772fa177a96d2aeb805aab7b69f35bfae6
Reviewed-on: https://skia-review.googlesource.com/132405
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
2018-06-18 17:13:58 +00:00
Chris Dalton
4c458b12f6 ccpr: Use lazy proxies with GrCCAtlas
Bug: skia:
Change-Id: I576d9303d451352778de0425e3ecbc561331cd09
Reviewed-on: https://skia-review.googlesource.com/135362
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2018-06-18 15:32:48 +00:00
Ben Wagner
29f2eaf6e5 Remove string.h from SkTypes.h
Change-Id: I2be84f37ea11a386206a96d2fef6e0fc9464e21b
Reviewed-on: https://skia-review.googlesource.com/135264
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2018-06-15 20:32:05 +00:00
Ben Wagner
b0897650f1 Reland "Remove SK_MaxSizeT, SK_M{in|ax}U{16|32}, #defines."
This reverts commit ab17347df3.

Reason for revert: Chromium should now be ok.

Original change's description:
> Revert "Remove SK_MaxSizeT, SK_M{in|ax}U{16|32}, #defines."
>
> This reverts commit e1bc7de7c0.
>
> Reason for revert: chrome used it
>
> Original change's description:
> > Remove SK_MaxSizeT, SK_M{in|ax}U{16|32}, #defines.
> >
> > sed 's/SK_MaxSizeT/SIZE_MAX/g'
> > sed 's/SK_MaxU32/UINT32_MAX/g'
> > sed 's/SK_MaxU16/UINT16_MAX/g'
> >
> > SK_MinU32 and SK_MinU16 were unused
> >
> > Change-Id: I6b6c824df47b05bde7e73b13a58e851a5f63fe0e
> > Reviewed-on: https://skia-review.googlesource.com/134607
> > Commit-Queue: Hal Canary <halcanary@google.com>
> > Reviewed-by: Ben Wagner <bungeman@google.com>
>
> TBR=halcanary@google.com,bungeman@google.com,reed@google.com
>
> Change-Id: I1e2c440dcf9f59bf87c1fea113248cd5136f7519
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/134921
> Reviewed-by: Hal Canary <halcanary@google.com>
> Commit-Queue: Hal Canary <halcanary@google.com>

CQ_INCLUDE_TRYBOTS=luci.chromium.try:linux-ozone-rel
TBR=halcanary@google.com,bungeman@google.com,reed@google.com

Change-Id: I7709f9715bea0463b85b5b0a89712ac1020fcddb
Reviewed-on: https://skia-review.googlesource.com/135180
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2018-06-15 16:26:05 +00:00
Robert Phillips
4f6ba2e522 Revert "Move op memory storage to GrContext"
This reverts commit c8cee446bf.

Reason for revert: TSAN issues

Original change's description:
> Move op memory storage to GrContext
> 
> TBR=bsalomon@google.com
> Change-Id: Ifa95bf0073b9d948f2c937d10088b7734b971f90
> Reviewed-on: https://skia-review.googlesource.com/131500
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

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

Change-Id: Ia0d2b7408314d9b67d57388315376bbea23d3780
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/135181
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-06-15 15:59:45 +00:00
Greg Daniel
0e4a12b525 Don't explicitly include vulkan.h in the vulkan memory allocator.
Bug: skia:
Change-Id: I57dc374822fd22e25ef22d03345bdd2e159c7edd
Reviewed-on: https://skia-review.googlesource.com/135048
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-06-15 13:17:14 +00:00
Robert Phillips
c8cee446bf Move op memory storage to GrContext
TBR=bsalomon@google.com
Change-Id: Ifa95bf0073b9d948f2c937d10088b7734b971f90
Reviewed-on: https://skia-review.googlesource.com/131500
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-06-15 11:33:14 +00:00
Cary Clark
b7a72a5017 fix bookmaker
make deleted constructors private
fix indexing bug that finds private methods

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

Bug: skia:6898
Change-Id: I86c0bafbb7c56131c503054e021ec844731c900d
Reviewed-on: https://skia-review.googlesource.com/135058
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2018-06-15 09:42:24 +00:00
Hal Canary
725d5ad257 SkTHashTable no longer uses SkNoncopy
Change-Id: I0944195d3087c97353994ff219f77464d94f1ba8
Reviewed-on: https://skia-review.googlesource.com/135045
Commit-Queue: Hal Canary <halcanary@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-06-14 20:30:24 +00:00
Hal Canary
0acb79eb2a SkTemplates no longer uses Sknoncopyable
Change-Id: I142ff4f6b05e633b92d982f3c39a0e58617c1c0e
Reviewed-on: https://skia-review.googlesource.com/135040
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-06-14 19:50:44 +00:00
Hal Canary
14f739043b SkCanvas, SkImageGenerator, SkStream: remove SkNoncopyable
Change-Id: If2b27f62c3d825b388239ef6ee35722d46eed664
Reviewed-on: https://skia-review.googlesource.com/134949
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-06-14 19:33:04 +00:00
Hal Canary
e08ce40f4a SkRefCnt no longer a SkNoncopyable
Change-Id: I345c83783c578f5ce25b4fc46c971c055e113cd0
Reviewed-on: https://skia-review.googlesource.com/134945
Auto-Submit: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-06-14 19:14:04 +00:00
Hal Canary
33f920e3f1 SkImageInfo: make use of SkISize
Change-Id: Id3c427cae2988dcc2dfcf4dc713921142469e3f6
Reviewed-on: https://skia-review.googlesource.com/134840
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-06-14 18:04:17 +00:00
Cary Clark
ca6a2454b8 refresh generated includes
Found some bookmaker bugs that were suppressing
spelling errors and syntax errors.

TBR=reed@google.com

Bug: skia:6898
Change-Id: Ie7331dd03723d987cb2df46018a984f42d0ee518
Reviewed-on: https://skia-review.googlesource.com/134942
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
2018-06-14 18:02:37 +00:00
Chris Dalton
9414c96781 ccpr: Generalize GrCCAtlas to work for cached atlases as well
Converts atlas offsets to SkIVector, adds a GrCCAtlasStack class,
moves the Op that renders the atlases into GrCCPerFlushResources, etc.

Bug: skia:
Change-Id: I5110be8e74da709f3ce84bb6798ead572142d0fa
Reviewed-on: https://skia-review.googlesource.com/134701
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-06-14 17:21:47 +00:00
Hal Canary
ab17347df3 Revert "Remove SK_MaxSizeT, SK_M{in|ax}U{16|32}, #defines."
This reverts commit e1bc7de7c0.

Reason for revert: chrome used it

Original change's description:
> Remove SK_MaxSizeT, SK_M{in|ax}U{16|32}, #defines.
> 
> sed 's/SK_MaxSizeT/SIZE_MAX/g'
> sed 's/SK_MaxU32/UINT32_MAX/g'
> sed 's/SK_MaxU16/UINT16_MAX/g'
> 
> SK_MinU32 and SK_MinU16 were unused
> 
> Change-Id: I6b6c824df47b05bde7e73b13a58e851a5f63fe0e
> Reviewed-on: https://skia-review.googlesource.com/134607
> Commit-Queue: Hal Canary <halcanary@google.com>
> Reviewed-by: Ben Wagner <bungeman@google.com>

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

Change-Id: I1e2c440dcf9f59bf87c1fea113248cd5136f7519
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/134921
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-06-14 16:17:38 +00:00
Hal Canary
c640d0dc96 Revert "Revert "SkTypes: extract SkTo""
This reverts commit fdcfb8b7c2.

> Original change's description:
> > SkTypes: extract SkTo
> >
> > Change-Id: I8de790d5013db2105ad885fa2683303d7c250b09
> > Reviewed-on: https://skia-review.googlesource.com/133620
> > Reviewed-by: Mike Klein <mtklein@google.com>

Change-Id: Ida74fbc5c21248a724a5edbf9fae18a33bcb23aa
Reviewed-on: https://skia-review.googlesource.com/134506
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-06-14 14:55:17 +00:00
Mike Klein
4d4665436e Reland "use std::enable_if instead of assert()"
This is a reland of c6530d1e5e

Original change's description:
> use std::enable_if instead of assert()
> 
> Crazy?  Genius?
> 
> Change-Id: I6033ab5f1af1a6bee84c27025b988e1143d59293
> Reviewed-on: https://skia-review.googlesource.com/134512
> Commit-Queue: Mike Klein <mtklein@chromium.org>
> Commit-Queue: Ben Wagner <bungeman@google.com>
> Auto-Submit: Mike Klein <mtklein@chromium.org>
> Reviewed-by: Ben Wagner <bungeman@google.com>

Change-Id: I50849c89a37255396706ce659e20f00c0b0f08c6
Reviewed-on: https://skia-review.googlesource.com/134860
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-06-14 14:51:07 +00:00
Hal Canary
bf54a76f0f SkImageInfo: MakeN32*() avoids extra ref/deref
Change-Id: I8d5c07222bd1cd1bea4fc0060d07a29786f8e254
Reviewed-on: https://skia-review.googlesource.com/134784
Commit-Queue: Hal Canary <halcanary@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-06-14 14:15:07 +00:00
Hal Canary
e1bc7de7c0 Remove SK_MaxSizeT, SK_M{in|ax}U{16|32}, #defines.
sed 's/SK_MaxSizeT/SIZE_MAX/g'
sed 's/SK_MaxU32/UINT32_MAX/g'
sed 's/SK_MaxU16/UINT16_MAX/g'

SK_MinU32 and SK_MinU16 were unused

Change-Id: I6b6c824df47b05bde7e73b13a58e851a5f63fe0e
Reviewed-on: https://skia-review.googlesource.com/134607
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2018-06-14 14:10:47 +00:00
Mike Klein
b6b5b7a808 Reland "simplify SkTFitsIn, try 2"
This is a reland of 009f51e43f

Original change's description:
> simplify SkTFitsIn, try 2
> 
> Originally we wrote this in C++14 constexpr,
> but because this is used from public headers, we can't use
> C++14 yet.  Now a somewhat sillier looking C++11 version.
> 
> All the old tests still pass, and one new added.
> Updated the comments a bit for correctness and readability.
> 
> Change-Id: I99c01e1346c1a5a36278cc08f30538112e5259aa
> Reviewed-on: https://skia-review.googlesource.com/134425
> Commit-Queue: Mike Klein <mtklein@chromium.org>
> Commit-Queue: Ben Wagner <bungeman@google.com>
> Auto-Submit: Mike Klein <mtklein@chromium.org>
> Reviewed-by: Ben Wagner <bungeman@google.com>

Change-Id: I99676faac6153830538c1396a325ca1456dfb126
Reviewed-on: https://skia-review.googlesource.com/134800
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-06-14 14:05:27 +00:00
Greg Daniel
10a83da287 Add GrContext::MakeVulkan factory that doesn't take a ref'd GrVkBackendContext.
This is the first step towards removing the ref counted ness of GrVkBackendContext.

Bug: skia:
Change-Id: I38f8861dd093a6a6098dd2e421c26c41185320f7
Reviewed-on: https://skia-review.googlesource.com/134783
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-06-14 13:54:47 +00:00
Brian Osman
f018b7d607 SkColorSpaceXformSteps improvements and tests
Added some helper functions and put the booleans in a nested struct
(this is motivated by upcoming changes). Added a unit test of steps
against skcms, with round-tripping in both combinations.

Change-Id: Iea3d60cd52edb5259b5576b1422ed6f856cde815
Reviewed-on: https://skia-review.googlesource.com/134660
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-06-14 11:30:47 +00:00
Ben Wagner
657edbede4 Remove SkBool8 (again).
Just when I thought it was out... they pull it back in.

Change-Id: I93781d306e94407ed71e782e7879469f69492bd4
Reviewed-on: https://skia-review.googlesource.com/134661
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Auto-Submit: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-06-13 22:49:46 +00:00
Chris Dalton
42c2115fc3 ccpr: Initialize the atlas size more intelligently
Rather than always starting the atlas at 1024 x 1024, begin with the
first pow2 dimensions whose area is theoretically large enough to
contain the pending paths.

Bug: skia:
Change-Id: I263e77ff6a697e865f6b3b62b9df7002225f9544
Reviewed-on: https://skia-review.googlesource.com/133660
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-06-13 21:53:36 +00:00
Ben Wagner
761df7534f Remove SkString fwd decl from SkTypes.h.
Remaining users depending on this seem to be cleaned up, so remove this.

Change-Id: I26003831f1c84b0caf9379cbd0952833640db432
Reviewed-on: https://skia-review.googlesource.com/134602
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2018-06-13 19:14:16 +00:00
Mike Klein
e4b900bfd9 Revert "simplify SkTFitsIn, try 2"
This reverts commit 009f51e43f.

Reason for revert: unintentional header consequences in Chromium... will reland after fixing Chromium

Original change's description:
> simplify SkTFitsIn, try 2
> 
> Originally we wrote this in C++14 constexpr,
> but because this is used from public headers, we can't use
> C++14 yet.  Now a somewhat sillier looking C++11 version.
> 
> All the old tests still pass, and one new added.
> Updated the comments a bit for correctness and readability.
> 
> Change-Id: I99c01e1346c1a5a36278cc08f30538112e5259aa
> Reviewed-on: https://skia-review.googlesource.com/134425
> Commit-Queue: Mike Klein <mtklein@chromium.org>
> Commit-Queue: Ben Wagner <bungeman@google.com>
> Auto-Submit: Mike Klein <mtklein@chromium.org>
> Reviewed-by: Ben Wagner <bungeman@google.com>

TBR=mtklein@chromium.org,bungeman@google.com

Change-Id: Ic73f8800bd022ffea125b3b1bf138fe49c0db926
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/134621
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-06-13 18:57:06 +00:00
Mike Klein
a2bf58515a Revert "use std::enable_if instead of assert()"
This reverts commit c6530d1e5e.

Reason for revert: going to revert SkTFitsIn refactor temporarily

Original change's description:
> use std::enable_if instead of assert()
> 
> Crazy?  Genius?
> 
> Change-Id: I6033ab5f1af1a6bee84c27025b988e1143d59293
> Reviewed-on: https://skia-review.googlesource.com/134512
> Commit-Queue: Mike Klein <mtklein@chromium.org>
> Commit-Queue: Ben Wagner <bungeman@google.com>
> Auto-Submit: Mike Klein <mtklein@chromium.org>
> Reviewed-by: Ben Wagner <bungeman@google.com>

TBR=mtklein@chromium.org,bungeman@google.com

Change-Id: Id7c91e3a12756defe194379579cc5fd88fd4b164
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/134620
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-06-13 18:56:07 +00:00