This will expose the BitmapRegionDecoder API as a public include
and move the implementation to src.
This makes this code more naturally exposed in Android and easier
to test in DM and nanobench.
BUG=skia:
Review URL: https://codereview.chromium.org/1438873002
This CL:
Fixes an ordering problem w.r.t. drawTarget clean up in GrContext::abandonContext (for text test that abandons context)
Fixes when the lastDrawTarget field is set on a RenderTarget (now in GrDrawTarget ctor) due to GrTestTarget use case
Updates the ProgramUnitTest to use multiple drawTargets
Adds renderTarget creation to GrTestTargets (in MDB drawTargets require them)
BUG=skia:4094
Review URL: https://codereview.chromium.org/1441533003
This fixes a bug in Android. We cannot access the pixels after
calling decodeRegion() because the call to lock is missing.
BUG=skia:
Review URL: https://codereview.chromium.org/1442553003
- /user/quick/desktop to bring together all common information for
using Skia on desktop OSes. Remove duplication.
- Replace all instances of call ing gyp_skia directly with calling
`python bin/sync-and-gyp`. This is more correct on Windows
- Remove outdated linux prerequisite packages
- Formatting, formatting, formatting.
- Note command-line syntax differences in Windows
- SampleApp.app is no longer a bundle on MacOS
NOTRY=true
DOCS_PREVIEW= https://skia.org/?cl=1439493003
Review URL: https://codereview.chromium.org/1439493003
SkChecksum::Compute is a very, very poorly distributed hash function.
This replaces all remaining uses with Murmur3.
The only interesting stuff is in src/gpu.
BUG=skia:
Review URL: https://codereview.chromium.org/1436973003
We were doing it on Windows, now do it everywhere.
This just changes the backend. We could think about another step to actually
replacing all our sk_atomic_... with std atomic stuff.
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-TSAN-Trybot
TBR=reed@google.com
Only deleting from include/...
Review URL: https://codereview.chromium.org/1441773002
These changes are to facilitate converting SkGpuDevice::drawTextureAdjuster to SkGpuDevice::drawTextureProducer.
Make constraint rect relative to content area
Store dimensions in GrTextureProducer
Make originalTexture() protected.
Remove getContentArea()
Provide pre-normalized texture matrix to GrTextureAdjuster::createFragmentProcessor. Define it to be be relative to content area.
Review URL: https://codereview.chromium.org/1438663004
Fixes a double blend that was occurring down the diagonals of inverse
path fills when using mixed samples.
BUG=skia:
Review URL: https://codereview.chromium.org/1442513002
This is necessary if we want to start using C++11 library features.
Chrome's got their own custom libc++-for-10.6.
This is a somewhat lazy approximation of that.
Chrome should still guard us from using 10.7-specific features
until 10.6-10.8 all go away.
BUG=skia:
Review URL: https://codereview.chromium.org/1437173002
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
This is the third step in a three part change:
(1) Skia: Add SkBRDAllocator.
(2) Android: Make JavaPixelAllocator and RecyclingClippingPixelAllocator
implement SkBRDAllocator.
(3) Skia: Change SkBitmapRegionDecoder to use SkBRDAllocator and take
advantage of zero allocated memory when possible.
BUG=skia:
Review URL: https://codereview.chromium.org/1420053010
Xfermode_ColorDodge_aa 10.3ms -> 7.85ms 0.76x
Xfermode_SoftLight_aa 13.8ms -> 10.2ms 0.74x
Xfermode_ColorBurn_aa 10.7ms -> 7.82ms 0.73x
Xfermode_SoftLight 33.6ms -> 23.2ms 0.69x
Xfermode_ColorDodge 25ms -> 16.5ms 0.66x
Xfermode_ColorBurn 26.1ms -> 16.6ms 0.63x
Ought to be no pixel diffs:
https://gold.skia.org/search2?issue=1432903002&unt=true&query=source_type%3Dgm&master=false
Incidental stuff:
I made the SkNx(T) constructors implicit to make writing math expressions simpler.
This allows us to write expressions like
Sk4f v;
...
v = v*4;
rather than
Sk4f v;
...
v = v * Sk4f(4);
As written it only works when the constant is on the right-hand side,
so expressions like `(Sk4f(1) - da)` have to stay for now. I plan on
following up with a CL that lets those become `(1 - da)` too.
BUG=skia:4117
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
Review URL: https://codereview.chromium.org/1432903002
This CL still keeps the weird diamond shape we have for all our ProgramBuilders.
However, the GrGLSL base class will allow us to pull multiple other parts
of our program setup away from GL which will eventually allow us to break up
the diamond.
As part of this all ShaderBuilder subclass have been made gl independent,
however I will move them to GLSL files/class names in a follow on CL.
BUG=skia:
Review URL: https://codereview.chromium.org/1416423003
This is the first step in a three part change:
(1) Skia: Add SkBRDAllocator.
(2) Android: Make JavaPixelAllocator and RecyclingClippingPixelAllocator
implement SkBRDAllocator.
(3) Skia: Change SkBitmapRegionDecoder to use SkBRDAllocator and take
advantage of zero allocated memory when possible.
BUG=skia:
Review URL: https://codereview.chromium.org/1423253004
Rename SkCodecTools.h to SkBitmapRegionDecoderPriv.h
Move BRD code to its own directory in tools. This
allows us to not need to expose the entire tools
directory in Android.
BUG=skia:
Review URL: https://codereview.chromium.org/1417393004
The FilterQuality slide segfaults if resources cannot be loaded.
This is particularly noticeable with an Android build, as by
default resources are not available.
Review URL: https://codereview.chromium.org/1422763004
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
output_message():
By overriding output_message, we can use SkCodecPrintf,
which we can turn on or off.
The default turbo implementation of emit_message calls
output_message when it wants to print a message, so,
even though we don't override emit_message, it also uses
SkCodecPrintf.
emit_message():
Use libjpeg-turbo’s default implementation of emit_message.
It does not print "trace messages" which essentially are info
messages and it only prints the first warning (unless it a very
serious warning).
Currently, we just print everything, which is why the output
has been so verbose.
BUG=skia:
Review URL: https://codereview.chromium.org/1427523007
Preemptive batch preparation makes MultiDrawBuffer more difficult to implement. This CL disables it.
BUG=skia:4094
Review URL: https://codereview.chromium.org/1430403002
This is the GPU equivalent of https://codereview.chromium.org/1415653003/.
It requires passing down the bounds of the crop rect (srcBounds), and
turning the blur 3-patch optimization in convolve_gaussian() into a 5-patch:
clear above and below srcBounds, blur with bounds checks inside left and
right rects, blur without bounds checks in middle rect.
Note: this change causes minor pixels diffs in the
imagefilterscropexpand GM: for odd crop positions relative to the
dstBounds, we are now correctly resampling at an even pixel boundary.
BUG=skia:4502, skia:4526
Committed: https://skia.googlesource.com/skia/+/c57e0ded7d535523cfc6bf07c78e5f3479bb8c42
Review URL: https://codereview.chromium.org/1431593002
Unit tests added to check all color types in SkOneShotDiscardablePixelref
SkResourceCacheTest seems to have been allways using default Heap Allocator.
Fixed so that it uses private (not global that is) SkDiscardableMemory.
BUG=skia:4355
Review URL: https://codereview.chromium.org/1426753006