bsalomon
67c6c8e229
Fix leak when DFPR fails to draw path
...
TBR=jvanverth@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2144283002
Review-Url: https://codereview.chromium.org/2144283002
2016-07-14 07:22:19 -07:00
mtklein
abda35d2b7
GrBufferAllocPool: use _throw calloc() if unchecked.
...
Looks like this code is using sk_calloc(), NULL on failure, accidentally
instead of sk_calloc_throw(). We're using sk_malloc_throw() in the parallel
code path, so it really seems like we're not checking the result pointer.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2152753002
Review-Url: https://codereview.chromium.org/2152753002
2016-07-14 06:57:31 -07:00
bsalomon
614d8f9a3c
Remove GrWrapTextureInBitmap from public API
...
BUG=skia:5531
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2147053002
Review-Url: https://codereview.chromium.org/2147053002
2016-07-13 15:42:40 -07:00
bsalomon
a2e0837c33
Stop testing texture-backed bitmaps in bleed GMs
...
BUG=skia:5531
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2141973004
Review-Url: https://codereview.chromium.org/2141973004
2016-07-13 14:50:17 -07:00
bsalomon
6d6b6ad0f3
Make GrBatchAtlas robust against attempts to add large rects.
...
Make GrAADistanceFieldPathRenderer robust against paths that in src space wind up being too large for the atlas.
BUG=chromium:627443
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2144663004
Review-Url: https://codereview.chromium.org/2144663004
2016-07-13 14:45:28 -07:00
egdaniel
50ead53ac9
Update RT views and framebuffer in vulkan after mipmaping
...
I've also changed it so all attachment views (texture, color, and resolve) are created separately and not shared with each other. This just added a lot more complexity than we were probably even saving in time.
A quick fix to make sure we don't reuse keys in resource tracking also
got merged into this change.
BUG=skia:5223
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2146103002
Review-Url: https://codereview.chromium.org/2146103002
2016-07-13 14:23:26 -07:00
egdaniel
990dbc8879
Add Texture2D and Sampler GrSLTypes
...
These two new types are in support of Vulkan and the ability to send
separate texture and sampler uniforms to the shader. They don't really fit
well in the current system, since the current system ties together to idea
of intended use and how to emit shader code into the same GrSLType enum.
In vulkan, I want the GrGLSLSampler object to be used as a Sampler2D, but
when appending its declaration it will emit a Texture2D and sampler object.
Our query for GrSLTypeIsSamplerType refers more to the combination of texture
and sampler and not just the sampler part. The GrSLTypeIs2DTextureType query
is for is a a SamplerType that uses Texture2Ds. My new types don't really fit
into either these categories as they are just half of the whole.
In some refactoring down the road (possibly connected with SkSL), I suggest we
split apart the concept of how we intend to use a GrGLSLSampler (Sampler2D, SamplerBuffer,
etc.), from how we actually add it to the code (sampler, texture2D, sampler2D, etc.).
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2143143002
Review-Url: https://codereview.chromium.org/2143143002
2016-07-13 14:09:31 -07:00
vjiaoblack
e5de130788
Added the framework for having canvas/recorder/picture record depth_set's.
...
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2127233002
Committed: https://skia.googlesource.com/skia/+/6d3fb898d5f73a82e36f11c712a633c3921ed518
Committed: https://skia.googlesource.com/skia/+/1185d90c785f743364cc9113d7007a59af07470c
Review-Url: https://codereview.chromium.org/2127233002
2016-07-13 14:05:28 -07:00
bungeman
f382b48687
Disable aliased font test on iOS.
...
See if not requesting aliased text fixes iOS.
BUG=skia:5530
TBR=mtklein
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2150483003
Review-Url: https://codereview.chromium.org/2150483003
2016-07-13 14:00:39 -07:00
reed
9f01276464
move GrPixelRef headers to private (as we work to eliminate them)
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2150693002
Review-Url: https://codereview.chromium.org/2150693002
2016-07-13 13:43:49 -07:00
csmartdalton
97f6cd5d0f
Pre-crop filled rects to avoid scissor
...
Updates GrDrawContext to crop filled rects to the clip bounds before
creating batches for them. Also adds clipping logic to ignore scissor
when the draw falls completely inside. These two changes combined
reduce API traffic and improve batching.
In the future this can and should be improved by switching to floating
point clip boundaries, thus allowing us to throw out non pixel aligned
rectangle clips as well.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2132073002
Committed: https://skia.googlesource.com/skia/+/7969838702135b9f127bd738728da61bc49b050a
Committed: https://skia.googlesource.com/skia/+/86de59f4a99b5f54be0483c60ff0335be55b2bdf
Review-Url: https://codereview.chromium.org/2132073002
2016-07-13 13:37:08 -07:00
liyuqian
0d2c234e44
Fix SkFixedDiv macro
...
Previously, the macro won't pass the unit test that I just added in this
CL.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2149733002
Review-Url: https://codereview.chromium.org/2149733002
2016-07-13 13:34:46 -07:00
mtklein
05c73b7ed5
Remove bulk float <-> half routines. These are dead code.
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2152583002
Review-Url: https://codereview.chromium.org/2152583002
2016-07-13 13:30:49 -07:00
robertphillips
dda54455a2
Remove GrLayerHoister
...
This relies on https://codereview.chromium.org/1944013002/ (Add legacy flag to allow Skia to remove Ganesh layer hoister) landing first so as to not break the DEPS roll.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1950523002
Review-Url: https://codereview.chromium.org/1950523002
2016-07-13 13:27:16 -07:00
msarett
e92badc3ff
Revert of SkSL performance improvements (patchset #6 id:140001 of https://codereview.chromium.org/2131223002/ )
...
Reason for revert:
Valgrind bot failures
https://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind/builds/1224/steps/test_skia%20on%20Ubuntu/logs/stdio
Original issue's description:
> SkSL performance improvements (plus a couple of minor warning fixes)
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2131223002
>
> Committed: https://skia.googlesource.com/skia/+/9fd67a1f53809f5eff1210dd107241b450c48acc
TBR=benjaminwagner@google.com ,egdaniel@google.com,ethannicholas@google.com
# Not skipping CQ checks because original CL landed more than 1 days ago.
Review-Url: https://codereview.chromium.org/2143323003
2016-07-13 13:18:40 -07:00
msarett
16ef465ea9
Fix ASAN bot
...
TBR=reed@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2152573002
Review-Url: https://codereview.chromium.org/2152573002
2016-07-13 13:08:44 -07:00
rmistry
d8f0988b34
Specifying master names with "master." prefix is deprecated
...
NOTRY=true
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2151623002
Review-Url: https://codereview.chromium.org/2151623002
2016-07-13 12:57:42 -07:00
reed
77d6f7d018
use gpu-image instead of wrapping in a bitmap for specialimage
...
BUG=skia:5531
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2147023002
Review-Url: https://codereview.chromium.org/2147023002
2016-07-13 12:24:48 -07:00
bungeman
82945560e6
Disable embedded bitmap test on iOS.
...
The TypefaceRenderingGM crashes on iOS when drawing an embedded
bitmap when requesting aliased rendering. The crash looks like
libTrueTypeScaler.dylib`<redacted> + 80
stop reason = EXC_BAD_ACCESS (code=EXC_ARM_DA_ALIGN, address=...)
-> 0x330b19d0 <+80>: strd r2, r3, [r5, #36 ]
0x330b19d4 <+84>: movs r3, #0x0
0x330b19d6 <+86>: add r2, sp, #0x28
0x330b19d8 <+88>: ldr r0, [r4, #0x4]
Disable testing embedded bitmaps on iOS for now.
BUG=skia:5530
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2140383004
Review-Url: https://codereview.chromium.org/2140383004
2016-07-13 10:57:24 -07:00
reed
b1b12f8666
handle large conic weights
...
BUG=627414
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2142393003
Review-Url: https://codereview.chromium.org/2142393003
2016-07-13 10:56:53 -07:00
senorblanco
99f942e550
Fix vertex count estimate in GrTessellator.
...
When we start a new MonotonePoly due to a handedness change, we don't need to
increase the vertex count, since that edge (and vertex) has already been
accounted for in the previous MonotonePoly.
This was not a correctness issue, but was causing us to allocate
extra vertices which would go unused.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2146063002
Review-Url: https://codereview.chromium.org/2146063002
2016-07-13 10:40:43 -07:00
csmartdalton
485a12003a
Add resource provider flag to avoid client-side buffers
...
On some platforms, a newly-created buffer was liable to be CPU backed.
This would break code that expected a VBO (aka instanced rendering).
This change adds an optional flag to GrResourceProvider that requires
a buffer to be created in GPU memory.
It also moves the CPU backing logic into Gr land in order to properly
cache real VBOs on platforms that prefer client-side buffers.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2143333002
Review-Url: https://codereview.chromium.org/2143333002
2016-07-13 10:16:32 -07:00
mtklein
6c3ada96ab
Turn back on nanobench on Debug trybots.
...
Swarming makes the extra wall-clock cost negligible.
TBR=
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2142223004
Review-Url: https://codereview.chromium.org/2142223004
2016-07-13 09:44:18 -07:00
robertphillips
59cf61ab03
Retract PipelineBuilder from GrClip::apply
...
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2147443004
Review-Url: https://codereview.chromium.org/2147443004
2016-07-13 09:18:21 -07:00
brianosman
0e1161d03f
Never allow dither for non-legacy (sRGB or F16) targets.
...
With sRGB, the noise from dithering is (obviously) non-linear, and
highly objectionable for very dark values. With F16, it's completely
unnecessary.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2113793002
Review-Url: https://codereview.chromium.org/2113793002
2016-07-13 09:05:47 -07:00
mtklein
6e998e6137
Revert "Added the framework for having canvas/recorder/picture record depth_set's."
...
1-click revert failed again.
This reverts commit 1185d90c78
.
BUG=skia:
TBR=
NOTRY=true
Review-Url: https://codereview.chromium.org/2147963002
2016-07-13 09:03:48 -07:00
csmartdalton
dd57dd7968
Fix various issues with instanced rendering precision
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2148633003
Review-Url: https://codereview.chromium.org/2148633003
2016-07-13 08:59:52 -07:00
csmartdalton
0caee1778d
Replace switch statements in instanced vertex shaders
...
Replaces switch statements with 3-way if’s. The switches as they were
seemed to be the cause of an Adreno compiler crash.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2136103011
Review-Url: https://codereview.chromium.org/2136103011
2016-07-13 08:48:53 -07:00
csmartdalton
b3772dcb30
Fix GL shader sources getting truncated by ADB log
...
Prints the shaders one line at a time so they don't get truncated by
the ADB log.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2142223003
Review-Url: https://codereview.chromium.org/2142223003
2016-07-13 08:47:54 -07:00
vjiaoblack
1185d90c78
Added the framework for having canvas/recorder/picture record depth_set's.
...
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2127233002
Committed: https://skia.googlesource.com/skia/+/6d3fb898d5f73a82e36f11c712a633c3921ed518
Review-Url: https://codereview.chromium.org/2127233002
2016-07-13 08:35:41 -07:00
mtklein
0abddf7bb7
SkRasterPipeline: simplify impl and remove need to rewire stages
...
This builds the stages correctly wired from the get-go. With a little clever
setup, we can also design around the previous error cases like having no stages
or pipelines that call st->next() off the end.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2149443002
Review-Url: https://codereview.chromium.org/2149443002
2016-07-13 08:22:20 -07:00
msarett
f461e7c227
Try blacklisting RAW images on Nexus 9
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2141923006
Review-Url: https://codereview.chromium.org/2141923006
2016-07-13 08:03:35 -07:00
mtklein
0358a6ac00
Update SkOpts namespaces.
...
If we make sure all SkOpts functions are static, we can give the namespaces any
name we like. This lets us drop the sk_ prefix and give a real indication of
the default SIMD instruction set rather than just saying sk_default.
Both of these changes help debugger, profiler, and crash report readability.
Perhaps more importantly, keeping these functions static helps prevent
accidentally linking in unused versions of functions, as you see here with
sk_avx::srcover_srgb_srgb().
This requires we update SkBlend_opts tests and benches to call SkOpts functions
through SkOpts rather than declaring the methods externally. In practice this
drops testing of the SSE2 version on machines with SSE4. If we still really
need to test/bench the compile time best SIMD level version of this method
against the runtime detected best, we can include SkBlend_opts.h into the tests
or benches directly, similar to what we do for the trivial, brute-force, or best
non-SIMD versions.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2145833002
CQ_INCLUDE_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
Review-Url: https://codereview.chromium.org/2145833002
2016-07-13 08:02:20 -07:00
robertphillips
9199a9fef9
Move GrDrawTarget::clear logic into GrDrawContext
...
I found it a bit worrisome that GrDrawTarget was calling back into GrDrawContext. This also moves GrDrawTarget closer to being a simple-ish container of batches.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2145643003
Review-Url: https://codereview.chromium.org/2145643003
2016-07-13 07:48:43 -07:00
bungeman
e3aea10428
Remove user specified typeface id.
...
Now that there may be multiple font managers in a process the typeface
ids must be unique across all typefaces, not just unique within a font
manager. If two typefaces have the same id there will be issues in the
glyph cache. All existing font managers were already doing this by
calling SkFontCache::NewFontID, so centralize this in SkTypeface.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2147733002
Review-Url: https://codereview.chromium.org/2147733002
2016-07-13 05:16:58 -07:00
msarett
ba3880fa6d
Revert of Pre-crop filled rects to avoid scissor (patchset #6 id:100001 of https://codereview.chromium.org/2132073002/ )
...
Reason for revert:
I think this is still causing a test failure on Chrome windows bots.
https://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/243928/steps/cc_unittests%20%28with%20patch%29%20on%20Windows-7-SP1/logs/stdio
Original issue's description:
> Pre-crop filled rects to avoid scissor
>
> Updates GrDrawContext to crop filled rects to the clip bounds before
> creating batches for them. Also adds clipping logic to ignore scissor
> when the draw falls completely inside. These two changes combined
> reduce API traffic and improve batching.
>
> In the future this can and should be improved by switching to floating
> point clip boundaries, thus allowing us to throw out non pixel aligned
> rectangle clips as well.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2132073002
>
> Committed: https://skia.googlesource.com/skia/+/7969838702135b9f127bd738728da61bc49b050a
> Committed: https://skia.googlesource.com/skia/+/86de59f4a99b5f54be0483c60ff0335be55b2bdf
TBR=bsalomon@google.com ,robertphillips@google.com,csmartdalton@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/2140253004
2016-07-12 18:48:21 -07:00
bsalomon
634b430080
Add a function to convert a texture backed SkImage to raster.
...
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2147493004
Review-Url: https://codereview.chromium.org/2147493004
2016-07-12 18:11:17 -07:00
mtklein
e504dbc092
Revert "Added the framework for having canvas/recorder/picture record depth_set's."
...
1-click revert failed.
This reverts commit 6d3fb898d5
.
TBR=
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2148543002
Review-Url: https://codereview.chromium.org/2148543002
2016-07-12 15:41:08 -07:00
borenet
c4600204f2
Run the Vulkan config on nanobench for Vulkan bots
...
BUG=skia:5513
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2145633002
Review-Url: https://codereview.chromium.org/2145633002
2016-07-12 15:11:35 -07:00
liyuqian
e25faf3e18
Fix option name typo
...
BUG=skia:
TBR=jvanverth@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2143093002
NOTRY=true
DOCS_PREVIEW= https://skia.org/?cl=2143093002
Review-Url: https://codereview.chromium.org/2143093002
2016-07-12 15:11:31 -07:00
reed
7c70d7cfa2
center glyphs for text-on-path-via-rsxform
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2137083005
Review-Url: https://codereview.chromium.org/2137083005
2016-07-12 15:06:33 -07:00
brianosman
6373c95554
Monitor profile tool, now with Windows support, too!
...
Original Mac support by Matt.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2095093002
Review-Url: https://codereview.chromium.org/2141573004
2016-07-12 15:06:25 -07:00
mtklein
281b33fdd9
SkRasterPipeline preliminaries
...
Re-uploading to see if I can get a CL number < 2^31.
patch from issue 2147533002 at patchset 240001 (http://crrev.com/2147533002#ps240001 )
Already reviewed at the other crrev link.
TBR=
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2147533002
CQ_INCLUDE_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
Review-Url: https://codereview.chromium.org/2144573004
2016-07-12 15:01:26 -07:00
bungeman
7438bfc080
Factor code to rotate a canvas about a point.
...
SkMatrix::scale and ::rotate take a point around which to scale or rotate.
Canvas lacks these helpers, so the code to rotate a canvas around a
point has been duplicated many times. Factor all of these
implementations into SkCanvas::rotate.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2142033002
Review-Url: https://codereview.chromium.org/2142033002
2016-07-12 15:01:19 -07:00
herb
2edf0c6a71
Remove bloat from SkBlend_opts.
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2130183003
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
Review-Url: https://codereview.chromium.org/2130183003
2016-07-12 15:00:46 -07:00
msarett
7d3ff71423
Add Sk4f_RoundToInt
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2134753006
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
Review-Url: https://codereview.chromium.org/2134753006
2016-07-12 14:55:45 -07:00
fmenozzi
90ccfbaf2e
Fix Lua bugs, nit name change
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2140293002
Review-Url: https://codereview.chromium.org/2140293002
2016-07-12 14:55:39 -07:00
vjiaoblack
6d3fb898d5
Added the framework for having canvas/recorder/picture record depth_set's.
...
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2127233002
Review-Url: https://codereview.chromium.org/2127233002
2016-07-12 14:50:41 -07:00
mtklein
2052f313f0
Enable SkTaskGroup threading in monobench.
...
Without this Enabler, SkTaskGroups all run serially.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2139423002
Review-Url: https://codereview.chromium.org/2139423002
2016-07-12 14:50:28 -07:00
fmenozzi
54d500f90c
Add benchmarks for 3 and 4 colors (most common)
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2143653002
Review-Url: https://codereview.chromium.org/2143653002
2016-07-12 14:45:32 -07:00