Commit Graph

6051 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
csmartdalton
86de59f4a9 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
Review-Url: https://codereview.chromium.org/2132073002
2016-07-12 14:45:23 -07:00
msarett
aeadcdfbf2 Revert of Pre-crop filled rects to avoid scissor (patchset #6 id:100001 of https://codereview.chromium.org/2132073002/ )
Reason for revert:
I believe that this is breaking the roll.

https://codereview.chromium.org/2141923002

https://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/258434/steps/cc_unittests%20%28with%20patch%29%20on%20Mac-10.9/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

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/2145573002
2016-07-12 05:40:39 -07:00
msarett
afb8539f62 Revert of try to speed-up maprect + round2i + contains (patchset #8 id:140001 of https://codereview.chromium.org/2133413002/ )
Reason for revert:
Breaking the roll...
https://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/253294/steps/compile%20%28with%20patch%29/logs/stdio

Original issue's description:
> try to speed-up maprect + round2i + contains
>
> We call roundOut in a few places. If we can get SkNx::Ceil we could efficiently implement that as well.
>
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2133413002
> CQ_INCLUDE_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
>
> Committed: https://skia.googlesource.com/skia/+/b42b785d1cbc98bd34aceae338060831b974f9c5

TBR=mtklein@google.com,reed@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/2136343002
2016-07-11 14:57:26 -07:00
csmartdalton
7969838702 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

Review-Url: https://codereview.chromium.org/2132073002
2016-07-11 14:34:12 -07:00
reed
b42b785d1c try to speed-up maprect + round2i + contains
We call roundOut in a few places. If we can get SkNx::Ceil we could efficiently implement that as well.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2133413002
CQ_INCLUDE_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Review-Url: https://codereview.chromium.org/2133413002
2016-07-11 13:17:35 -07:00
reed
6092b6e0e5 Revert of change mapRectScaleTranslate to pass args/ret by value (patchset #1 id:1 of https://codereview.chromium.org/2137853002/ )
Reason for revert:
Triggered a compiler bug on Android?

FAILED: /usr/bin/ccache /b/work/skia/platform_tools/android/bin/../toolchains/arm-r11c-14/bin/arm-linux-androideabi-g++ -MMD -MF obj/src/core/core.SkMatrix.o.d -DSK_INTERNAL -DSK_GAMMA_APPLY_TO_A8 -DQT_NO_KEYWORDS -DSK_ALLOW_STATIC_GLOBAL_INITIALIZERS=0 -DSK_SUPPORT_GPU=1 -DSK_FORCE_DISTANCE_FIELD_TEXT=0 -DSK_HAS_GIF_LIBRARY -DSK_HAS_JPEG_LIBRARY -DSK_HAS_PNG_LIBRARY -DSK_HAS_WEBP_LIBRARY -DSK_TEST_QCMS -DSK_IS_BOT -DSK_CODEC_DECODES_RAW -DSK_ARM_HAS_NEON -DSK_BUILD_FOR_ANDROID -DSK_GAMMA_EXPONENT=1.4 -DSK_GAMMA_CONTRAST=0.0 -DSKIA_DLL -DSKIA_IMPLEMENTATION=1 -DSK_SUPPORT_LEGACY_CLIPTOLAYERFLAG -DNDEBUG -I../../../include/c -I../../../include/config -I../../../include/core -I../../../include/pathops -I../../../include/ports -I../../../include/private -I../../../include/utils -I../../../include/images -I../../../src/core -I../../../src/sfnt -I../../../src/image -I../../../src/opts -I../../../src/utils -I../../../include/gpu -I../../../src/gpu -I../../../platform_tools/android/third_party/cpufeatures -fPIC -g -fno-exceptions -fstrict-aliasing -Wall -Wextra -Winit-self -Wpointer-arith -Wsign-compare -Wvla -Wno-unused-parameter -Werror -march=armv7-a -mthumb -mfpu=neon -mfloat-abi=softfp -fuse-ld=gold -O2 -std=c++11 -fno-rtti -fno-threadsafe-statics -Wnon-virtual-dtor  -c ../../../src/core/SkMatrix.cpp -o obj/src/core/core.SkMatrix.o
../../../src/core/SkMatrix.cpp: In member function 'SkRect SkMatrix::mapRectScaleTranslate(SkRect) const':
../../../src/core/SkMatrix.cpp:1120:1: error: unrecognizable insn:
 }
 ^
(insn 32 31 33 2 (set (reg:V4SF 115 [ D.83077 ])
        (unspec:V4SF [
                (mem/c:V4SF (reg/f:SI 104 virtual-incoming-args) [0 MEM[(const __builtin_neon_sf[4] *)&src]+0 S16 A32])
            ] UNSPEC_VLD1)) /b/work/skia/platform_tools/android/toolchains/arm-r11c-14/lib/gcc/arm-linux-androideabi/4.9/include/arm_neon.h:8693 -1
     (nil))
../../../src/core/SkMatrix.cpp:1120:1: internal compiler error: in extract_insn, at recog.c:2202
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://source.android.com/source/report-bugs.html> for instructions.

Original issue's description:
> change mapRectScaleTranslate to pass args/ret by value
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2137853002
>
> TBR=mtklein
>
> Committed: https://skia.googlesource.com/skia/+/14dce6ed5934d7a6e1fac79f8e76e12f5670aae2

TBR=msarett@google.com,mtklein@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/2139523002
2016-07-10 11:45:35 -07:00
reed
14dce6ed59 change mapRectScaleTranslate to pass args/ret by value
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2137853002

TBR=mtklein

Review-Url: https://codereview.chromium.org/2137853002
2016-07-10 11:35:03 -07:00
robertphillips
443023975e Add choke point for modifying non-AA rect draws (e.g., applying clipping)
NOTREECHECKS=true
NOPRESUBMIT=true

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2125333002

Committed: https://skia.googlesource.com/skia/+/e5e3a7a5203f256083d015c923cc9c662877aba9
Review-Url: https://codereview.chromium.org/2125333002
2016-07-08 14:43:04 -07:00
robertphillips
9a4cfa81de Revert of Add choke point for modifying non-AA rect draws (e.g., applying clipping) (patchset #6 id:100001 of https://codereview.chromium.org/2125333002/ )
Reason for revert:
problems

Original issue's description:
> Add choke point for modifying non-AA rect draws (e.g., applying clipping)
>
> NOTREECHECKS=true
> NOPRESUBMIT=true
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2125333002
>
> Committed: https://skia.googlesource.com/skia/+/e5e3a7a5203f256083d015c923cc9c662877aba9

TBR=bsalomon@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.chromium.org/2136643002
2016-07-08 13:30:04 -07:00
bungeman
7ad42cfe87 Corrected test for gcc/libc++ workaround.
NOTREECHECKS=true
NOTRY=true
The presubmit bot is all hung up.

Review-Url: https://codereview.chromium.org/2136613002
2016-07-08 12:25:37 -07:00
robertphillips
e5e3a7a520 Add choke point for modifying non-AA rect draws (e.g., applying clipping)
NOTREECHECKS=true
NOPRESUBMIT=true

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2125333002

Review-Url: https://codereview.chromium.org/2125333002
2016-07-08 12:00:07 -07:00
bsalomon
6cc9006a90 Use clipped bounds for reordering decisions
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2137543002

NOTREECHECKS=true
NOPRESUBMIT=true

Review-Url: https://codereview.chromium.org/2137543002
2016-07-08 11:31:23 -07:00
bsalomon
bd2bbe4a17 Don't scissor draws overlapping the render target's edges
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2135673002

Review-Url: https://codereview.chromium.org/2135673002
2016-07-08 07:36:42 -07:00
bsalomon
f48c62fa6a Promote the GCC/libc++/<memory> 'typedef float float32_t' workaround to SkTypes.h
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2135453002

Review-Url: https://codereview.chromium.org/2135453002
2016-07-08 03:28:42 -07:00
reed
ea5a6513c0 make some canvas utils virtual (for proxy based subclasses)
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2130973002

Review-Url: https://codereview.chromium.org/2130973002
2016-07-07 16:44:27 -07:00
reed
63f30d9049 fix typos and capitalization on drawTextRSXform CL
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2123923006

Review-Url: https://codereview.chromium.org/2123923006
2016-07-07 16:32:51 -07:00
reed
45561a0b15 drawTextRSXform
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2130643004

Review-Url: https://codereview.chromium.org/2130643004
2016-07-07 12:47:17 -07:00
csmartdalton
a7f29640f6 Begin instanced rendering for simple shapes
Adds a module that performs instanced rendering and starts using it
for a select subset of draws on Mac GL platforms. The instance
processor can currently handle rects, ovals, round rects, and double
round rects. It can generalize shapes as round rects in order to
improve batching. The instance processor also employs new drawing
algorithms, irrespective of instanced rendering, that improve GPU-side
performance (e.g. sample mask, different triangle layouts, etc.).

This change only scratches the surface of instanced rendering. The
majority of draws still only have one instance. Future work may
include:

 * Passing coord transforms through the texel buffer.
 * Sending FP uniforms through instanced vertex attribs.
 * Using instanced rendering for more draws (stencil writes,
   drawAtlas, etc.).
 * Adding more shapes to the instance processor’s repertoire.
 * Batching draws that have mismatched scissors (analyzing draw
   bounds, inserting clip planes, etc.).
 * Bindless textures.
 * Uber shaders.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2066993003

Committed: https://skia.googlesource.com/skia/+/42eafa4bc00354b132ad114d22ed6b95d8849891
Review-Url: https://codereview.chromium.org/2066993003
2016-07-07 08:49:11 -07:00
mtklein
e5fb9c8079 centralize VECTORCALL as SK_VECTORCALL
Gonna start using this, might as well define it once centrally.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2126253002

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

Review-Url: https://codereview.chromium.org/2126253002
2016-07-07 08:12:09 -07:00
bsalomon
a7d85ba138 Add gm that tests shaded stroked rectangles.
Fix GPU handling of previously untested cases.

Move rect->path fallback from SkGpuDevice to GrDrawContext.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2125663003

Review-Url: https://codereview.chromium.org/2125663003
2016-07-06 11:54:59 -07:00
csmartdalton
0d28e574ac Fix caching of sample locations
The original caching logic for sample locations wishfully assumed that
the GPU would always use the same sample pattern for render targets
that had the same number of samples. It turns out we can't rely on
that. This change improves the caching logic to handle mismatched
simple patterns with the same count, and adds a unit test that
emulates different sample patterns observed on real hardware.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2111423002

Committed: https://skia.googlesource.com/skia/+/09d49a3bfe2d1e652a648ce1ea0962b38d10d166
Review-Url: https://codereview.chromium.org/2111423002
2016-07-06 09:59:43 -07:00
robertphillips
01a19504c4 Move GrNonAAFillRectPerspectiveBatch to its own file
Get this out of the way of the upcoming changes (and add a test for it)

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2108403005

Review-Url: https://codereview.chromium.org/2108403005
2016-07-06 09:58:57 -07:00
reed
41c27e15ec Experiment: add flag for finish-recording to return null
BUG=skia:5495
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2106843004

Review-Url: https://codereview.chromium.org/2106843004
2016-07-06 09:29:17 -07:00
liyuqian
97a0918715 Try fix the mac build bot after removing Android SampleApp
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2117793002

Review-Url: https://codereview.chromium.org/2117793002
2016-07-06 07:52:08 -07:00
fmalita
03912f141f Document SkSurface::MakeRaster's memory initialization
So clients don't go clearing w/ SK_ColorTRANSPARENT unnecessarily.

R=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2066903003

Review-Url: https://codereview.chromium.org/2066903003
2016-07-06 06:22:06 -07:00
reed
2dcb615c6f make setScaleTranslate public
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2122093002

TBR=

Review-Url: https://codereview.chromium.org/2122093002
2016-07-05 20:10:42 -07:00
ksakamoto
ec7f2ac728 Revert of Begin instanced rendering for simple shapes (patchset #20 id:380001 of https://codereview.chromium.org/2066993003/ )
Reason for revert:
This caused static initializer regressions in Chromium (crbug.com/625728).

Relevant build logs here:
Linux:
https://build.chromium.org/p/chromium/builders/Linux%20x64/builds/21849

Mac:
https://build.chromium.org/p/chromium/builders/Mac/builds/17350

Relevant lines from the error log:
Linux:
# InstanceProcessor.cpp GrUniqueKey::GenerateDomain()
# InstanceProcessor.cpp gr_instanced::kShapeBufferDomain
FAILED linux-release-64/sizes/nacl_helper-si/initializers: actual 8, expected 7, better lower
FAILED linux-release-64/sizes/chrome-si/initializers: actual 8, expected 7, better lower

Mac:
FAILED mac-release/sizes/chrome-si/initializers: actual 2, expected 0, better lower

Original issue's description:
> Begin instanced rendering for simple shapes
>
> Adds a module that performs instanced rendering and starts using it
> for a select subset of draws on Mac GL platforms. The instance
> processor can currently handle rects, ovals, round rects, and double
> round rects. It can generalize shapes as round rects in order to
> improve batching. The instance processor also employs new drawing
> algorithms, irrespective of instanced rendering, that improve GPU-side
> performance (e.g. sample mask, different triangle layouts, etc.).
>
> This change only scratches the surface of instanced rendering. The
> majority of draws still only have one instance. Future work may
> include:
>
>  * Passing coord transforms through the texel buffer.
>  * Sending FP uniforms through instanced vertex attribs.
>  * Using instanced rendering for more draws (stencil writes,
>    drawAtlas, etc.).
>  * Adding more shapes to the instance processor’s repertoire.
>  * Batching draws that have mismatched scissors (analyzing draw
>    bounds, inserting clip planes, etc.).
>  * Bindless textures.
>  * Uber shaders.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2066993003
>
> Committed: https://skia.googlesource.com/skia/+/42eafa4bc00354b132ad114d22ed6b95d8849891

NOTREECHECKS=true
TBR=bsalomon@google.com,egdaniel@google.com,robertphillips@google.com,csmartdalton@google.com
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=skia:

Review-Url: https://codereview.chromium.org/2123693002
2016-07-05 03:54:53 -07:00
rmistry
42e6798696 Revert of Fix caching of sample locations (patchset #3 id:40001 of https://codereview.chromium.org/2111423002/ )
Reason for revert:
Seems to be causing Chromium roll failures:
* https://codereview.chromium.org/2120373003
* https://codereview.chromium.org/2117193002
* https://codereview.chromium.org/2124653002

Original issue's description:
> Fix caching of sample locations
>
> The original caching logic for sample locations wishfully assumed that
> the GPU would always use the same sample pattern for render targets
> that had the same number of samples. It turns out we can't rely on
> that. This change improves the caching logic to handle mismatched
> simple patterns with the same count, and adds a unit test that
> emulates different sample patterns observed on real hardware.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2111423002
>
> Committed: https://skia.googlesource.com/skia/+/09d49a3bfe2d1e652a648ce1ea0962b38d10d166

TBR=bsalomon@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/2120403002
2016-07-04 17:45:06 -07:00
csmartdalton
09d49a3bfe Fix caching of sample locations
The original caching logic for sample locations wishfully assumed that
the GPU would always use the same sample pattern for render targets
that had the same number of samples. It turns out we can't rely on
that. This change improves the caching logic to handle mismatched
simple patterns with the same count, and adds a unit test that
emulates different sample patterns observed on real hardware.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2111423002

Review-Url: https://codereview.chromium.org/2111423002
2016-07-04 15:55:17 -07:00
reed
2b2810b4eb all dumpcanvas to be built in release
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2123633002

TBR=

Review-Url: https://codereview.chromium.org/2123633002
2016-07-04 14:28:32 -07:00
csmartdalton
42eafa4bc0 Begin instanced rendering for simple shapes
Adds a module that performs instanced rendering and starts using it
for a select subset of draws on Mac GL platforms. The instance
processor can currently handle rects, ovals, round rects, and double
round rects. It can generalize shapes as round rects in order to
improve batching. The instance processor also employs new drawing
algorithms, irrespective of instanced rendering, that improve GPU-side
performance (e.g. sample mask, different triangle layouts, etc.).

This change only scratches the surface of instanced rendering. The
majority of draws still only have one instance. Future work may
include:

 * Passing coord transforms through the texel buffer.
 * Sending FP uniforms through instanced vertex attribs.
 * Using instanced rendering for more draws (stencil writes,
   drawAtlas, etc.).
 * Adding more shapes to the instance processor’s repertoire.
 * Batching draws that have mismatched scissors (analyzing draw
   bounds, inserting clip planes, etc.).
 * Bindless textures.
 * Uber shaders.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2066993003

Review-Url: https://codereview.chromium.org/2066993003
2016-06-30 12:15:49 -07:00
halcanary
9f4b332f59 SkPDF: allow overriding Producer metadata
I recommend not using this functionality.

Also, some documentation.

BUG=skia:5436

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2074583003

Review-Url: https://codereview.chromium.org/2074583003
2016-06-30 08:22:04 -07:00