Commit Graph

1735 Commits

Author SHA1 Message Date
bsalomon
6e2aad4e9f Add GrContext::releaseAndAbandonContext()
Like abandonContext() this disconnects the GrContext from the underlying 3D API. However, unlike abandonContext it first frees all allocated GPU resources.

BUG=skia:5142
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1852733002

Review URL: https://codereview.chromium.org/1852733002
2016-04-01 11:54:31 -07:00
bsalomon
062bd86033 Expose GrGLAssembleInterface
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1842363003

Review URL: https://codereview.chromium.org/1842363003
2016-03-31 10:22:20 -07:00
bsalomon
3724e574a7 Move SkGLContext and some GrGLInterface implementations to skgputest module
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1815823002
CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot

Committed: https://skia.googlesource.com/skia/+/fe3456cb006110d045b26ff3f8681b893a757b58

Review URL: https://codereview.chromium.org/1815823002
2016-03-30 18:56:20 -07:00
robertphillips
6f70d43719 Revert of Move SkGLContext and some GrGLInterface implementations to skgputest module (patchset #13 id:240001 of https://codereview.chromium.org/1815823002/ )
Reason for revert:
red bots

Original issue's description:
> Move SkGLContext and some GrGLInterface implementations to skgputest module
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1815823002
> CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot
>
> Committed: https://skia.googlesource.com/skia/+/fe3456cb006110d045b26ff3f8681b893a757b58

TBR=jvanverth@google.com,bsalomon@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1845473004
2016-03-30 09:26:24 -07:00
bsalomon
fe3456cb00 Move SkGLContext and some GrGLInterface implementations to skgputest module
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1815823002
CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot

Review URL: https://codereview.chromium.org/1815823002
2016-03-30 08:35:09 -07:00
bsalomon
dec294375a Remove the GrGLInterface callback mechanism.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1836013002

Review URL: https://codereview.chromium.org/1836013002
2016-03-28 12:25:09 -07:00
jvanverth
e50f3e7539 Add WSI functions to GrVkInterface
BUG=skia:5043
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1834903003

Review URL: https://codereview.chromium.org/1834903003
2016-03-28 07:03:06 -07:00
cdalton
397536cabe Consolidate GPU buffer implementations
Consolidates all the different buffer implementations into a single
GrBuffer class. This will allow us to add new buffer types, use DSA in
OpenGL, track buffer bindings by unique ID, cache buffers without
respect to the type of data they have been used for previously, etc.
This change is strictly a refactor; it introduces no change in
functionality.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1825393002

Committed: https://skia.googlesource.com/skia/+/8b1bff29675afd25843439eade634a57f68fe16f

Review URL: https://codereview.chromium.org/1825393002
2016-03-25 12:15:03 -07:00
ethannicholas
28ef445d2e added support for glMinSampleShading
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1812223002

Review URL: https://codereview.chromium.org/1812223002
2016-03-25 09:26:03 -07:00
jvanverth
fd7bd45ac2 Revise layer, extension and feature setup for Vulkan
Moves all the extension setup logic into GrVkBackendContext, and
pass extension and feature information to Skia via flags. Also adds
version information to GrVkBackendContext.

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1832613003
TBR=bsalomon@google.com

Review URL: https://codereview.chromium.org/1832613003
2016-03-25 06:29:52 -07:00
brianosman
64d094d775 Require sRGB write control for sRGB support. Add flag to GrPaint to suppress linear -> sRGB conversion on write. Use that to fix YUV conversion, which directly produces sRGB data. (Technically, it produces data in whatever the color space of the JPEG might be).
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1830303002

Review URL: https://codereview.chromium.org/1830303002
2016-03-25 06:01:59 -07:00
robertphillips
f8c3ba40cf Revert of Consolidate GPU buffer implementations (patchset #10 id:180001 of https://codereview.chromium.org/1825393002/ )
Reason for revert:
Lots of Android redness

Original issue's description:
> Consolidate GPU buffer implementations
>
> Consolidates all the different buffer implementations into a single
> GrBuffer class. This will allow us to add new buffer types, use DSA in
> OpenGL, track buffer bindings by unique ID, cache buffers without
> respect to the type of data they have been used for previously, etc.
> This change is strictly a refactor; it introduces no change in
> functionality.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1825393002
>
> Committed: https://skia.googlesource.com/skia/+/8b1bff29675afd25843439eade634a57f68fe16f

TBR=bsalomon@google.com,egdaniel@google.com,jvanverth@google.com,cdalton@nvidia.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1831133004
2016-03-25 04:55:59 -07:00
cdalton
8b1bff2967 Consolidate GPU buffer implementations
Consolidates all the different buffer implementations into a single
GrBuffer class. This will allow us to add new buffer types, use DSA in
OpenGL, track buffer bindings by unique ID, cache buffers without
respect to the type of data they have been used for previously, etc.
This change is strictly a refactor; it introduces no change in
functionality.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1825393002

Review URL: https://codereview.chromium.org/1825393002
2016-03-25 01:54:55 -07:00
jvanverth
633b35657c GrVkGpu initialization cleanup.
Add GrVkBackendContext for GrVkGpu initialization
Add missing extension initialization
Use device function pointers rather than instance

BUG=skia:5116
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1825593002

Review URL: https://codereview.chromium.org/1825593002
2016-03-23 11:01:22 -07:00
bsalomon
7dbd45d2c7 Make max number of vertex attributes be checked dynamically
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1822343002

Review URL: https://codereview.chromium.org/1822343002
2016-03-23 10:40:53 -07:00
brianosman
a635936588 sRGB support in Ganesh. Several pieces:
sRGB support now also requires GL_EXT_texture_sRGB_decode, which allows
us to disable sRGB -> Linear conversion when reading textures. This gives
us an easy way to support "legacy" L32 mode. We disable decoding based on
the pixel config of the render target. Textures can override that behavior
(specifically for format-conversion draws where we want that behavior).

Added sBGRA pixel config, which is not-really-a-format. It's just sRGBA
internally, and the external format is BGR order, so TexImage calls will
swizzle correctly. This lets us interact with sRGB raster surfaces on BGR
platforms.

Devices without sRGB support behave like they always have: conversion from
color type and profile type ignores sRGB and always returns linear pixel
configs.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1789663002

Review URL: https://codereview.chromium.org/1789663002
2016-03-21 06:55:37 -07:00
jvanverth
d2497f35ce Enable extension support and debug layer.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1785813002
TBR=bsalomon@google.com

Review URL: https://codereview.chromium.org/1785813002
2016-03-18 12:39:05 -07:00
bsalomon
b5a94e3e24 Store null GL context's state in interface object
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1814113002

Review URL: https://codereview.chromium.org/1814113002
2016-03-18 12:07:24 -07:00
jvanverth
fd359caf0c Implement Vulkan GrBackendObject for textures.
BUG=skia:5043
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1808263002

Review URL: https://codereview.chromium.org/1808263002
2016-03-18 11:57:24 -07:00
brianosman
c571c001ce Revert of sRGB support in Ganesh. Several pieces: (patchset #12 id:220001 of https://codereview.chromium.org/1789663002/ )
Reason for revert:
We're getting sRGB non-8888 configs?

Original issue's description:
> sRGB support in Ganesh. Several pieces:
>
> sRGB support now also requires GL_EXT_texture_sRGB_decode, which allows
> us to disable sRGB -> Linear conversion when reading textures. This gives
> us an easy way to support "legacy" L32 mode. We disable decoding based on
> the pixel config of the render target. Textures can override that behavior
> (specifically for format-conversion draws where we want that behavior).
>
> Added sBGRA pixel config, which is not-really-a-format. It's just sRGBA
> internally, and the external format is BGR order, so TexImage calls will
> swizzle correctly. This lets us interact with sRGB raster surfaces on BGR
> platforms.
>
> Devices without sRGB support behave like they always have: conversion from
> color type and profile type ignores sRGB and always returns linear pixel
> configs.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1789663002
>
> Committed: https://skia.googlesource.com/skia/+/9e3f1bf4e5cd8fc59554f986f36d6b034e99f9eb

TBR=reed@google.com,bsalomon@google.com,robertphillips@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1814533003
2016-03-17 13:01:26 -07:00
brianosman
9e3f1bf4e5 sRGB support in Ganesh. Several pieces:
sRGB support now also requires GL_EXT_texture_sRGB_decode, which allows
us to disable sRGB -> Linear conversion when reading textures. This gives
us an easy way to support "legacy" L32 mode. We disable decoding based on
the pixel config of the render target. Textures can override that behavior
(specifically for format-conversion draws where we want that behavior).

Added sBGRA pixel config, which is not-really-a-format. It's just sRGBA
internally, and the external format is BGR order, so TexImage calls will
swizzle correctly. This lets us interact with sRGB raster surfaces on BGR
platforms.

Devices without sRGB support behave like they always have: conversion from
color type and profile type ignores sRGB and always returns linear pixel
configs.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1789663002

Review URL: https://codereview.chromium.org/1789663002
2016-03-17 12:26:37 -07:00
mtklein
5f939ab658 Use std::unique_ptr.
TBR=reed@google.com

Committed: https://skia.googlesource.com/skia/+/20c1e3abfc681771f73eb19fde7284196e028940

Committed: https://skia.googlesource.com/skia/+/3dd9ed37c24611af86f0fe374bd3698b63f09450
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1780933003

Committed: https://skia.googlesource.com/skia/+/2691d76a06e1af6282f8b3a3140cc93361be10c4

Review URL: https://codereview.chromium.org/1780933003
2016-03-16 10:28:35 -07:00
mtklein
e7ec417268 Revert of Use std::unique_ptr. (patchset #10 id:170001 of https://codereview.chromium.org/1780933003/ )
Reason for revert:
aww jeez, I dropped ps 8...

Original issue's description:
> Use std::unique_ptr.
>
> TBR=reed@google.com
>
> Committed: https://skia.googlesource.com/skia/+/20c1e3abfc681771f73eb19fde7284196e028940
>
> Committed: https://skia.googlesource.com/skia/+/3dd9ed37c24611af86f0fe374bd3698b63f09450
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1780933003
>
> Committed: https://skia.googlesource.com/skia/+/2691d76a06e1af6282f8b3a3140cc93361be10c4

TBR=bungeman@google.com,mtklein@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1809693002
2016-03-16 10:03:15 -07:00
mtklein
2691d76a06 Use std::unique_ptr.
TBR=reed@google.com

Committed: https://skia.googlesource.com/skia/+/20c1e3abfc681771f73eb19fde7284196e028940

Committed: https://skia.googlesource.com/skia/+/3dd9ed37c24611af86f0fe374bd3698b63f09450
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1780933003

Review URL: https://codereview.chromium.org/1780933003
2016-03-16 08:39:42 -07:00
cdalton
c04ce676d4 Add caps and GL API for buffer texture
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1784063003

Review URL: https://codereview.chromium.org/1784063003
2016-03-11 14:07:38 -08:00
cdalton
5f2d8e28c4 Add sampler precision to GrTextureAccess
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1784023002

Review URL: https://codereview.chromium.org/1784023002
2016-03-11 13:34:32 -08:00
cdalton
9c3f14327a Add support for vertex and geometry shader textures
Adds a visibility bitfield to GrTextureAccess that controls in which
shaders the texture should be accessible. Also adds caps and
validation to ensure we don't exceed texture limits.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1782583002

Review URL: https://codereview.chromium.org/1782583002
2016-03-11 10:07:37 -08:00
bsalomon
41b952c296 Add deferred texture upload API.
Performs thread-safe decoding of SkImage in order to later create a texture-backed SkImage.

The client allocates storage for the data.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1776693002

Review URL: https://codereview.chromium.org/1776693002
2016-03-11 06:46:33 -08:00
mtklein
218c846ac0 Revert of Use std::unique_ptr. (patchset #8 id:130001 of https://codereview.chromium.org/1780933003/ )
Reason for revert:
Another Android ambiguity due to implicit bool...

frameworks/base/core/jni/android/graphics/Utils.cpp:110:35: error: call of overloaded 'SkMemoryStream(SkAutoTUnref<SkData>&)' is ambiguous
     return new SkMemoryStream(data);

Original issue's description:
> Use std::unique_ptr.
>
> TBR=reed@google.com
>
> Committed: https://skia.googlesource.com/skia/+/20c1e3abfc681771f73eb19fde7284196e028940
>
> Committed: https://skia.googlesource.com/skia/+/3dd9ed37c24611af86f0fe374bd3698b63f09450

TBR=bungeman@google.com,mtklein@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1785353002
2016-03-11 06:10:30 -08:00
mtklein
3dd9ed37c2 Use std::unique_ptr.
TBR=reed@google.com

Committed: https://skia.googlesource.com/skia/+/20c1e3abfc681771f73eb19fde7284196e028940

Review URL: https://codereview.chromium.org/1780933003
2016-03-11 05:18:48 -08:00
mtklein
977c07dad2 Revert of Use std::unique_ptr. (patchset #7 id:120001 of https://codereview.chromium.org/1780933003/ )
Reason for revert:
Now we remember!  The problem was Clank:

https://build.chromium.org/p/tryserver.chromium.android/builders/android_clang_dbg_recipe/builds/34329

Original issue's description:
> Use std::unique_ptr.
>
> TBR=reed@google.com
>
> Committed: https://skia.googlesource.com/skia/+/20c1e3abfc681771f73eb19fde7284196e028940

TBR=bungeman@google.com,mtklein@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1782973002
2016-03-10 11:31:27 -08:00
bungeman
d7dc76f7e9 Remove version checks for _MSC_VER < 1800 (msvs2013).
We already actively do not support older versions of the vc++
compiler and runtime, so don't check for them anymore.

TBR=reed
No API changes.

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1777213003

Review URL: https://codereview.chromium.org/1777213003
2016-03-10 11:14:40 -08:00
mtklein
20c1e3abfc Use std::unique_ptr.
TBR=reed@google.com

Review URL: https://codereview.chromium.org/1780933003
2016-03-10 10:10:03 -08:00
bsalomon
e699d0cd25 Don't allow nullptr in texels array params (unless using a transfer buffer).
Require all levels in writePixels to have a non-nullptr.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1765633002

Committed: https://skia.googlesource.com/skia/+/8ee78f31b2a29a5f76403755ea17bad9be74a3ec

Review URL: https://codereview.chromium.org/1765633002
2016-03-09 06:25:16 -08:00
cdalton
8d988b3a73 Add support for 2x2 matrices
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1755483002

Review URL: https://codereview.chromium.org/1755483002
2016-03-07 15:39:09 -08:00
cdalton
28f45b949a Add "sample locations" feature to GrProcessor
Adds a "sample locations" feature to GrProcessor. When enabled, this
allows a processor to know inside the shader where all the samples are
located. Also adds various infastructure to query, cache, and identify
multisample data.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1717393002

Review URL: https://codereview.chromium.org/1717393002
2016-03-07 13:58:26 -08:00
bsalomon
aecc018f86 Attempt to combine batches in forward direction before flush
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1763883005

Review URL: https://codereview.chromium.org/1763883005
2016-03-07 11:50:44 -08:00
bsalomon
97220199d4 Turn on gpu stats in debug builds.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1769633002

Review URL: https://codereview.chromium.org/1769633002
2016-03-04 13:15:29 -08:00
bsalomon
d3312595c8 Revert of Don't allow nullptr in texels array params (unless using a transfer buffer). (patchset #3 id:60001 of https://codereview.chromium.org/1765633002/ )
Reason for revert:
breaks vk build

Original issue's description:
> Don't allow nullptr in texels array params (unless using a transfer buffer).
>
> Require all levels in writePixels to have a non-nullptr.
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1765633002
>
> Committed: https://skia.googlesource.com/skia/+/8ee78f31b2a29a5f76403755ea17bad9be74a3ec

TBR=jvanverth@google.com,cblume@google.com,cblume@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1760343003
2016-03-04 07:06:43 -08:00
bsalomon
8ee78f31b2 Don't allow nullptr in texels array params (unless using a transfer buffer).
Require all levels in writePixels to have a non-nullptr.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1765633002

Review URL: https://codereview.chromium.org/1765633002
2016-03-04 06:23:36 -08:00
kkinnunen
f655e9330e Revert of Implement support for using GL ES 3.0 with command buffer (patchset #6 id:100001 of https://codereview.chromium.org/1684413003/ )
Reason for revert:
The dependency, ES3 implementation in command_buffer_gles2, got reverted.

Original issue's description:
> Implement support for using GL ES 3.0 with command buffer
>
> Adds a new 'api': --config gpu(api=commandbuffer3) for dm/nanobench.
>
> BUG=skia:4943
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1684413003
>
> Committed: https://skia.googlesource.com/skia/+/45c2c8166bbd84a87e29fdd344b39e36e8a28a3f

TBR=bsalomon@google.com
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=skia:4943
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1744963002

Review URL: https://codereview.chromium.org/1744963002
2016-03-03 07:39:49 -08:00
robertphillips
391395dcfb Begin weaning GrClipMaskManager off of GrDrawTarget (take 2)
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1754563003

Committed: https://skia.googlesource.com/skia/+/86c60758e9e4f9e203d7462cb22b2a245a0f51bd

Review URL: https://codereview.chromium.org/1754563003
2016-03-02 09:26:36 -08:00
robertphillips
8b8f36fc49 Revert of Begin weaning GrClipMaskManager off of GrDrawTarget (take 2) (patchset #7 id:120001 of https://codereview.chromium.org/1754563003/ )
Reason for revert:
fAuditTrail

Original issue's description:
> Begin weaning GrClipMaskManager off of GrDrawTarget (take 2)
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1754563003
>
> Committed: https://skia.googlesource.com/skia/+/86c60758e9e4f9e203d7462cb22b2a245a0f51bd

TBR=joshualitt@chromium.org,bsalomon@google.com,joshualitt@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1754353002
2016-03-02 08:53:12 -08:00
robertphillips
86c60758e9 Begin weaning GrClipMaskManager off of GrDrawTarget (take 2)
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1754563003

Review URL: https://codereview.chromium.org/1754563003
2016-03-02 08:43:13 -08:00
robertphillips
4bc31815ba Make GrDrawContext::internalDrawPath cons up its own GrPipelineBuilder
Hopefully, this better defines (and reduces) the lifetime and reuse of GrPipelineBuilder objects in GrDrawContext.

TBR=bsalomon@google.com

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1730903007

Committed: https://skia.googlesource.com/skia/+/00fddebe56fabea67dcc08762805c1294eebf5bf

Review URL: https://codereview.chromium.org/1730903007
2016-03-01 12:22:49 -08:00
robertphillips
000958973f Move drawDRRect back to GrDrawContext
This still leaves GrDrawContext fiddling around with specialized fragment processors but it does allow for different handling of the DRRects (e.g., for instanced drawing).

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1750533003

Review URL: https://codereview.chromium.org/1750533003
2016-02-29 13:50:40 -08:00
cblume
55f2d2d57f Creating functions for uploading a mipmapped texture.
BUG=476416
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1249543003

Review URL: https://codereview.chromium.org/1249543003
2016-02-26 13:20:48 -08:00
cdalton
87332103c6 Replace fWillReadFragmentPosition with a bitfield
Replaces fWillReadFragmentPosition on GrProcessor with a
"RequiredFeatures" bitfield. This will allow us to add additional
built-in features. Completely removes information about reading the
fragment position from GrPipeline and GrProcOptInfo.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1734163002

Review URL: https://codereview.chromium.org/1734163002
2016-02-26 12:22:02 -08:00
cdalton
eb79eea617 Include glGetMultisamplefv API
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1720963002

Committed: https://skia.googlesource.com/skia/+/69c1b24bcaa7cffd59753a75a7f3d155696fcac4

Review URL: https://codereview.chromium.org/1720963002
2016-02-26 10:39:34 -08:00
ethannicholas
d2c7791233 Revert of Make GrDrawContext::internalDrawPath cons up its own GrPipelineBuilder (patchset #3 id:40001 of https://codereview.chromium.org/1730903007/ )
Reason for revert:
Got a GL-related crash in nanobench:

https://uberchromegw.corp.google.com/i/client.skia.android/builders/Perf-Android-GCC-Nexus10-GPU-MaliT604-Arm7-Release/builds/3815/steps/nanobench/logs/stdio

Given we're about to branch and this is the only GL-related change in the blamelist, I'm going to assume this is responsible and revert.

Original issue's description:
> Make GrDrawContext::internalDrawPath cons up its own GrPipelineBuilder
>
> Hopefully, this better defines (and reduces) the lifetime and reuse of GrPipelineBuilder objects in GrDrawContext.
>
> TBR=bsalomon@google.com
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1730903007
>
> Committed: https://skia.googlesource.com/skia/+/00fddebe56fabea67dcc08762805c1294eebf5bf

TBR=joshualitt@chromium.org,bsalomon@google.com,robertphillips@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1737373002
2016-02-25 13:43:16 -08:00
robertphillips
00fddebe56 Make GrDrawContext::internalDrawPath cons up its own GrPipelineBuilder
Hopefully, this better defines (and reduces) the lifetime and reuse of GrPipelineBuilder objects in GrDrawContext.

TBR=bsalomon@google.com

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1730903007

Review URL: https://codereview.chromium.org/1730903007
2016-02-25 12:56:50 -08:00
robertphillips
d77061067a Mv DRRect drawing code from GrDrawContext into SkGpuDevice
This is a TODO left over from https://codereview.chromium.org/1731413002/ (Hide GrDrawTarget from GrOvalRenderer). It is desireable since the GrDrawContext doesn't, in general, manipulate GrFragmentProcessors.

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1733993003

Review URL: https://codereview.chromium.org/1733993003
2016-02-25 09:28:08 -08:00
bsalomon
5ec26ae9bf Move Budgeted enum out of SkSurface, use in GrTextureProvider
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1728093005
DOCS_PREVIEW= https://skia.org/?cl=1728093005

Committed: https://skia.googlesource.com/skia/+/57599fe6c0336feaeeeb9b1996e77b70219b483c
CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot

Review URL: https://codereview.chromium.org/1728093005
2016-02-25 08:33:02 -08:00
bsalomon
bd500f09ce Revert of Move Budgeted enum out of SkSurface, use in GrTextureProvider (patchset #6 id:100001 of https://codereview.chromium.org/1728093005/ )
Reason for revert:
Need workaround for chrome to build

Original issue's description:
> Move Budgeted enum out of SkSurface, use in GrTextureProvider
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1728093005
> DOCS_PREVIEW= https://skia.org/?cl=1728093005
>
> Committed: https://skia.googlesource.com/skia/+/57599fe6c0336feaeeeb9b1996e77b70219b483c

TBR=reed@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1734043002
2016-02-25 06:52:12 -08:00
bsalomon
57599fe6c0 Move Budgeted enum out of SkSurface, use in GrTextureProvider
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1728093005
DOCS_PREVIEW= https://skia.org/?cl=1728093005

Review URL: https://codereview.chromium.org/1728093005
2016-02-25 06:33:27 -08:00
kkinnunen
45c2c8166b Implement support for using GL ES 3.0 with command buffer
Adds a new 'api': --config gpu(api=commandbuffer3) for dm/nanobench.

BUG=skia:4943
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1684413003

Review URL: https://codereview.chromium.org/1684413003
2016-02-25 02:03:43 -08:00
ericrk
f7b8b8affe Add wrapBackendTextureAsRenderTarget API
Skia's GrTextureProvider currently exposes two APIs for wrapping backend
objects:
 * wrapBackendTexture - wraps a texture into a GrTexture. Depending on
   flags, this GrTexture can be converted to a GrRenderTarget. Skia
   manages the render target objects it may create to provide a render
   target for the texture. This allows Skia to create stencil buffers
   if needed and manager MSAA resolves.
 * wrapBackendRenderTarget - wraps a FBO into a GrRenderTarget. This
   object cannot be converted to a GrTexture. Skia does not manage
   the render target objects for such a GrRenderTarget, and as such
   cannot attach stencil buffers or perform MSAA resolves on the
   created GrRenderTarget.

Given these two options, wrapBackendTexture provides more versatility
and allows Skia more room for optimization. Chrome currently uses
wrapBackendTexture for this reason.

While these two functions cover most cases, they do not provide a way
for Skia to wrap a texture into a render target (and gain the MSAA and
stencil buffer management), without also creating a GrTexture. This is
problematic in cases where a texture can be bound to a render target,
but cannot be textured from, as is the case in Chrome's limited support
for GL_TEXTURE_RECTANGLE.

To address this, a new function is created:
 * wrapBackendTextureAsRenderTarget - wraps a texture into a
   GrRenderTarget. As with wrapBackendTexture, the created render
   target objects are fully managed by Skia. Unlike wrapBackendTexture
   no GrTexture is created, and the created object will never be
   textured from.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1709163003

Review URL: https://codereview.chromium.org/1709163003
2016-02-24 14:49:52 -08:00
ethannicholas
f15b07b75c Revert of Include glGetMultisamplefv API (patchset #1 id:1 of https://codereview.chromium.org/1720963002/ )
Reason for revert:
This is in the blamelist for Visualbench failures:

https://build.chromium.org/p/client.skia/builders/Perf-Ubuntu-GCC-ShuttleA-GPU-GTX660-x86_64-Release-VisualBench/builds/1035

and seems the most likely candidate for the failure, so I am tentatively reverting.

Original issue's description:
> Include glGetMultisamplefv API
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1720963002
>
> Committed: https://skia.googlesource.com/skia/+/69c1b24bcaa7cffd59753a75a7f3d155696fcac4

TBR=bsalomon@google.com,joshualitt@google.com,cdalton@nvidia.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1731333002
2016-02-24 08:19:04 -08:00
cdalton
69c1b24bca Include glGetMultisamplefv API
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1720963002

Review URL: https://codereview.chromium.org/1720963002
2016-02-23 13:38:47 -08:00
jvanverth
7023a00c35 Use unorm shorts for texture coordinates when rendering text.
There are a couple of reasons for this:
- Vulkan does not guarantee conversions from integral vertex attributes
  to floating point shader variables
- This may be faster and more precise on some platforms, as it avoids
  the aforementioned conversion and changes a multiply by a very small
  value to a multiply by a medium-sized value.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1713693002
TBR=bsalomon@google.com

Committed: https://skia.googlesource.com/skia/+/e507ff0460f4f878214b9454fb5b9ab8d64d8063

Review URL: https://codereview.chromium.org/1713693002
2016-02-22 11:25:32 -08:00
benjaminwagner
01e5838076 Simplify calculations in AADistanceFieldPathBatch::writePathVertices.
No API changes.

BUG=skia:4632
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1715063002
TBR=reed

Review URL: https://codereview.chromium.org/1715063002
2016-02-22 11:10:33 -08:00
Greg Daniel
164a9f061c Add vulkan files into skia repo. This is an incomplete backend with only partial functionality at this time.
R=robertphillips@google.com
TBR=bsalomon@google.com

BUG=skia:4955
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1718693002

Committed: https://skia.googlesource.com/skia/+/48cf268defad66f58f1aa03b4835e5583be96b2f

Review URL: https://codereview.chromium.org/1718693002
2016-02-22 09:56:40 -05:00
egdaniel
ad3a13c4c3 Revert of Add vulkan files into skia repo. (patchset #2 id:20001 of https://codereview.chromium.org/1718693002/ )
Reason for revert:
breaking builds

Original issue's description:
> Add vulkan files into skia repo. This is an incomplete backend with only partial functionality at this time.
>
> R=robertphillips@google.com
> TBR=bsalomon@google.com
>
> BUG=skia:4955
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1718693002
>
> Committed: https://skia.googlesource.com/skia/+/48cf268defad66f58f1aa03b4835e5583be96b2f

TBR=robertphillips@google.com,bsalomon@google.com,jvanverth@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4955

Review URL: https://codereview.chromium.org/1723503002
2016-02-22 06:17:53 -08:00
Greg Daniel
48cf268def Add vulkan files into skia repo. This is an incomplete backend with only partial functionality at this time.
R=robertphillips@google.com
TBR=bsalomon@google.com

BUG=skia:4955
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1718693002

Review URL: https://codereview.chromium.org/1718693002
2016-02-22 09:11:32 -05:00
jvanverth
d106c2c640 Revert of Use unorm shorts for texture coordinates when rendering text. (patchset #3 id:40001 of https://codereview.chromium.org/1713693002/ )
Reason for revert:
Causing issues with text on Mali 400s. Examples: 	largeglyphblur, imageblurtiled. It appears that there are precision problems.

Original issue's description:
> Use unorm shorts for texture coordinates when rendering text.
>
> There are a couple of reasons for this:
> - Vulkan does not guarantee conversions from integral vertex attributes
>   to floating point shader variables
> - This may be faster and more precise on some platforms, as it avoids
>   the aforementioned conversion and changes a multiply by a very small
>   value to a multiply by a medium-sized value.
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1713693002
> TBR=bsalomon@google.com
>
> Committed: https://skia.googlesource.com/skia/+/e507ff0460f4f878214b9454fb5b9ab8d64d8063

TBR=joshualitt@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1709133003
2016-02-19 08:43:26 -08:00
jvanverth
e507ff0460 Use unorm shorts for texture coordinates when rendering text.
There are a couple of reasons for this:
- Vulkan does not guarantee conversions from integral vertex attributes
  to floating point shader variables
- This may be faster and more precise on some platforms, as it avoids
  the aforementioned conversion and changes a multiply by a very small
  value to a multiply by a medium-sized value.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1713693002
TBR=bsalomon@google.com

Review URL: https://codereview.chromium.org/1713693002
2016-02-19 06:35:22 -08:00
ethannicholas
c85d9fbc0a GrAuditTrail can now be enabled/disabled at runtime
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1712753002

TBR=bsalomon@google.com
Doesn't actually change the public API

Review URL: https://codereview.chromium.org/1712753002
2016-02-18 13:45:40 -08:00
bungeman
bf521ff941 Move SkTArray to include/private.
TBR=reed
Agreed moving to private is good.

Review URL: https://codereview.chromium.org/1702073002
2016-02-17 13:13:44 -08:00
joshualitt
8db867820b Fix memory leak
TBR=bsalomon@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1706773002

Review URL: https://codereview.chromium.org/1706773002
2016-02-17 05:40:00 -08:00
bsalomon
babafcc681 Workaround for bug in Tegra 3 when uploading to a render target
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1703603002

Review URL: https://codereview.chromium.org/1703603002
2016-02-16 11:36:47 -08:00
joshualitt
8e84a1ed07 Delete GrTextContext
TBR=bsalomon@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1699073004

Review URL: https://codereview.chromium.org/1699073004
2016-02-16 11:09:25 -08:00
joshualitt
96880d9e36 Create GrPathRenderingDrawContext
TBR=bsalomon@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1701013002

Review URL: https://codereview.chromium.org/1701013002
2016-02-16 10:36:53 -08:00
bsalomon
b8fea97a7a Make copySurface work for texture dsts, return a bool, & add unit test.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1684313002

Committed: https://skia.googlesource.com/skia/+/7ea5e28065e5eb797e95f5d81c1a65cf3209d741

Review URL: https://codereview.chromium.org/1684313002
2016-02-16 07:34:17 -08:00
cdalton
5e58ceea85 Add GrShaderFlags enum
Replaces GrGLSLUniformHandler::ShaderVisibility with GrShaderFlags.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1684063006

Review URL: https://codereview.chromium.org/1684063006
2016-02-11 12:49:47 -08:00
kjlubick
0eed945294 Revert of Make copySurface work for texture dsts, return a bool, & add unit test. (patchset #6 id:100001 of https://codereview.chromium.org/1684313002/ )
Reason for revert:
Copy surface tests are not happy for Windows, Android and probably others:
https://uberchromegw.corp.google.com/i/client.skia.android/builders/Test-Android-GCC-Nexus7-GPU-Tegra3-Arm7-Release/builds/4161
https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Win8-MSVC-ShuttleA-GPU-GTX960-x86_64-Release/builds/3694

Original issue's description:
> Make copySurface work for texture dsts, return a bool, & add unit test.
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1684313002
>
> Committed: https://skia.googlesource.com/skia/+/7ea5e28065e5eb797e95f5d81c1a65cf3209d741

TBR=robertphillips@google.com,bsalomon@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1690053002
2016-02-11 12:05:24 -08:00
bsalomon
7ea5e28065 Make copySurface work for texture dsts, return a bool, & add unit test.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1684313002

Review URL: https://codereview.chromium.org/1684313002
2016-02-11 11:42:31 -08:00
joshualitt
1b39f43941 Pass a GrContext pointer in GrDrawContext constructor
TBR=bsalomon@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1691503002

Review URL: https://codereview.chromium.org/1691503002
2016-02-11 06:46:52 -08:00
erikchen
9a1ed5d81d skia: Add support for CHROMIUM_image backed textures.
I created a new abstract base class TextureStorageAllocator that consumers of
Skia can subclass and pass back to Skia. When a surface is created with a
pointer to a TextureStorageAllocator, any textures it creates, or that are
derived from the original surface, will allocate and deallocate storage using
the methods on TextureStorageAllocator.

BUG=https://code.google.com/p/chromium/issues/detail?id=579664
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1623653002

Committed: https://skia.googlesource.com/skia/+/92098e691f10a010e7421125ba4d44c02506bb55

Committed: https://skia.googlesource.com/skia/+/7fec91ce6660190f8d7c5eb6f3061e4550cc672b

Committed: https://skia.googlesource.com/skia/+/b8d6e088590160f1198110c2371b802c1d541a36

Review URL: https://codereview.chromium.org/1623653002
2016-02-10 16:32:35 -08:00
caryclark
64e7533091 Revert of skia: Add support for CHROMIUM_image backed textures. (patchset #19 id:380001 of https://codereview.chromium.org/1623653002/ )
Reason for revert:
Breaks ASAN bot:

Direct leak of 56 byte(s) in 1 object(s) allocated from:
...
test_CustomTexture

https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Ubuntu-GCC-Golo-GPU-GT610-x86_64-Debug-ASAN/builds/2676/steps/dm/logs/stdio

Original issue's description:
> skia: Add support for CHROMIUM_image backed textures.
>
> I created a new abstract base class TextureStorageAllocator that consumers of
> Skia can subclass and pass back to Skia. When a surface is created with a
> pointer to a TextureStorageAllocator, any textures it creates, or that are
> derived from the original surface, will allocate and deallocate storage using
> the methods on TextureStorageAllocator.
>
> BUG=https://code.google.com/p/chromium/issues/detail?id=579664
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1623653002
>
> Committed: https://skia.googlesource.com/skia/+/92098e691f10a010e7421125ba4d44c02506bb55
>
> Committed: https://skia.googlesource.com/skia/+/7fec91ce6660190f8d7c5eb6f3061e4550cc672b
>
> Committed: https://skia.googlesource.com/skia/+/b8d6e088590160f1198110c2371b802c1d541a36

TBR=bsalomon@chromium.org,cblume@chromium.org,bsalomon@google.com,robertphillips@google.com,egdaniel@google.com,reed@google.com,erikchen@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=https://code.google.com/p/chromium/issues/detail?id=579664

Review URL: https://codereview.chromium.org/1684993002
2016-02-09 16:28:46 -08:00
erikchen
b8d6e08859 skia: Add support for CHROMIUM_image backed textures.
I created a new abstract base class TextureStorageAllocator that consumers of
Skia can subclass and pass back to Skia. When a surface is created with a
pointer to a TextureStorageAllocator, any textures it creates, or that are
derived from the original surface, will allocate and deallocate storage using
the methods on TextureStorageAllocator.

BUG=https://code.google.com/p/chromium/issues/detail?id=579664
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1623653002

Committed: https://skia.googlesource.com/skia/+/92098e691f10a010e7421125ba4d44c02506bb55

Committed: https://skia.googlesource.com/skia/+/7fec91ce6660190f8d7c5eb6f3061e4550cc672b

Review URL: https://codereview.chromium.org/1623653002
2016-02-09 13:30:55 -08:00
bsalomon
eb00475d23 Use skstd::remove_pointer_t in GrGLFunction
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1684513003

Review URL: https://codereview.chromium.org/1684513003
2016-02-09 08:28:54 -08:00
cdalton
793dc26ca6 Improve GLSL integer support
- Adds shader types for uint.
 - Adds a cap for integer support.
 - Uses glVertexAttribIPointer for integer attribs.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1669853002

Committed: https://skia.googlesource.com/skia/+/3a2caf8ecf38124f4ad21a0f6c4dabfcfa17911a

Review URL: https://codereview.chromium.org/1669853002
2016-02-08 10:11:47 -08:00
bsalomon
9f2dc27642 Replace GrGLInterface's function pointers with std::functions.
This is to facilitate binding to GLES2Interface in Chromium rather than the C interface. It requires capturing the GLES2Interface.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1674823002

Review URL: https://codereview.chromium.org/1674823002
2016-02-08 07:22:17 -08:00
dcheng
c4d196c9c8 Revert of Improve GLSL integer support (patchset #1 id:1 of https://codereview.chromium.org/1669853002/ )
Reason for revert:
MSAN bots are unhappy with this change: https://build.chromium.org/p/chromium.memory.fyi/builders/Linux%20ChromeOS%20MSan%20Tests/builds/7068

Original issue's description:
> Improve GLSL integer support
>
>  - Adds shader types for uint.
>  - Adds a cap for integer support.
>  - Uses glVertexAttribIPointer for integer attribs.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1669853002
>
> Committed: https://skia.googlesource.com/skia/+/3a2caf8ecf38124f4ad21a0f6c4dabfcfa17911a

TBR=bsalomon@google.com,egdaniel@google.com,ethannicholas@google.com,cdalton@nvidia.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1674813004
2016-02-06 15:08:55 -08:00
bsalomon
f1036b2c66 Revert of skia: Add support for CHROMIUM_image backed textures. (patchset #17 id:340001 of https://codereview.chromium.org/1623653002/ )
Reason for revert:
New unit test is failing on Windows ANGLE bots:
http://build.chromium.org/p/client.skia/builders/Test-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Release-ANGLE/builds/1866/steps/dm/logs/stdio

Original issue's description:
> skia: Add support for CHROMIUM_image backed textures.
>
> I created a new abstract base class TextureStorageAllocator that consumers of
> Skia can subclass and pass back to Skia. When a surface is created with a
> pointer to a TextureStorageAllocator, any textures it creates, or that are
> derived from the original surface, will allocate and deallocate storage using
> the methods on TextureStorageAllocator.
>
> BUG=https://code.google.com/p/chromium/issues/detail?id=579664
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1623653002
>
> Committed: https://skia.googlesource.com/skia/+/92098e691f10a010e7421125ba4d44c02506bb55
>
> Committed: https://skia.googlesource.com/skia/+/7fec91ce6660190f8d7c5eb6f3061e4550cc672b

TBR=bsalomon@chromium.org,cblume@chromium.org,robertphillips@google.com,egdaniel@google.com,reed@google.com,erikchen@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=https://code.google.com/p/chromium/issues/detail?id=579664

Review URL: https://codereview.chromium.org/1673923003
2016-02-05 17:56:39 -08:00
cdalton
3a2caf8ecf Improve GLSL integer support
- Adds shader types for uint.
 - Adds a cap for integer support.
 - Uses glVertexAttribIPointer for integer attribs.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1669853002

Review URL: https://codereview.chromium.org/1669853002
2016-02-05 16:26:32 -08:00
erikchen
7fec91ce66 skia: Add support for CHROMIUM_image backed textures.
I created a new abstract base class TextureStorageAllocator that consumers of
Skia can subclass and pass back to Skia. When a surface is created with a
pointer to a TextureStorageAllocator, any textures it creates, or that are
derived from the original surface, will allocate and deallocate storage using
the methods on TextureStorageAllocator.

BUG=https://code.google.com/p/chromium/issues/detail?id=579664
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1623653002

Committed: https://skia.googlesource.com/skia/+/92098e691f10a010e7421125ba4d44c02506bb55

Review URL: https://codereview.chromium.org/1623653002
2016-02-05 12:10:55 -08:00
cdalton
06604b9562 Add GL indirect drawing APIs
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1666803002

Review URL: https://codereview.chromium.org/1666803002
2016-02-05 10:09:51 -08:00
cdalton
af8bc7d7a4 Add support for GL_EXT_raster_multisample
Updates the GrGLGpu to call glRasterSamplesEXT when multisample is
enabled for a mixed sampled render target, but the stencil test is not
active.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1666563003

Review URL: https://codereview.chromium.org/1666563003
2016-02-05 09:35:20 -08:00
benjaminwagner
f49c75a8f1 Move Google3-specific stack limitation logic to template classes.
Remove #ifdefs in other files.

Reapplies https://codereview.chromium.org/1656143003; removing the implicit constructors for GLPtr and GLPtrAlias resolves the build issue on Android.

Also reverts https://codereview.chromium.org/1663013004

Does not change the public API.

TBR=reed
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1666203002

Review URL: https://codereview.chromium.org/1666203002
2016-02-05 07:02:38 -08:00
jcgregorio
e7d7f90b59 Revert of skia: Add support for CHROMIUM_image backed textures. (patchset #14 id:260001 of https://codereview.chromium.org/1623653002/ )
Reason for revert:
Seems to causing the DEPS roll to fail:

   https://codereview.chromium.org/1668293002/

Original issue's description:
> skia: Add support for CHROMIUM_image backed textures.
>
> I created a new abstract base class TextureStorageAllocator that consumers of
> Skia can subclass and pass back to Skia. When a surface is created with a
> pointer to a TextureStorageAllocator, any textures it creates, or that are
> derived from the original surface, will allocate and deallocate storage using
> the methods on TextureStorageAllocator.
>
> BUG=https://code.google.com/p/chromium/issues/detail?id=579664
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1623653002
>
> Committed: https://skia.googlesource.com/skia/+/92098e691f10a010e7421125ba4d44c02506bb55

TBR=bsalomon@chromium.org,cblume@chromium.org,bsalomon@google.com,robertphillips@google.com,egdaniel@google.com,reed@google.com,erikchen@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=https://code.google.com/p/chromium/issues/detail?id=579664

Review URL: https://codereview.chromium.org/1669213002
2016-02-04 19:51:25 -08:00
erikchen
92098e691f skia: Add support for CHROMIUM_image backed textures.
I created a new abstract base class TextureStorageAllocator that consumers of
Skia can subclass and pass back to Skia. When a surface is created with a
pointer to a TextureStorageAllocator, any textures it creates, or that are
derived from the original surface, will allocate and deallocate storage using
the methods on TextureStorageAllocator.

BUG=https://code.google.com/p/chromium/issues/detail?id=579664
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1623653002

Review URL: https://codereview.chromium.org/1623653002
2016-02-04 12:03:08 -08:00
ethannicholas
2279325d53 added support for PLS path rendering
BUG=skia:3555
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1541903002

Committed: https://skia.googlesource.com/skia/+/7df3f5e127f8016d17b637cc48a6a4718f1a6822

Review URL: https://codereview.chromium.org/1541903002
2016-01-30 09:59:10 -08:00
joshualitt
b35c82dc94 Add a background timing thread to kilobench
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1612513002

Review URL: https://codereview.chromium.org/1612513002
2016-01-28 06:26:35 -08:00
cblume
6121405df5 Cleaning up trailing spaces and typos.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1631993002

Review URL: https://codereview.chromium.org/1631993002
2016-01-26 09:10:48 -08:00
ethannicholas
5366a09ed0 Revert of added support for PLS path rendering (patchset #16 id:360001 of https://codereview.chromium.org/1541903002/ )
Reason for revert:
ASAN failure at src/gpu/GrXferProcessor.cpp:224

Original issue's description:
> added support for PLS path rendering
>
> BUG=skia:3555
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1541903002
>
> Committed: https://skia.googlesource.com/skia/+/7df3f5e127f8016d17b637cc48a6a4718f1a6822

TBR=bsalomon@google.com,egdaniel@google.com,joshualitt@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:3555
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1626553002

Review URL: https://codereview.chromium.org/1626553002
2016-01-22 09:45:47 -08:00
bsalomon
6c9cd55f00 Make swizzling in read/write pixel copy code more generic
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1617433002

Review URL: https://codereview.chromium.org/1617433002
2016-01-22 07:17:34 -08:00
ethannicholas
7df3f5e127 added support for PLS path rendering
BUG=skia:3555
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1541903002

Review URL: https://codereview.chromium.org/1541903002
2016-01-22 06:48:46 -08:00
joshualitt
01836add2a Revert to old behavior for swap buffers
New behavior is preserved with 'syncOrSwap' call

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1606883005

Review URL: https://codereview.chromium.org/1606883005
2016-01-20 13:09:12 -08:00
joshualitt
b59d1bc7a8 Add ability to wire up sharelist in glcontext creation
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1604993005

Review URL: https://codereview.chromium.org/1604993005
2016-01-20 08:07:02 -08:00
egdaniel
eed519e6a2 Differentiate maxColorSamples and maxStencilSamples in GrCaps
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1592803002

Review URL: https://codereview.chromium.org/1592803002
2016-01-15 11:36:18 -08:00
bsalomon
e5286e0b37 Beginning of support for texture rectangles.
Adds support for importing a RECTANGLE texture into Skia via GrTexureProvider::wrapBackendTexture().

Tests read/writing pixels, copySurface, and clear.

Does not add support for texturing from a RECTANGLE texture as the coords will be incorrectly normalized.

BUG=skia:3868
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1583863002

Review URL: https://codereview.chromium.org/1583863002
2016-01-14 09:24:09 -08:00
egdaniel
fa8963252e Move some program building utils from GL to GLSL
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1535603006

Review URL: https://codereview.chromium.org/1535603006
2016-01-13 12:19:30 -08:00
joshualitt
f5883a6d75 Hide drawBatch on GrDrawTarget from test Methods
TBR=bsalomon@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1574383002

Review URL: https://codereview.chromium.org/1574383002
2016-01-13 07:47:38 -08:00
joshualitt
bc90735170 GrAuditTrail hooks in GrContext + GrDrawContext
TBR=bsalomon@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1580023002

Review URL: https://codereview.chromium.org/1580023002
2016-01-13 06:45:40 -08:00
joshualitt
ce894007eb Guard SkGpuDevice
TBR=bsalomon@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1567093002

Review URL: https://codereview.chromium.org/1567093002
2016-01-11 13:29:31 -08:00
bsalomon
9d22fd6e7b Make SkBitmap::CopyTo respect requested dst color type when bitmap is texture backed.
BUG=chromium:550559
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1576983002

Review URL: https://codereview.chromium.org/1576983002
2016-01-11 11:14:17 -08:00
reed
4e23cdaa6b remove imagefilter::sizeconstraint
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1571033002

Review URL: https://codereview.chromium.org/1571033002
2016-01-11 10:56:59 -08:00
joshualitt
5651ee6376 Change to wire up opnames in SkGpuDevice
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1565113004

Review URL: https://codereview.chromium.org/1565113004
2016-01-11 10:39:11 -08:00
joshualitt
4897ff20fc Move atomicinc in GrTracing to behind branch
TBR=bsalomon@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1571603003

Review URL: https://codereview.chromium.org/1571603003
2016-01-11 08:30:48 -08:00
joshualitt
6d0872d9bd Reland of Add guards to GrTextureProvider (patchset #1 id:1 of https://codereview.chromium.org/1565313003/ )
Reason for revert:
should be fixed

Original issue's description:
> Revert of Add guards to GrTextureProvider (patchset #5 id:80001 of https://codereview.chromium.org/1567983002/ )
>
> Reason for revert:
> breaking asan bot
>
> Original issue's description:
> > Add guards to GrTextureProvider
> >
> > TBR=bsalomon@google.com
> > BUG=skia:
> > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1567983002
> >
> > Committed: https://skia.googlesource.com/skia/+/b30dd1db1d914b85a691b4724713ba1b0f16cd6c
>
> TBR=robertphillips@google.com,joshualitt@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/9a9515e081c54efdd5a0b0
f662c013cbeef6d63f

TBR=bsalomon@google.com
TBR=robertphillips@google.com,joshualitt@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=skia:

Review URL: https://codereview.chromium.org/1575093002
2016-01-11 08:27:48 -08:00
bsalomon
cdee009886 Add a class representing texture swizzle.
Store config swizzle GrGLCaps and shader swizzles in GrGLSLCaps.

Remove GrTextureAccess's swizzle and update users of it to swizzle in their shader code.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1567733005

Committed: https://skia.googlesource.com/skia/+/1a1efeacf7cc94a8c2977114dfe230fed3efc105

Review URL: https://codereview.chromium.org/1567733005
2016-01-08 13:20:12 -08:00
mtklein
3183a41363 Revert of Add a class representing texture swizzle. (patchset #6 id:100001 of https://codereview.chromium.org/1567733005/ )
Reason for revert:
Shader compilation failures when implicitly converting vec4 to float.

https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Win8-MSVC-ShuttleA-GPU-GTX960-x86_64-Debug/builds/3266/steps/dm/logs/stdio

https://uberchromegw.corp.google.com/i/client.skia.android/builders/Test-Android-GCC-Nexus6-GPU-Adreno420-Arm7-Debug/builds/3154/steps/dm/logs/stdio

Original issue's description:
> Add a class representing texture swizzle.
>
> Store config swizzle GrGLCaps and shader swizzles in GrGLSLCaps.
>
> Remove GrTextureAccess's swizzle and update users of it to swizzle in their shader code.
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1567733005
>
> Committed: https://skia.googlesource.com/skia/+/1a1efeacf7cc94a8c2977114dfe230fed3efc105

TBR=egdaniel@google.com,bsalomon@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1569393002
2016-01-08 12:11:39 -08:00
bsalomon
1a1efeacf7 Add a class representing texture swizzle.
Store config swizzle GrGLCaps and shader swizzles in GrGLSLCaps.

Remove GrTextureAccess's swizzle and update users of it to swizzle in their shader code.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1567733005

Review URL: https://codereview.chromium.org/1567733005
2016-01-08 11:38:41 -08:00
joshualitt
de8dc7e920 Reland of Make a single GrSingleOwner in GrContext (patchset #1 id:1 of https://codereview.chromium.org/1565303003/ )
Reason for revert:
trying again

Original issue's description:
> Revert of Make a single GrSingleOwner in GrContext (patchset #3 id:40001 of https://codereview.chromium.org/1563703004/ )
>
> Reason for revert:
> breaking asan
>
> Original issue's description:
> > Make a single GrSingleOwner in GrContext
> >
> > TBR=bsalomon@google.com
> > BUG=skia:
> > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1563703004
> >
> > Committed: https://skia.googlesource.com/skia/+/f9bc796e0dbd31674c22b34761913ee6e8fdd66a
>
> TBR=robertphillips@google.com,joshualitt@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/94da292e39db0d41da08b1d6055ca5e0d6b498cc

TBR=robertphillips@google.com,joshualitt@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1572653002
2016-01-08 10:09:13 -08:00
bsalomon
41e4384ea0 Move config texturability/renderability to config table.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1563443002

Committed: https://skia.googlesource.com/skia/+/32a3cd2f2860b15a842a6aa49e4e6a3bed04f949

Review URL: https://codereview.chromium.org/1563443002
2016-01-08 09:12:44 -08:00
joshualitt
27a48dc0cd Create stub GrAuditTrail class
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1572553002

Review URL: https://codereview.chromium.org/1572553002
2016-01-08 07:19:47 -08:00
egdaniel
4999df8ca2 Revert of Move config texturability/renderability to config table (patchset #8 id:140001 of https://codereview.chromium.org/1563443002/ )
Reason for revert:
speculative revert for breaking iOS writePixels tests

Original issue's description:
> Move config texturability/renderability to config table.
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1563443002
>
> Committed: https://skia.googlesource.com/skia/+/32a3cd2f2860b15a842a6aa49e4e6a3bed04f949

TBR=jvanverth@google.com,bsalomon@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1569103003
2016-01-07 17:06:04 -08:00
joshualitt
94da292e39 Revert of Make a single GrSingleOwner in GrContext (patchset #3 id:40001 of https://codereview.chromium.org/1563703004/ )
Reason for revert:
breaking asan

Original issue's description:
> Make a single GrSingleOwner in GrContext
>
> TBR=bsalomon@google.com
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1563703004
>
> Committed: https://skia.googlesource.com/skia/+/f9bc796e0dbd31674c22b34761913ee6e8fdd66a

TBR=robertphillips@google.com,joshualitt@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1565303003
2016-01-07 13:22:24 -08:00
joshualitt
9a9515e081 Revert of Add guards to GrTextureProvider (patchset #5 id:80001 of https://codereview.chromium.org/1567983002/ )
Reason for revert:
breaking asan bot

Original issue's description:
> Add guards to GrTextureProvider
>
> TBR=bsalomon@google.com
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1567983002
>
> Committed: https://skia.googlesource.com/skia/+/b30dd1db1d914b85a691b4724713ba1b0f16cd6c

TBR=robertphillips@google.com,joshualitt@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1565313003
2016-01-07 13:17:39 -08:00
bsalomon
32a3cd2f28 Move config texturability/renderability to config table.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1563443002

Review URL: https://codereview.chromium.org/1563443002
2016-01-07 13:00:11 -08:00
joshualitt
b30dd1db1d Add guards to GrTextureProvider
TBR=bsalomon@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1567983002

Review URL: https://codereview.chromium.org/1567983002
2016-01-07 12:52:05 -08:00
joshualitt
f9bc796e0d Make a single GrSingleOwner in GrContext
TBR=bsalomon@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1563703004

Review URL: https://codereview.chromium.org/1563703004
2016-01-07 11:32:40 -08:00
kkinnunen
3405800d7a Make SkGLContext lifetime more well-defined
Remove refcounting from SkGLContext.

SkGLContext is expected to behave like GrContextFactory would own
it, as implied by the GrContextFactory function.

If it is refcounted, this does not hold.

Also other use sites, such as in SkOSWindow_win (command buffer gl
object), confirm the behavior. The object is explicitly owned and
destroyed, not shared.

Also fixes potential crashes from using GL context of an abandoned
context.

Also fixes potential crashes in DM/nanobench, if the GrContext lives
longer than GLContext through internal refing of GrContext.

Moves the non-trivial implementations from GrContextFactory.h to
.cpp, just for consistency sake.

Changes pathops_unittest.gyp. The pathops_unittest uses
GrContextFactory, but did not link to its implementation. The reason
they worked was that the implementation used (constructors, destructors)
happened to be in the .h file.

This works towards being able to use command buffer and NVPR from
the SampleApp.

BUG=skia:2992
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1511773005

Committed: https://skia.googlesource.com/skia/+/830e012187f951d49d7e46e196ac8d1e653a25da

Review URL: https://codereview.chromium.org/1511773005
2016-01-06 23:49:31 -08:00
joshualitt
1de610a528 Create debug only SkSingleOwner
This is so Gpu code can guard against improper multithreaded usage in
debug builds

TBR=bsalomon@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1555953004

Review URL: https://codereview.chromium.org/1555953004
2016-01-06 08:26:09 -08:00
jvanverth
17aa047066 More framework support for TransferBuffers
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1534123003

Review URL: https://codereview.chromium.org/1534123003
2016-01-05 10:41:27 -08:00
jcgregorio
54e2ca5a23 Revert of Make SkGLContext lifetime more well-defined (patchset #7 id:120001 of https://codereview.chromium.org/1511773005/ )
Reason for revert:
Broke tests on Android, iOS, Mac and Windows.

Original issue's description:
> Make SkGLContext lifetime more well-defined
>
> Remove refcounting from SkGLContext.
>
> SkGLContext is expected to behave like GrContextFactory would own
> it, as implied by the GrContextFactory function.
>
> If it is refcounted, this does not hold.
>
> Also other use sites, such as in SkOSWindow_win (command buffer gl
> object), confirm the behavior. The object is explicitly owned and
> destroyed, not shared.
>
> Also fixes potential crashes from using GL context of an abandoned
> context.
>
> Also fixes potential crashes in DM/nanobench, if the GrContext lives
> longer than GLContext through internal refing of GrContext.
>
> Moves the non-trivial implementations from GrContextFactory.h to
> .cpp, just for consistency sake.
>
> Changes pathops_unittest.gyp. The pathops_unittest uses
> GrContextFactory, but did not link to its implementation. The reason
> they worked was that the implementation used (constructors, destructors)
> happened to be in the .h file.
>
> This works towards being able to use command buffer and NVPR from
> the SampleApp.
>
> BUG=skia:2992
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1511773005
>
> Committed: https://skia.googlesource.com/skia/+/830e012187f951d49d7e46e196ac8d1e653a25da

TBR=bsalomon@google.com,kkinnunen@nvidia.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:2992

Review URL: https://codereview.chromium.org/1555053003
2016-01-05 04:15:23 -08:00
tzik
bc7d235c8b Take care fall-through case of switch in skia
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1549273002

Review URL: https://codereview.chromium.org/1549273002
2016-01-05 00:35:50 -08:00
kkinnunen
830e012187 Make SkGLContext lifetime more well-defined
Remove refcounting from SkGLContext.

SkGLContext is expected to behave like GrContextFactory would own
it, as implied by the GrContextFactory function.

If it is refcounted, this does not hold.

Also other use sites, such as in SkOSWindow_win (command buffer gl
object), confirm the behavior. The object is explicitly owned and
destroyed, not shared.

Also fixes potential crashes from using GL context of an abandoned
context.

Also fixes potential crashes in DM/nanobench, if the GrContext lives
longer than GLContext through internal refing of GrContext.

Moves the non-trivial implementations from GrContextFactory.h to
.cpp, just for consistency sake.

Changes pathops_unittest.gyp. The pathops_unittest uses
GrContextFactory, but did not link to its implementation. The reason
they worked was that the implementation used (constructors, destructors)
happened to be in the .h file.

This works towards being able to use command buffer and NVPR from
the SampleApp.

BUG=skia:2992
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1511773005

Review URL: https://codereview.chromium.org/1511773005
2016-01-05 00:30:33 -08:00
reed
98e7538be3 make GrRect.h private
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1548213002

TBR=bsalomon

Review URL: https://codereview.chromium.org/1548213002
2015-12-26 18:20:00 -08:00
kkinnunen
3e980c3d88 Add config options to run different GPU APIs to dm and nanobench
Add extended config specification form that can be used to run different
gpu backend with different APIs.

The configs can be specified with the form:
gpu(api=string,dit=bool,nvpr=bool,samples=int)

This replaces and removes the --gpuAPI flag.

All existing configs should still work.

Adds following documentation:

out/Debug/dm --help config

Flags:
    --config:	type: string	default: 565 8888 gpu nonrendering
        Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
        nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
        xps or use extended form 'backend(option=value,...)'.

        Extended form: 'backend(option=value,...)'

        Possible backends and options:

        gpu(api=string,dit=bool,nvpr=bool,samples=int)	GPU backend
        	api	type: string	default: native.
        	    Select graphics API to use with gpu backend.
        	    Options:
        		native			Use platform default OpenGL or OpenGL ES backend.
        		gl    			Use OpenGL.
        		gles  			Use OpenGL ES.
        		debug 			Use debug OpenGL.
        		null  			Use null OpenGL.
        	dit	type: bool	default: false.
        	    Use device independent text.
        	nvpr	type: bool	default: false.
        	    Use NV_path_rendering OpenGL and OpenGL ES extension.
        	samples	type: int	default: 0.
        	    Use multisampling with N samples.

        Predefined configs:

        	gpu      	= gpu()
        	msaa4    	= gpu(samples=4)
        	msaa16   	= gpu(samples=16)
        	nvprmsaa4	= gpu(nvpr=true,samples=4)
        	nvprmsaa16	= gpu(nvpr=true,samples=16)
        	gpudft    	= gpu(dit=true)
        	gpudebug  	= gpu(api=debug)
        	gpunull   	= gpu(api=null)
        	debug     	= gpu(api=debug)
        	nullgpu   	= gpu(api=null)

BUG=skia:2992

Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005

Committed: https://skia.googlesource.com/skia/+/c8b4336444e7b90382e04e33665fb3b8490b825b

Committed: https://skia.googlesource.com/skia/+/9ebc3f0ee6db215dde461dc4777d85988cf272dd

Review URL: https://codereview.chromium.org/1490113005
2015-12-23 01:33:01 -08:00
rmistry
0f515bd428 Revert of Add config options to run different GPU APIs to dm and nanobench (patchset #21 id:400001 of https://codereview.chromium.org/1490113005/ )
Reason for revert:
The Test-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Debug builder fails after this CL.

Links to specific builds:
http://build.chromium.org/p/client.skia/builders/Test-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Debug/builds/1689
http://build.chromium.org/p/client.skia/builders/Test-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Debug/builds/1690
http://build.chromium.org/p/client.skia/builders/Test-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Debug/builds/1691

Original issue's description:
> Add config options to run different GPU APIs to dm and nanobench
>
> Add extended config specification form that can be used to run different
> gpu backend with different APIs.
>
> The configs can be specified with the form:
> gpu(api=string,dit=bool,nvpr=bool,samples=int)
>
> This replaces and removes the --gpuAPI flag.
>
> All existing configs should still work.
>
> Adds following documentation:
>
> out/Debug/dm --help config
>
> Flags:
>     --config:	type: string	default: 565 8888 gpu nonrendering
>         Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
>         nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
>         xps or use extended form 'backend(option=value,...)'.
>
>         Extended form: 'backend(option=value,...)'
>
>         Possible backends and options:
>
>         gpu(api=string,dit=bool,nvpr=bool,samples=int)	GPU backend
>         	api	type: string	default: native.
>         	    Select graphics API to use with gpu backend.
>         	    Options:
>         		native			Use platform default OpenGL or OpenGL ES backend.
>         		gl    			Use OpenGL.
>         		gles  			Use OpenGL ES.
>         		debug 			Use debug OpenGL.
>         		null  			Use null OpenGL.
>         	dit	type: bool	default: false.
>         	    Use device independent text.
>         	nvpr	type: bool	default: false.
>         	    Use NV_path_rendering OpenGL and OpenGL ES extension.
>         	samples	type: int	default: 0.
>         	    Use multisampling with N samples.
>
>         Predefined configs:
>
>         	gpu      	= gpu()
>         	msaa4    	= gpu(samples=4)
>         	msaa16   	= gpu(samples=16)
>         	nvprmsaa4	= gpu(nvpr=true,samples=4)
>         	nvprmsaa16	= gpu(nvpr=true,samples=16)
>         	gpudft    	= gpu(dit=true)
>         	gpudebug  	= gpu(api=debug)
>         	gpunull   	= gpu(api=null)
>         	debug     	= gpu(api=debug)
>         	nullgpu   	= gpu(api=null)
>
> BUG=skia:2992
>
> Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005
>
> Committed: https://skia.googlesource.com/skia/+/c8b4336444e7b90382e04e33665fb3b8490b825b
>
> Committed: https://skia.googlesource.com/skia/+/9ebc3f0ee6db215dde461dc4777d85988cf272dd

TBR=mtklein@google.com,bsalomon@google.com,joshualitt@google.com,scroggo@google.com,kkinnunen@nvidia.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:2992

Review URL: https://codereview.chromium.org/1548683002
2015-12-22 10:22:26 -08:00
kkinnunen
9ebc3f0ee6 Add config options to run different GPU APIs to dm and nanobench
Add extended config specification form that can be used to run different
gpu backend with different APIs.

The configs can be specified with the form:
gpu(api=string,dit=bool,nvpr=bool,samples=int)

This replaces and removes the --gpuAPI flag.

All existing configs should still work.

Adds following documentation:

out/Debug/dm --help config

Flags:
    --config:	type: string	default: 565 8888 gpu nonrendering
        Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
        nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
        xps or use extended form 'backend(option=value,...)'.

        Extended form: 'backend(option=value,...)'

        Possible backends and options:

        gpu(api=string,dit=bool,nvpr=bool,samples=int)	GPU backend
        	api	type: string	default: native.
        	    Select graphics API to use with gpu backend.
        	    Options:
        		native			Use platform default OpenGL or OpenGL ES backend.
        		gl    			Use OpenGL.
        		gles  			Use OpenGL ES.
        		debug 			Use debug OpenGL.
        		null  			Use null OpenGL.
        	dit	type: bool	default: false.
        	    Use device independent text.
        	nvpr	type: bool	default: false.
        	    Use NV_path_rendering OpenGL and OpenGL ES extension.
        	samples	type: int	default: 0.
        	    Use multisampling with N samples.

        Predefined configs:

        	gpu      	= gpu()
        	msaa4    	= gpu(samples=4)
        	msaa16   	= gpu(samples=16)
        	nvprmsaa4	= gpu(nvpr=true,samples=4)
        	nvprmsaa16	= gpu(nvpr=true,samples=16)
        	gpudft    	= gpu(dit=true)
        	gpudebug  	= gpu(api=debug)
        	gpunull   	= gpu(api=null)
        	debug     	= gpu(api=debug)
        	nullgpu   	= gpu(api=null)

BUG=skia:2992

Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005

Committed: https://skia.googlesource.com/skia/+/c8b4336444e7b90382e04e33665fb3b8490b825b

Review URL: https://codereview.chromium.org/1490113005
2015-12-21 23:48:13 -08:00
bsalomon
2047b78555 Don't ref/unref the static src-over xp
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1540363002

bug=chromium:570301

Review URL: https://codereview.chromium.org/1540363002
2015-12-21 13:12:55 -08:00
joshualitt
4dabf83cbe Revert of Add config options to run different GPU APIs to dm and nanobench (patchset #18 id:340001 of https://codereview.chromium.org/1490113005/ )
Reason for revert:
This CL changed 1200 images on gold, when I wouldn't expect any diffs from the description.

Original issue's description:
> Add config options to run different GPU APIs to dm and nanobench
>
> Add extended config specification form that can be used to run different
> gpu backend with different APIs.
>
> The configs can be specified with the form:
> gpu(api=string,dit=bool,nvpr=bool,samples=int)
>
> This replaces and removes the --gpuAPI flag.
>
> All existing configs should still work.
>
> Adds following documentation:
>
> out/Debug/dm --help config
>
> Flags:
>     --config:	type: string	default: 565 8888 gpu nonrendering
>         Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
>         nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
>         xps or use extended form 'backend(option=value,...)'.
>
>         Extended form: 'backend(option=value,...)'
>
>         Possible backends and options:
>
>         gpu(api=string,dit=bool,nvpr=bool,samples=int)	GPU backend
>         	api	type: string	default: native.
>         	    Select graphics API to use with gpu backend.
>         	    Options:
>         		native			Use platform default OpenGL or OpenGL ES backend.
>         		gl    			Use OpenGL.
>         		gles  			Use OpenGL ES.
>         		debug 			Use debug OpenGL.
>         		null  			Use null OpenGL.
>         	dit	type: bool	default: false.
>         	    Use device independent text.
>         	nvpr	type: bool	default: false.
>         	    Use NV_path_rendering OpenGL and OpenGL ES extension.
>         	samples	type: int	default: 0.
>         	    Use multisampling with N samples.
>
>         Predefined configs:
>
>         	gpu      	= gpu()
>         	msaa4    	= gpu(samples=4)
>         	msaa16   	= gpu(samples=16)
>         	nvprmsaa4	= gpu(nvpr=true,samples=4)
>         	nvprmsaa16	= gpu(nvpr=true,samples=16)
>         	gpudft    	= gpu(dit=true)
>         	gpudebug  	= gpu(api=debug)
>         	gpunull   	= gpu(api=null)
>         	debug     	= gpu(api=debug)
>         	nullgpu   	= gpu(api=null)
>
> BUG=skia:2992
>
> Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005
>
> Committed: https://skia.googlesource.com/skia/+/c8b4336444e7b90382e04e33665fb3b8490b825b

TBR=mtklein@google.com,bsalomon@google.com,scroggo@google.com,kkinnunen@nvidia.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:2992

Review URL: https://codereview.chromium.org/1536963002
2015-12-18 06:02:18 -08:00
kkinnunen
c8b4336444 Add config options to run different GPU APIs to dm and nanobench
Add extended config specification form that can be used to run different
gpu backend with different APIs.

The configs can be specified with the form:
gpu(api=string,dit=bool,nvpr=bool,samples=int)

This replaces and removes the --gpuAPI flag.

All existing configs should still work.

Adds following documentation:

out/Debug/dm --help config

Flags:
    --config:	type: string	default: 565 8888 gpu nonrendering
        Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
        nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
        xps or use extended form 'backend(option=value,...)'.

        Extended form: 'backend(option=value,...)'

        Possible backends and options:

        gpu(api=string,dit=bool,nvpr=bool,samples=int)	GPU backend
        	api	type: string	default: native.
        	    Select graphics API to use with gpu backend.
        	    Options:
        		native			Use platform default OpenGL or OpenGL ES backend.
        		gl    			Use OpenGL.
        		gles  			Use OpenGL ES.
        		debug 			Use debug OpenGL.
        		null  			Use null OpenGL.
        	dit	type: bool	default: false.
        	    Use device independent text.
        	nvpr	type: bool	default: false.
        	    Use NV_path_rendering OpenGL and OpenGL ES extension.
        	samples	type: int	default: 0.
        	    Use multisampling with N samples.

        Predefined configs:

        	gpu      	= gpu()
        	msaa4    	= gpu(samples=4)
        	msaa16   	= gpu(samples=16)
        	nvprmsaa4	= gpu(nvpr=true,samples=4)
        	nvprmsaa16	= gpu(nvpr=true,samples=16)
        	gpudft    	= gpu(dit=true)
        	gpudebug  	= gpu(api=debug)
        	gpunull   	= gpu(api=null)
        	debug     	= gpu(api=debug)
        	nullgpu   	= gpu(api=null)

BUG=skia:2992

Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005

Review URL: https://codereview.chromium.org/1490113005
2015-12-18 03:27:32 -08:00
bsalomon
f0795ab1f2 Fix thread-unsafe construction of GrUniqueKey in GR_DEFINE_STATIC_UNIQUE_KEY
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1530313002

Review URL: https://codereview.chromium.org/1530313002
2015-12-17 08:15:47 -08:00
bsalomon
f46a124ddd Set GL_PACK_ALIGNMENT before calling glReadPixels
Review URL: https://codereview.chromium.org/1525193002
2015-12-15 12:37:38 -08:00
bsalomon
489147c78b Add option to control maximum GrBatch lookback
Review URL: https://codereview.chromium.org/1498653002
2015-12-14 12:13:09 -08:00
reed
4ff653cab2 Revert of Add config options to run different GPU APIs to dm and nanobench (patchset #12 id:220001 of https://codereview.chromium.org/1490113005/ )
Reason for revert:
speculative revert to see if it unblocks the DEPS roll

https://codereview.chromium.org/1529443002

Original issue's description:
> Add config options to run different GPU APIs to dm and nanobench
>
> Add extended config specification form that can be used to run different
> gpu backend with different APIs.
>
> The configs can be specified with the form:
> gpu(api=string,dit=bool,nvpr=bool,samples=int)
>
> This replaces and removes the --gpuAPI flag.
>
> All existing configs should still work.
>
> Adds following documentation:
>
> out/Debug/dm --help config
>
> Flags:
>     --config:	type: string	default: 565 8888 gpu nonrendering
>         Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
>         nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
>         xps or use extended form 'backend(option=value,...)'.
>
>         Extended form: 'backend(option=value,...)'
>
>         Possible backends and options:
>
>         gpu(api=string,dit=bool,nvpr=bool,samples=int)	GPU backend
>         	api	type: string	default: native.
>         	    Select graphics API to use with gpu backend.
>         	    Options:
>         		native			Use platform default OpenGL or OpenGL ES backend.
>         		gl    			Use OpenGL.
>         		gles  			Use OpenGL ES.
>         		debug 			Use debug OpenGL.
>         		null  			Use null OpenGL.
>         	dit	type: bool	default: false.
>         	    Use device independent text.
>         	nvpr	type: bool	default: false.
>         	    Use NV_path_rendering OpenGL and OpenGL ES extension.
>         	samples	type: int	default: 0.
>         	    Use multisampling with N samples.
>
>         Predefined configs:
>
>         	gpu      	= gpu()
>         	msaa4    	= gpu(samples=4)
>         	msaa16   	= gpu(samples=16)
>         	nvprmsaa4	= gpu(nvpr=true,samples=4)
>         	nvprmsaa16	= gpu(nvpr=true,samples=16)
>         	gpudft    	= gpu(dit=true)
>         	gpudebug  	= gpu(api=debug)
>         	gpunull   	= gpu(api=null)
>         	debug     	= gpu(api=debug)
>         	nullgpu   	= gpu(api=null)
>
> BUG=skia:2992
>
> Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23

TBR=bsalomon@google.com,scroggo@google.com,joshualitt@google.com,kkinnunen@nvidia.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:2992

Review URL: https://codereview.chromium.org/1528473002
2015-12-14 05:58:25 -08:00
kkinnunen
e13ca329fc Add config options to run different GPU APIs to dm and nanobench
Add extended config specification form that can be used to run different
gpu backend with different APIs.

The configs can be specified with the form:
gpu(api=string,dit=bool,nvpr=bool,samples=int)

This replaces and removes the --gpuAPI flag.

All existing configs should still work.

Adds following documentation:

out/Debug/dm --help config

Flags:
    --config:	type: string	default: 565 8888 gpu nonrendering
        Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
        nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
        xps or use extended form 'backend(option=value,...)'.

        Extended form: 'backend(option=value,...)'

        Possible backends and options:

        gpu(api=string,dit=bool,nvpr=bool,samples=int)	GPU backend
        	api	type: string	default: native.
        	    Select graphics API to use with gpu backend.
        	    Options:
        		native			Use platform default OpenGL or OpenGL ES backend.
        		gl    			Use OpenGL.
        		gles  			Use OpenGL ES.
        		debug 			Use debug OpenGL.
        		null  			Use null OpenGL.
        	dit	type: bool	default: false.
        	    Use device independent text.
        	nvpr	type: bool	default: false.
        	    Use NV_path_rendering OpenGL and OpenGL ES extension.
        	samples	type: int	default: 0.
        	    Use multisampling with N samples.

        Predefined configs:

        	gpu      	= gpu()
        	msaa4    	= gpu(samples=4)
        	msaa16   	= gpu(samples=16)
        	nvprmsaa4	= gpu(nvpr=true,samples=4)
        	nvprmsaa16	= gpu(nvpr=true,samples=16)
        	gpudft    	= gpu(dit=true)
        	gpudebug  	= gpu(api=debug)
        	gpunull   	= gpu(api=null)
        	debug     	= gpu(api=debug)
        	nullgpu   	= gpu(api=null)

BUG=skia:2992

Review URL: https://codereview.chromium.org/1490113005
2015-12-14 04:49:17 -08:00
robertphillips
2eb1009b6e Add check for highp support in Conic effect
This CL may not really be necessary since it seems that the Android Ones we have fall back to mediump when highp isn't supported.

FYI, for bits-of-precision/precision we have:

                        Low Med High Precision-Used
A1 (Cherry One - Mali 400) 10 10 0  Med        - conic looks bad
N5 (Adreno 330)            10 10 23 High       - conic looks bad!!!
N6 (Adreno 420)            10 10 23 High       - conic looks good
N7v2 (Adreno 320)          10 10 23 High       - conic looks bad!!!
N9 (K1)                    23 23 23 High       - looks good
N10 (Mail-604)             10 10 23 High       - looks good

I suspect derivative computation is broken on the Adreno 300s.

BUG=555779,skia:4668
TBR=bsalomon@google.com

Review URL: https://codereview.chromium.org/1513573009
2015-12-11 04:59:36 -08:00
joshualitt
2e2202e95e Move flush logic into GrAtlasTextBlob
TBR=bsalomon@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/1518763002
2015-12-10 11:22:08 -08:00
jvanverth
0671b967eb Move texture drawing utility method to SkGpuDevice
BUG=skia:4542

Review URL: https://codereview.chromium.org/1506203002
2015-12-08 18:53:44 -08:00
cdalton
8ff8d24c83 Remove drawPathsFromRange from GrDrawContext
Replaces drawPathsFromRange with a more general drawPathBatch method.
While this still isn't perfect, it's a step in the right direction that
removes the need for path range draws to fit in a public API.

BUG=skia:

Review URL: https://codereview.chromium.org/1506823004
2015-12-08 10:20:32 -08:00
joshualitt
91d0620586 fix mozilla bug
TBR=bsalomon@google.com
BUG=skia:4621

Review URL: https://codereview.chromium.org/1500023002
2015-12-04 08:51:11 -08:00
robertphillips
433625e67c Reduce calls sites where both the GrDrawContext & GrRenderTarget are both passed
TBR=bsalomon@google.com

Review URL: https://codereview.chromium.org/1494083003
2015-12-04 06:58:16 -08:00
bsalomon
6dea83f244 Add option to draw wireframe batch bounds
Committed: https://skia.googlesource.com/skia/+/26489ef21ff5df33b8cb5943fddfd4604e203960

Review URL: https://codereview.chromium.org/1494473005
2015-12-03 12:58:06 -08:00
scroggo
e2725f5840 Revert of Add option to draw wireframe batch bounds (patchset #6 id:100001 of https://codereview.chromium.org/1494473005/ )
Reason for revert:
Looks to be responsible for breaking builds e.g. https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Mac10.9-Clang-MacMini6.2-GPU-HD4000-x86_64-Debug/builds/3030/steps/dm/logs/stdio

Original issue's description:
> Add option to draw wireframe batch bounds
>
> Committed: https://skia.googlesource.com/skia/+/26489ef21ff5df33b8cb5943fddfd4604e203960

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

Review URL: https://codereview.chromium.org/1492633007
2015-12-03 10:30:34 -08:00
bsalomon
26489ef21f Add option to draw wireframe batch bounds
Review URL: https://codereview.chromium.org/1494473005
2015-12-03 09:36:49 -08:00
joshualitt
dc5685ac37 Wire up resource cache stats dumping in nanobench
TBR=bsalomon@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/1495543003
2015-12-02 14:08:25 -08:00
joshualitt
f16f88b779 Create a define for nanobench builds to dump stats
TBR=bsalomon@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/1499453002
2015-12-02 13:00:37 -08:00
joshualitt
e45c81c8f3 Began logging more gpu stats from nanobench
BUG=skia:

Review URL: https://codereview.chromium.org/1489033004
2015-12-02 09:05:38 -08:00
robertphillips
7bceedc550 Retract GrRenderTarget a bit
These sites don't necessarily need the full power of a GrRenderTarget object. This is a clean up for switching over to GrRenderTargetProxys.

Review URL: https://codereview.chromium.org/1486923004
2015-12-01 12:51:26 -08:00
bsalomon
69cfe95b7b Add debug option to clip each GrBatch to its device bounds
Review URL: https://codereview.chromium.org/1471083002
2015-11-30 13:27:47 -08:00
egdaniel
56cf6dcb65 Create a static instances of SrcOver XferProcessor
BUG=skia:

Review URL: https://codereview.chromium.org/1471293003
2015-11-30 10:15:58 -08:00
ethannicholas
de4166a3b4 APIs which took colorPOI / coveragePOI pairs updated to take a GrPipelineOptimizations struct
TBR=bsalomon@google.com

Review URL: https://codereview.chromium.org/1480353002
2015-11-30 08:57:38 -08:00
bsalomon
bf07455533 Make stencil and cover path rendering have more reasonable bounds.
BUG=skia:

Review URL: https://codereview.chromium.org/1471883002
2015-11-23 14:25:20 -08:00
egdaniel
c4b72720e7 Don't create a GXPFactory when blend is SrcOver
BUG=skia:

Review URL: https://codereview.chromium.org/1471053002
2015-11-23 13:20:42 -08:00
bsalomon
7ea33f5e1a Initial version of external_oes texture support and unit test
Committed: https://skia.googlesource.com/skia/+/27a048700778d4cebfc23301d1780649791b0e03

Review URL: https://codereview.chromium.org/1451683002
2015-11-22 14:51:00 -08:00
bsalomon
0315dbcb55 Revert of Initial version of external_oes texture support and unit test (patchset #14 id:260001 of https://codereview.chromium.org/1451683002/ )
Reason for revert:
Error wrapping external texture in GrTexture on some devices.

Original issue's description:
> Initial version of external_oes texture support and unit test
>
> Committed: https://skia.googlesource.com/skia/+/27a048700778d4cebfc23301d1780649791b0e03

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

Review URL: https://codereview.chromium.org/1459323004
2015-11-20 20:24:31 -08:00
bsalomon
27a0487007 Initial version of external_oes texture support and unit test
Review URL: https://codereview.chromium.org/1451683002
2015-11-20 19:34:37 -08:00
egdaniel
f234272cbd Revert of Make specialized SrcOver XPFactory (patchset #3 id:40001 of https://codereview.chromium.org/1455273006/ )
Reason for revert:
breaking some builds

Original issue's description:
> Make specialized SrcOver XPFactory
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/a7006d45217d128a94fa53cb4b827cca79bc7049

TBR=bsalomon@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1464933003
2015-11-20 15:12:59 -08:00
egdaniel
a7006d4521 Make specialized SrcOver XPFactory
BUG=skia:

Review URL: https://codereview.chromium.org/1455273006
2015-11-20 14:01:07 -08:00
mtklein
1d02a60fec Remove unsigned < signed comparison.
This triggers -Wsign-compare on some builds.
Not sure why none of those builds have -Werror set.

BUG=skia:4561

Review URL: https://codereview.chromium.org/1464543002
2015-11-19 09:53:22 -08:00
Brian Salomon
e416d940c6 Change prealloc number of child FPs be 1 rather than 2
TBR=joshualitt@google.com

Review URL: https://codereview.chromium.org/1458913003 .
2015-11-19 11:04:48 -05:00
bsalomon
418e26f86c Preallocate room for 2 child processors in FPs
Review URL: https://codereview.chromium.org/1456263003
2015-11-19 08:02:09 -08:00
joshualitt
33a5fce612 Initial implementation of GPU no filter NinePatch
TBR=bsalomon@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/1454933002
2015-11-18 13:28:51 -08:00
robertphillips
504ce5dc77 Optionally pass rendertarget to getTestTarget
This shouldn't really make any difference but allocating and holding on to a GrRenderTarget for each test target generates image differences for Mali GPUs. This CL allows an existing render target to be used for the test target.

TBR=bsalomon@google.com

Review URL: https://codereview.chromium.org/1447113002
2015-11-16 11:02:05 -08:00
robertphillips
e004bfc0a5 Increase the amount of debug information printed out by batches
Untangling MDB bugs requires more information. In particular the render targets.

BUG=skia:4094
TBR=bsalomon@google.com

Review URL: https://codereview.chromium.org/1443763002
2015-11-16 09:06:59 -08:00
bsalomon
a779ef1677 Fix for chrome's skia gl bindings code.
TBR=egdaniel@google.com
NOTRY=true

Review URL: https://codereview.chromium.org/1451743002
2015-11-16 08:28:21 -08:00
bsalomon
b1a32ad517 Add support for EGLImage to GrGLInterface
BUG=skia:

Review URL: https://codereview.chromium.org/1434813002
2015-11-16 06:48:44 -08:00
egdaniel
57d3b039c6 Rename some processor functions from GL to GLSL
TBR=bsalomon@google.com

BUG=skia:

Review URL: https://codereview.chromium.org/1443743002
2015-11-13 11:57:27 -08:00
egdaniel
fa4cc8bf2a Move XferProcessors to glsl
This is basically a move and rename

TBR=bsalomon@google.com

BUG=skia:

Review URL: https://codereview.chromium.org/1440073002
2015-11-13 08:34:52 -08:00
egdaniel
64c4728c70 Make all GrFragmentProcessors GL independent.
TBR=bsalomon@google.com

BUG=skia:

Review URL: https://codereview.chromium.org/1434313002
2015-11-13 06:54:19 -08:00
cdalton
c94cd7cc01 Fix GrCoverageSetOpXP unit test on mixed samples
Updates GrCoverageSetOpXPFactory::TestCreate to not invert coverage
with mixed samples, which is an unsupported configuration.

TBR=bsalomon@google.com

BUG=skia:4556

Review URL: https://codereview.chromium.org/1442763002
2015-11-12 12:11:04 -08:00
cdalton
7e806f3f8a Revert of Enable stencil clipping in mixed sampled render targets (patchset #6 id:100001 of https://codereview.chromium.org/1232103002/ )
Reason for revert:
Co-centered sample locations are not needed to do stencil clip with mixed samples

Original issue's description:
> Implement stencil clipping in mixed sampled render targets
>
> This change enables multisampled clipping for mixed sampled
> render targets.  Previously clipping in mixed samples config
> behaved the same as in the gpu config.
>
> In order to retrofit non-MSAA draw methods, programmable sample
> locations are used in order to colocate all samples at (0.5, 0.5).
> Requires support for NV_sample_locations.
>
> BUG=skia:4399
>
> Committed:
> https://skia.googlesource.com/skia/+/3e77ba96d56d15db30ac6d8ccb900e30aafcbb16

BUG=skia:

Review URL: https://codereview.chromium.org/1415873011
2015-11-11 15:16:07 -08:00
cdalton
24ddb0a4dd Revert of Fix setColocatedSampleLocations on ES and GL < 4.5 (patchset #2 id:20001 of https://codereview.chromium.org/1415503008/ )
Reason for revert:
Co-centered sample locations are not needed to do stencil clip with mixed samples.

Original issue's description:
> Fix setColocatedSampleLocations on ES and GL < 4.5
>
> Updates setColocatedSampleLocations to use glFramebufferParameteri
> when
> the DSA version glNamedFramebufferParameteri is not present.
>
> BUG=skia:
>
> Committed:
> https://skia.googlesource.com/skia/+/98cad6219b430eddf5528473311279f21dbd2e10

BUG=skia:

Review URL: https://codereview.chromium.org/1420883007
2015-11-11 15:03:46 -08:00
robertphillips
caef345048 Readd "immediate" mode
This isn't an exact replacement. The accumulated batches are now flushed at drawContext-entry-point granularity (via the AutoCheckFlush objects) rather than per batch.

TBR=bsalomon@google.com

Review URL: https://codereview.chromium.org/1439533003
2015-11-11 13:18:11 -08:00
robertphillips
a13e202563 Move GrBatchFlushState from GrDrawTarget to GrDrawingManager
This CL:
  moves the flushState
  disables immediate mode (it was proving difficult to implement)
  also moves the program unit test to the drawing manager

BUG=skia:4094
TBR=bsalomon@google.com

Review URL: https://codereview.chromium.org/1437843002
2015-11-11 12:01:09 -08:00
cdalton
d472792a72 Revert of Fix mixed samples stencil clip (patchset #5 id:80001 of https://codereview.chromium.org/1431593006/ )
Reason for revert:
Co-centered sample locations are not needed to do stencil clip with mixed samples.

Original issue's description:
> Fix mixed samples stencil clip
>
> Fixes rendering bugs and nondeterminism in gm.
>
> Before, mixed samples stencil clip would try to infer whether the draw
> wanted co-centered sample locations from within GrGLGpu, which caused
> various errors. This change reworks it so the draw itself can request
> the co-centered sample locations when it knows it will need them.
>
> Also reduces framebuffer binds by moving the code that enables
> GL_FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS into flushRenderTarget.
>
> Committed: https://skia.googlesource.com/skia/+/14184d5567b58085b6d8a6375796d405056f7f73

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

Review URL: https://codereview.chromium.org/1407063011
2015-11-10 12:49:06 -08:00
bsalomon
091f60c2a0 Use a struct for client GL texture handles
Review URL: https://codereview.chromium.org/1429863009
2015-11-10 11:54:57 -08:00
reed
d9ffaed6d2 apply mozilla patch
BUG=skia:4547

Review URL: https://codereview.chromium.org/1421793009
2015-11-10 04:55:08 -08:00
cdalton
14184d5567 Fix mixed samples stencil clip
Fixes rendering bugs and nondeterminism in gm.

Before, mixed samples stencil clip would try to infer whether the draw
wanted co-centered sample locations from within GrGLGpu, which caused
various errors. This change reworks it so the draw itself can request
the co-centered sample locations when it knows it will need them.

Also reduces framebuffer binds by moving the code that enables
GL_FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS into flushRenderTarget.

Review URL: https://codereview.chromium.org/1431593006
2015-11-09 15:12:19 -08:00
jvanverth
629162dd8e Add text animation sample; tweak DrawShip sample
Committed: https://skia.googlesource.com/skia/+/3b484a40b3be7f0262afadeaf6b741ba5cedcfe1

Review URL: https://codereview.chromium.org/1410663005
2015-11-08 08:07:24 -08:00
jvanverth
d75ccc6a0a Revert of Add text animation sample; tweak DrawShip sample (patchset #3 id:40001 of https://codereview.chromium.org/1410663005/ )
Reason for revert:
CrOS bots failing.

Original issue's description:
> Add text animation sample; tweak DrawShip sample
>
> Committed: https://skia.googlesource.com/skia/+/3b484a40b3be7f0262afadeaf6b741ba5cedcfe1

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

Review URL: https://codereview.chromium.org/1408063015
2015-11-06 16:10:34 -08:00
jvanverth
3b484a40b3 Add text animation sample; tweak DrawShip sample
Review URL: https://codereview.chromium.org/1410663005
2015-11-06 14:20:04 -08:00
cdalton
63f6c1fc5b Loosen requirements for mixed samples support
Quits requiring EXT_raster_multisample and
NV_sample_mask_override_coverage for mixed samples support. This will
allow platforms without those latter extensions (i.e. Chrome) to still
use mixed samples for path rendering. Also moves the mixed samples cap
out of shader caps, since it no longer denotes shader functionality.

BUG=skia:

Review URL: https://codereview.chromium.org/1410383011
2015-11-06 07:09:43 -08:00
bsalomon
a2e69fcded Rename non-aa rect methods on GrDrawContext in anticipation of making them support aa
R=joshualitt@google.com

Review URL: https://codereview.chromium.org/1409753008
2015-11-05 10:41:43 -08:00
joshualitt
65d6fbb576 Create SDL backed SkOSWindow
BUG=skia:

Review URL: https://codereview.chromium.org/1413593007
2015-11-04 13:41:02 -08:00
egdaniel
b7e7d5748d Create swizzle table inside of glsl caps
BUG=skia:

Committed: https://skia.googlesource.com/skia/+/4036674952f341dab0695c3b054fefa5bb8cdec1

Review URL: https://codereview.chromium.org/1420033005
2015-11-04 04:23:53 -08:00
egdaniel
0c2999974d Revert of Create swizzle table inside of glsl caps (patchset #12 id:210001 of https://codereview.chromium.org/1420033005/ )
Reason for revert:
Breaking gm's on nexus7 and s3

Original issue's description:
> Create swizzle table inside of glsl caps
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/4036674952f341dab0695c3b054fefa5bb8cdec1

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

Review URL: https://codereview.chromium.org/1426653008
2015-11-03 10:33:14 -08:00
cdalton
98cad6219b Fix setColocatedSampleLocations on ES and GL < 4.5
Updates setColocatedSampleLocations to use glFramebufferParameteri when
the DSA version glNamedFramebufferParameteri is not present.

BUG=skia:

Review URL: https://codereview.chromium.org/1415503008
2015-11-03 09:33:21 -08:00
egdaniel
4036674952 Create swizzle table inside of glsl caps
BUG=skia:

Review URL: https://codereview.chromium.org/1420033005
2015-11-03 08:15:29 -08:00
bsalomon
8c07b7ab53 Allow max tile size to be overridden separately from max texture size.
This allows internal Gr texture creation code to succeed for extraneous textures while running the bleed GM. This means we can turn on the shader variants.

Review URL: https://codereview.chromium.org/1418473004
2015-11-02 11:36:52 -08:00
robertphillips
498d7ac86b Dependencies are now added between the drawTargets in GrPipeline
This CL relies on https://codereview.chromium.org/1414773002/ (Add the machinery to GrDrawTarget to enable topological sorting)

BUG=skia:4094

Committed: https://skia.googlesource.com/skia/+/45a1c34f607a970933e5cd05e1df6cd8090db1be

Committed: https://skia.googlesource.com/skia/+/869c5e82a725a6928a45cd1fa6945ac783b8b3d8

Review URL: https://codereview.chromium.org/1414903002
2015-10-30 10:11:30 -07:00
robertphillips
687378229a Remove GrPipelineBuilder from getPathRenderer call
Logically this CL:

Moves the PathRendererChain from GrContext to GrDrawManager
   - this was needed to untangled the Path-Chain/Renderer header mess
   - this entailed adding getDrawingMgr so the CMM could access the PathRenderingChain
   - this also entailed re-adding freeGpuResources to the GrDrawingMgr
Moves the CanDrawArgs struct up stack
Removes the GrPipelineBuilder from the CanDrawArgs struct

Review URL: https://codereview.chromium.org/1407883004
2015-10-29 12:12:21 -07:00
bsalomon
100b8f8c07 Remove min texture size support
BUG=skia:4524

Review URL: https://codereview.chromium.org/1430643002
2015-10-28 08:37:44 -07:00
robertphillips
cf10b5a432 Cosmetic portion of reverted "Fix ClipMaskManager's SW-fallback logic" CL
This CL isolates the cosmetic portion so the functional portion is clearer. It relies on https://codereview.chromium.org/1412883005/ (Fix ClipMaskManager's SW-fallback logic (take 2))

Review URL: https://codereview.chromium.org/1422023003
2015-10-27 07:53:35 -07:00
robertphillips
24cdec1744 Revert of Fix ClipMaskManager's SW-fallback logic (patchset #4 id:60001 of https://codereview.chromium.org/1421533007/ )
Reason for revert:
Logic may be incorrect

Original issue's description:
> Fix ClipMaskManager's SW-fallback logic
>
>
> 'useSWOnlyPath' was not correctly toggling between stencil and color draws so there was a mismatch with the behavior in createAlphaClipMask (i.e., we were inadvertently rendering some of the elements in a clip using SW but using stenciling for others - precisely what 'useSWOnlyPath' was intended to prevent).
>
> Committed: https://skia.googlesource.com/skia/+/5c3ea4cd3921e8904d4f201bcdedfd5b8a726542

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

Review URL: https://codereview.chromium.org/1426443008
2015-10-26 14:12:25 -07:00