This is split out of https://codereview.chromium.org/2215323003/ (Start using RenderTargetProxy (omnibus))
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3841
CQ_INCLUDE_TRYBOTS=master.client.skia.android:Test-Android-Clang-Nexus5-GPU-Adreno330-arm-Debug-GN_Android-Trybot
Change-Id: I1a47f19ed1ac0c249e6ccac8db74095d7f456db4
Reviewed-on: https://skia-review.googlesource.com/3841
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Perhaps these needed to be virtual in the past, but no longer.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4120
Change-Id: I1ba713a1da713f2c7955c0cfc9931917f2719a63
Reviewed-on: https://skia-review.googlesource.com/4120
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
The vulcan code uses lib_dirs to point to the libs in the SDK.
Change-Id: I4a1a4235b8534f3f937640b10f9758b0c70434c9
Reviewed-on: https://skia-review.googlesource.com/4003
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Add BUILD.gn files for dng_sdk and piex and updated BUILD.gn to
build SkRawCodec.
We stopped testing raw images when we switched to GN, so this will
bring back our testing.
Leave SkRawCodec disabled on Windows, where we've had problems in the
past.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4063
Change-Id: I956949506200b766a2f7efb18e0486f3a2f93a1c
Reviewed-on: https://skia-review.googlesource.com/4063
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
This reverts commit a70558e2bb.
Reason for revert:
cmd /c c:\b\s\w\ireutzd9\t\depot_tools\win_toolchain\vs_files\95ddda401ec5678f15eeed01d2bee08fcbc5ee97/win_sdk/bin/SetEnv.cmd /x86 && c:\b\s\w\ireutzd9\t\depot_tools\win_toolchain\vs_files\95ddda401ec5678f15eeed01d2bee08fcbc5ee97/VC/bin/amd64_x86/cl.exe /nologo /showIncludes /FC @obj/samplecode/SampleApp.SampleApp.obj.rsp /c ../../../samplecode/SampleApp.cpp /Foobj/samplecode/SampleApp.SampleApp.obj /Fd"obj/SampleApp_c.pdb"
c:\b\work\skia\include\views\skoswindow_win.h(18): fatal error C1083: Cannot open include file: 'EGL/egl.h': No such file or directory
I think this is restricted to just 32-bit Windows builds?
Original change's description:
> Add SampleApp support to GN-win
>
> BUG=skia:
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4062
>
> Change-Id: I88b10748b49adbf57f247b51eec1b9ca86377800
> Reviewed-on: https://skia-review.googlesource.com/4062
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> Reviewed-by: Cary Clark <caryclark@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
>
TBR=mtklein@chromium.org,mtklein@google.com,jvanverth@google.com,caryclark@google.com,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: Iba39bab6d3a07a437a86343599e51485d8f4ce93
Reviewed-on: https://skia-review.googlesource.com/4070
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
If we require our inputs are sound, in-gamut, premul colors (a in [0,1], r,g,b in [0,a]) then we should only need to clamp when the math we perform requires it. The safety clamps before each store are paranoia.
The main thing this pipeline handles right now that needs clamping is the plus transfermode.
This is either used to blend, where the clamp must come after the coverage lerp, or used via a mode color filter, where we have no choice but to clamp right at the end of the color filer.
This changes how the mode color filter draws with the plus transfermode. It didn't used to clamp at all. I think this is a bug fix.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4034
Change-Id: I3cbaade2127cc88c8782596f45749c4fe4b0e953
Reviewed-on: https://skia-review.googlesource.com/4034
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
SkMovie is not used in any of our tests or by Chromium. It is also not
supported by GN. It is being moved into Android, its only client, so we
can delete it here.
giflib is only used by SkMovie, so stop pulling/building it.
TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3945
Change-Id: I28a8155fd59e139bb21ec2295cc22fdced034284
Review-Url: https://codereview.chromium.org/2449213004
This is in preparation for GrTextureContext and GrSurfaceContext
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4030
Change-Id: Ie58c93052e68f3f1f5fe8d15d63760de274a6fbd
Reviewed-on: https://skia-review.googlesource.com/4030
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Calling Python to find all these files is convenient, but error-prone. It's easy to forget to call GN again when adding a file. Each of these calls to Python also adds ~50ms to the run time of gn gen, which is small but adds up.
On my desktop, gn gen drops from 600ms to 150ms, noticeably faster.
This leaves one call to find.py for generating skia.h for fiddle. We're not quite sure how to automate that process to happen entirely inside the :skia.h action while maintaining correct dependencies, so I'm leaving it for now.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4036
Change-Id: Ib9d355b97900f29afebc65311ceef50537e46dda
Reviewed-on: https://skia-review.googlesource.com/4036
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
The fuzzer discovered that a long chain of left-parentheses would cause a stack overflow due to excessive recursion. While it is not in general possible to guarantee that we do not exceed stack limits (because the system can be configured with an arbitrarily small stack), setting a reasonable recursion limit will at least keep the fuzzer from continually finding more "bugs" like this.
BUG=skia:5899
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2459573003
Review-Url: https://codereview.chromium.org/2459573003
This also makes the required changed to src, tests, and tools. The few
public APIs modified by this change appear to be unused outside of Skia.
Removing these from the public API makes it easier to ensure users are
no longer using them.
This also updates GrGpu::wrapBackendXXX and the
::onWrapBackendXXX methods to clarify ownership.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2448593002
Review-Url: https://codereview.chromium.org/2448593002
Reason for revert:
texelFetch removed, but is used in some shaders.
Original issue's description:
> Reduced skslc memory consumption
>
> The big change here is smarter generic type handling which allows us to
> keep far fewer entries in the core symboltable. This also comments out
> a number of OpenGL builtin functions which Skia does not use and is
> unlikely to in the future.
> BUG=655673
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2442063002
>
> Committed: https://skia.googlesource.com/skia/+/cffaa70896fa5bc6c7bf98abbaafb1a755b49762TBR=reed@google.com,ethannicholas@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=655673
Review-Url: https://codereview.chromium.org/2458723002
This reverts commit 0057ac11fc.
This was a speculative fix. Now that a proper fix has been introduced
(crrev.com/2450943002) we shouldn't need this one.
BUG=skia:5883
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4033
Change-Id: Ie7aae4fd18dac21b240085c3b5c4f3d46511cd75
Reviewed-on: https://skia-review.googlesource.com/4033
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
565 cannot take the !writeTransparentPixels path, so disable it for
cases where we might have to take that path.
This only affects frames beyond the first. If the first frame has
a transparent pixel, it will be marked as non-opaque, so we cannot
decode to 565 anyway.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2441833002
Review-Url: https://codereview.chromium.org/2441833002
The big change here is smarter generic type handling which allows us to
keep far fewer entries in the core symboltable. This also comments out
a number of OpenGL builtin functions which Skia does not use and is
unlikely to in the future.
BUG=655673
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2442063002
Review-Url: https://codereview.chromium.org/2442063002
'Unoptomized' insertion sort swaps the 'insert' value multiple times
inside the main loop before it finds its place. However, this has the
advantage that if the 'insert' element is already not less than any
element in the sorted partition no moves are made at all.
The 'optimized' insertion sort present before this CL moves the 'insert'
value into a temporary (creating a 'hole') and then moves already sorted
elements until the 'insert' element finds its place. This has the
disadvantage of always moving the 'insert' element out of the list and
then re-inserting it, even if this was unnecessary.
This CL further optimizes the insertion sort by moving the first test of
the main loop to before moving the 'insert' element into the temporary.
This is expected to increase the code size by a few instructions but
avoids the useless non-moves. There will actually be one fewer
comparison per element comsidered (the initial 'left < hole' predicate
is always true when entering the inner loop).
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4022
Change-Id: I33158b7781e4dbec1f1b76c0bf43ebe169075733
Reviewed-on: https://skia-review.googlesource.com/4022
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Ben Wagner <bungeman@google.com>
I'm not really expecting this to work anymore...
The docs don't say anything about the rgb pointer needing
to stay valid, and it looks like we are done with it
after the call to import.
Still, worth a try I think.
BUG=skia:5876
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4024
Change-Id: I6e65ef96a2b661b01eb92bedab0acd73ed4f6218
Reviewed-on: https://skia-review.googlesource.com/4024
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Matt Sarett <msarett@google.com>
The main idea here is to simplify, mainly to reduce the number of SkRasterPipeline objects the blitter holds.
- Use SkBlendMode instead of SkXfermode, just store SkBlendMode.
- Fuse the shader and color filter together into one SkRasterPipeline
during blitter creation.
- I noticed all calls to append_load_d() and append_store() now have the same ctx argument, so I folded that through.
I'll be following up with more of this sort of refactoring... I think I can fold everything into a single SkRasterPipeline during blitter creation now, but I'll want to make sure I've got my ducks in a row for how that works with pipeline strength reduction (like skipping dst loads when drawing in Src mode).
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4021
Change-Id: I88252ab8ad16f102c71bad871f8b6aec2fc1f226
Reviewed-on: https://skia-review.googlesource.com/4021
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Also extend GN format presubmit check to .gni files.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3976
Change-Id: I292f3136437101e3e2c3271e260536ab7a24b192
Reviewed-on: https://skia-review.googlesource.com/3976
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
This allows us to change the underlying pointer without rebuilding the pipeline, e.g. when moving the blitter from scanline to scanline.
The extra overhead when not needed is measurable but small, <2%. We can always add back direct stages later for cases where we know the context pointer will not change.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3943
Change-Id: I827d7e6e4e67d02dd2802610f898f98c5f36f8cb
Reviewed-on: https://skia-review.googlesource.com/3943
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3964
Change-Id: I782ef741838860bfeace13c335f9a82403047220
Reviewed-on: https://skia-review.googlesource.com/3964
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
This canaries the idea by converting gyp/pdf.gypi to gn/pdf.gni.
If this lands and rolls quietly, I'll flesh out the rest.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3972
Change-Id: Iecaf1ccce7891679904c585946272bfb25eea299
Reviewed-on: https://skia-review.googlesource.com/3972
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Most the calls to flushStencil were just trying to disable it. This
change cleans up that code so it can just call "disableStencil"
instead of having to muck with GrStencilSettings. It should also make
those calls slightly faster.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2453793002
Review-Url: https://codereview.chromium.org/2453793002