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
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
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
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/+/14184d5567b58085b6d8a6375796d405056f7f73TBR=bsalomon@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/1407063011
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
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
Updates setColocatedSampleLocations to use glFramebufferParameteri when
the DSA version glNamedFramebufferParameteri is not present.
BUG=skia:
Review URL: https://codereview.chromium.org/1415503008
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
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
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/+/5c3ea4cd3921e8904d4f201bcdedfd5b8a726542TBR=bsalomon@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/1426443008
'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).
Review URL: https://codereview.chromium.org/1421533007
Fix a crash in dm when run with Chromium command buffer driver.
Also removes glCopyTextureCHROMIUM, it does not seem to be used.
This is removed on the grounds that it would need similar change,
if it was used. The variable fCopyTextureCHROMIUM does not seem to
be populated in the Chromium side, either.
BUG=skia:2992
Review URL: https://codereview.chromium.org/1389213004
per-glyph GPU path object, but rather store a key for looking it up in
the resource cache. This allows the cache to purge glyphs when needed.
Also indirectly fixes a memory leak that was introduced with nvpr text
blobs.
BUG=skia:
Review URL: https://codereview.chromium.org/1374853004
This CL moves the allocation and storage of the GrTextContexts into the DrawingManager. The GrDrawContexts now just get their GrTextContext from the DrawingManager.
Review URL: https://codereview.chromium.org/1375153007
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
Review URL: https://codereview.chromium.org/1232103002
One side effect is that the SkShader's (or implicit shader's) fragment processor is responsible for the transition from an unpremul paint color to a premul color.
Review URL: https://codereview.chromium.org/1348583002
This CL removes the uses of SkNEW that have resprouted since commit
385fe4d, and removes the macros entirely now that Android and Chromium
have been cleaned up to no longer depend on them.
A bunch of files implicitly depend on #include <new> from SkPostConfig.h
still though, so keep that for now. To be fixed in a followup CL.
[mtklein mucking around]
Only public API removed.
TBR=reed@google.com
Review URL: https://codereview.chromium.org/1360653004
The new FP is used to implement SkXM::Mode color filters and SkXM::Mode image filters. Also, these now support all advanced SkXM::Mode xfermodes.
Review URL: https://codereview.chromium.org/1334293003
Adds an entry point to GrContext to allow enumeration and tracing of GPU resources
via the newly added SkTraceMemoryDump.
Plan is for Chrome to call this on each of its GrContexts.
Dumps both the total size of GPU resources, as well as the total purgeable size.
BUG=526261
Review URL: https://codereview.chromium.org/1313743002
The new flow of calls for attaching a Stencil looks like:
Client
rt->attachStencilAttachment()
gpu->getStencilAttachment()
glgpu->createStencilAttachment()
glrt->completeStencilAttachment() //actually attaches
BUG=skia:
Review URL: https://codereview.chromium.org/1333383002
Possible follow-up changes to consider
1. Roll SkImage_Raster and _Gpu into _Generator, where the generator (or cacherator) is backed by a pre-existing texture or raster.
2. Evolve SkImageUsageType into a verb requiring stretching, and have the caller (common code) digest the caps() and usage, so that subclasses are just told what to do (stretch or not)
3. Common code/utility to convert an unstretched texture into a stretch one (and cache it) if the generator can only make an unstretched one.
BUG=skia:
Review URL: https://codereview.chromium.org/1282363002
This change regularizes Skia's type traits so that when <type_traits>
can finally be used the transition is easier. Various traits are
renamed to match <type_traits> and placed in the skstd namespace.
Current users of these traits are updated.
Review URL: https://codereview.chromium.org/1317593004
This macro was responsible for producing code like:
static SkAlignedStorage<sizeof(Foo)> g_gFoo_Storage;
static Foo* gFoo = new(g_gFoo_Storage.get()) Foo;
static SkAutoTDestroy<Foo> gFoo_ad(gFoo);
which would allocate static storage for an object of type Foo
(g_gFoo_Storage), lazily instantiate the object in that memory (via
gFoo's initializer), and then ensure that at global destruction time
the object is destroyed (via gFoo_Ad's destructor).
However, the exact same effect is achieved by just writing:
static Foo gFoo;
Review URL: https://codereview.chromium.org/1314763009
SkTemplates.h contains a number of Skia specific utilities which are
not designed for external use. In addition to reducing the external
support burden, this will allow Skia to freely refactor this file.
Review URL: https://codereview.chromium.org/1272293004
Added comment about how computeInvariantOutput() is non-recursive in GrFragmentProcessor
Made isEqual() recursive in GrFragmentProcessor
BUG=skia:4182
Review URL: https://codereview.chromium.org/1287343005
Fixed wrong indent
Changed auto child advance back to backwards linear search for getting subset of coords and samplers array of a child
Used offset from parent instead of backwards linear search to find a child proc's coords and transforms in Auto...Advance
append mangleString to variable name in nameVariable()
BUILDS! Added AutoFragmentChildProcAdvance class; fixed a few errors from previous commits
BUG=skia:4182
Review URL: https://codereview.chromium.org/1286293002
To do this, create SkImageCacherator, which wraps a generator and provides an
interface to get a cached answer for either the raster or texture output of
the generator.
BUG=skia:
Review URL: https://codereview.chromium.org/1291803002
Prior to this patch clients who were solely uploading to textures (e.g., SW Mask Mgr) would cause extra flushes b.c., even though kPreferNoIO was being specified, resources with pending IO would still be returned even though there was plenty of space in the resource cache.
Review URL: https://codereview.chromium.org/1286203002
Changed childProcessor(i) to return const referencd
Fixed rootProc/parentProc offset issues; renamed a few things.
added nonempty check to gatherTransforms to avoid segfault
removed recursive append_gr_coord_transforms() from GrGLProgramBuilder
BUILDS! Changed num*includeProc() calls to num() calls
added gatherCoordTransforms(). added coordTransforms() for root proc only
Modified GrFragmentProcessor to append child proc transforms and textures to root proc's arrays.
BUG=skia:4182
Review URL: https://codereview.chromium.org/1275853005
This requires adding the stroke info to the cache key, and doing the
stroking and dashing before rendering as triangles.
BUG=skia:3755
Review URL: https://codereview.chromium.org/1275553002
Paths are cached as tessellated triangle meshes in vertex buffers on the GPU. Stroked paths are not (yet) cached.
Paths containing no curved segments (linear paths) are reused at all scales. Paths containing curved segments are reused within a scale tolerance threshold.
In order to invalidate the cache when an SkPath is changed or deleted,
this required implementing genID change notification in SkPath. This is
modelled almost exactly on SkPixelRef::GenIDChangeListener.
However, It does not currently implement the check for unique genIDs,
so notifiers will fire when the first instance of an SkPathRef
using a given genID is destroyed.
Another caveat is that you cannot successfully add a change notifier
to an empty path, since it uses the "canonical" empty path which is
never modified or destroyed. For this reason, we prevent adding
listeners to it.
BUG=skia:4121,skia:4122, 497403
DOCS_PREVIEW= https://skia.org/?cl=1114353004
Committed: https://skia.googlesource.com/skia/+/468dfa72eb6694145487be17876804dfca3b7adb
Review URL: https://codereview.chromium.org/1114353004
Paths are cached as tessellated triangle meshes in vertex buffers on the GPU. Stroked paths are not (yet) cached.
Paths containing no curved segments (linear paths) are reused at all scales. Paths containing curved segments are reused within a scale tolerance threshold.
In order to invalidate the cache when an SkPath is changed or deleted,
this required implementing genID change notification in SkPath. This is
modelled almost exactly on SkPixelRef::GenIDChangeListener.
However, It does not currently implement the check for unique genIDs,
so notifiers will fire when the first instance of an SkPathRef
using a given genID is destroyed.
Another caveat is that you cannot successfully add a change notifier
to an empty path, since it uses the "canonical" empty path which is
never modified or destroyed. For this reason, we prevent adding
listeners to it.
BUG=skia:4121,skia:4122, 497403
DOCS_PREVIEW= https://skia.org/?cl=1114353004
Review URL: https://codereview.chromium.org/1114353004
This reverts commit d12e6ffa5c.
Our Chrome roll canaries are failing with the dreaded
Ninja-says-there's-more-work-to-do message. I will break this up
smaller (if possible) and try again tomorrow.
BUG=skia:4126
Review URL: https://codereview.chromium.org/1258293004 .