Commit Graph

1603 Commits

Author SHA1 Message Date
senorblanco
f5575463f4 Remove some unnecessary #includes of SkImageFilter.h
R=robertphillips@google.com
TBR=reed@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1907283002

Review URL: https://codereview.chromium.org/1907283002
2016-04-22 07:36:12 -07:00
kkinnunen
2e6055b3ea Refactor to separate backend object lifecycle and GpuResource budget decision
Refactor GrGpuResource to contain two different pieces of state:
 a) instance is budgeted or not budgeted
 b) instance references wrapped backend objects or not

The "object lifecycle" was also attached to backend object
handles (ids), which made the code a bit unclear. Backend objects
would be associated with GrGpuResource::LifeCycle, even though
GrGpuResource::LifeCycle refers to the GpuResource, and individual
backend objects in one GpuResource might be governed with different
"lifecycle".

Mark the budgeted/not budgeted with SkBudgeted::kYes, SkBudgeted::kNo.
This was previously GrGpuResource::kCached_LifeCycle,
GrGpuResource::kUncached_LifeCycle.

Mark the "references wrapped object" with boolean. This was previously
GrGpuResource::kBorrowed_LifeCycle,
GrGpuResource::kAdopted_LifeCycle for GrGpuResource.

Associate the backend object ownership status with
GrBackendObjectOwnership for the backend object handles.

The resource type leaf constuctors, such has GrGLTexture or
GrGLTextureRenderTarget take "budgeted" parameter. This parameter
is passed to GrGpuResource::registerWithCache().

The resource type intermediary constructors, such as GrGLTexture
constructors for class GrGLTextureRenderTarget do not take "budgeted"
parameters, intermediary construtors do not call registerWithCache.

Removes the need for tagging GrGpuResource -derived subclass
constructors with "Derived" parameter.

Makes instances that wrap backend objects be registered with
a new function GrGpuResource::registerWithCacheWrapped().

Removes "budgeted" parameter from classes such as StencilAttahment, as
they are always cached and never wrap any external backend objects.

Removes the use of concept "external" from the member function names.
The API refers to the objects as "wrapped", so make all related
functions use the term consistently.

No change in functionality. Resources referencing wrapped objects are
always inserted to the cache with budget decision kNo.

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

Review URL: https://codereview.chromium.org/1862043002
2016-04-22 01:48:29 -07:00
jvanverth
b0d4352ca6 Revise WSI setup.
- Set up present queue creation correctly.
- Move WSI functions to VulkanTestContext.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1899213002

Review URL: https://codereview.chromium.org/1899213002
2016-04-21 11:46:23 -07:00
egdaniel
58a8d9214a Update min Vulkan version to 1.0.8.0, and fix various bugs
With updating the SDK, the debug layers also showed multiple bugs.
I have fixed those as well in this CL. These include:

1. Incorrectly tracking the allocated descriptor sets from the descriptor pools

2. Using MemoryBarriers inside render passes.

3. Correctly setting the Stencil Image layout anytime we are using a render pass with a stencil attachment

4. Setting the correct aspect mask for Depth/Stencil in a barrier.

TBR=bsalomon@google.com

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

Review URL: https://codereview.chromium.org/1906623002
2016-04-21 08:03:10 -07:00
egdaniel
09aa1fce69 Refactor how we store and use samplers in Ganesh
The main goal of this refactorization is to allow Vulkan to use separate
sampler and texture objects in the shader and descriptor sets and combine
them into a sampler2d in the shader where needed.

A large part of this is separating how we store samplers and uniforms in the
UniformHandler. We no longer need to store handles to samplers besides when
we are initially emitting code. After we emit code all we ever do is loop over
all samplers and do some processor independent work on them, so we have no need
for direct access to individual samplers.

In the GLProgram all we ever do is set the sampler uniforms in the ctor and never
touch them again, so no need to save sampler info there. The texture access on
program reuse just assume that they come in the same order as we set the texture
units for the samplers

For Vulkan, it is a similar story. We create the descriptor set layouts with the samplers,
then when we get new textures, we just assume they come in in the same order as we
set the samplers on the descriptor sets. Thus no need to save direct vulkan info.

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

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

Review URL: https://codereview.chromium.org/1885863004
2016-04-20 07:09:46 -07:00
svaisanen
b988ecf639 Enable NV_path_rendering in the Null GL.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1882563002

Review URL: https://codereview.chromium.org/1882563002
2016-04-20 00:36:53 -07:00
mtklein
d9dd428211 Modernize and trim down SkOnce.
The API and implementation are very much simplified.
You may not want to bother reading the diff.

As is our trend, SkOnce now uses <atomic> directly.

Member initialization means we don't need SK_DECLARE_STATIC_ONCE.
SkSpinlock already works this same way.

All uses of the old API taking an external bool* and Lock* were pessimal,
so I have not carried this sort of API forward.  It's simpler, faster,
and more space-efficient to always use this single SkOnce class interface.

SkOnce weighs 2 bytes: a done bool and an SkSpinlock, also a bool internally.
This API refactoring opens up the opportunity to fuse those into a single
three-state byte if we'd like.

No public API changes.
TBR=reed@google.com

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

Review URL: https://codereview.chromium.org/1894893002
2016-04-18 08:09:11 -07:00
bsalomon
7e68ab7318 Remove GrTextureStorageAllocator. This was added from Chromium but never used and not expected to be used.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1886613003

Review URL: https://codereview.chromium.org/1886613003
2016-04-13 14:29:25 -07:00
brianosman
0e3c55431b Tweak distance field path renderer behavior in gamma-correct mode to match
recent changes to text rendering.

Uses linear coverage falloff. Produces results that are perceptually more
similar to L32 (raster and gpu). Smoothstep + sRGB was too soft.

Plumb the gamma-correctness via DrawPathArgs, which also paves the way for
other path rendering implementations to easily make decisions about rendering
technique based on that flag.

Fix a few typos and formatting issues from my most recent change.

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

Review URL: https://codereview.chromium.org/1889453002
2016-04-13 13:56:21 -07:00
brianosman
b461d34575 Rename lots of things from 'sRGB' to 'GammaCorrect', where appropriate
Trying to be much more explicit about where we really mean sRGB as a format,
and where we mean gamma-correct, as in: "not legacy behavior". Most of the
changes to rendering behavior are dependent on the latter, so let's be precise.

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

Review URL: https://codereview.chromium.org/1884873006
2016-04-13 13:10:14 -07:00
cdalton
74b8d32332 Implement texel buffers
Adds a mechanism for processors to add buffer accesses and implements
them in the GL backend.

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

Review URL: https://codereview.chromium.org/1870893002
2016-04-11 14:47:28 -07:00
cdalton
f8a6ce8d8c Add GLSL support for texelFetch
Adds a cap and builder methods for texelFetch. This is required for
texel buffers. Also moves the texel buffer cap into the general shader
caps, and adds glTexBufferRange to the GL interface.

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

Review URL: https://codereview.chromium.org/1869063005
2016-04-11 13:02:05 -07:00
cdalton
a6b92ad1f7 Infer sampler precision from pixel config
Adds a "samplerPrecision" method to GrGLSLCaps and updates
GrGLSLProgramBuilder to infer a sampler's precision based on its
config and visibility.

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

Review URL: https://codereview.chromium.org/1846963004
2016-04-11 12:03:08 -07:00
cdalton
e2e71c2df4 Track GL buffer state based on unique resource ID
Reworks GrGLGpu to track GL buffer state based on the unique
GrGpuResource ID. This eliminates the need to notify the gpu object
whenever a buffer is deleted.

This change also allows us to remove the type specifier from GrBuffer.
At this point a buffer is just a chunk of memory, and the type
given at creation time is just a suggestion to the GL backend about
which target to bind to for updates.

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

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

Review URL: https://codereview.chromium.org/1854283004
2016-04-07 18:13:29 -07:00
robertphillips
73add93a9c Appease valgrind wrt testing code initialization
The new swarming valgrind bot appears to be higher maintenance. These changes seem harmless and will, hopefully, unblock the bot.

TBR=bsalomon@google.com

https://build.chromium.org/p/client.skia.fyi/builders/Test-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-SwarmingValgrind/builds/57

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

Review URL: https://codereview.chromium.org/1867053002
2016-04-07 09:01:20 -07:00
mtklein
044d3c1858 Revert of Track GL buffer state based on unique resource ID (patchset #6 id:100001 of https://codereview.chromium.org/1854283004/ )
Reason for revert:
Chrome roll's broken, seems to be missing fTarget:

https://codereview.chromium.org/1861473005

Original issue's description:
> Track GL buffer state based on unique resource ID
>
> Reworks GrGLGpu to track GL buffer state based on the unique
> GrGpuResource ID. This eliminates the need to notify the gpu object
> whenever a buffer is deleted.
>
> This change also allows us to remove the type specifier from GrBuffer.
> At this point a buffer is just a chunk of memory, and the type
> given at creation time is just a suggestion to the GL backend about
> which target to bind to for updates.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1854283004
>
> Committed: https://skia.googlesource.com/skia/+/deacc97bc63513b5eacaf21f858727f6e8b98ce5

TBR=bsalomon@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/1870553002
2016-04-06 18:24:34 -07:00
cdalton
deacc97bc6 Track GL buffer state based on unique resource ID
Reworks GrGLGpu to track GL buffer state based on the unique
GrGpuResource ID. This eliminates the need to notify the gpu object
whenever a buffer is deleted.

This change also allows us to remove the type specifier from GrBuffer.
At this point a buffer is just a chunk of memory, and the type
given at creation time is just a suggestion to the GL backend about
which target to bind to for updates.

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

Review URL: https://codereview.chromium.org/1854283004
2016-04-06 14:26:34 -07:00
brianosman
898235c486 SkSurfaceProps now has a gamma-correct ("AllowSRGBInputs") flag. That's propagated in a few places so that the backend can do the right thing for L32 vs S32 mode.
Also added SkSurfaceProps to SkSpecialImage, so that Image -> Surface conversion can preserve the desired behavior during filtering.

Many small changes, including a bunch of comments about places where we may be losing information right now. My approach was to ensure that if anything fails, it will always fall back to "legacy" mode - gamma-correctness is opt-in, so I'll just have to feed things through as missing cases are exposed.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1838953007

Review URL: https://codereview.chromium.org/1845283003
2016-04-06 07:38:23 -07:00
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