robertphillips [Thu, 21 Apr 2016 18:27:43 +0000 (11:27 -0700)]
Guard against FramebufferStatus checks in GrGLRenderTarget
BUG=skia:5200
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1905063002
Review URL: https://codereview.chromium.org/
1905063002
robertphillips [Thu, 21 Apr 2016 18:05:32 +0000 (11:05 -0700)]
Hide SkCanvas::LayerIter
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1897863008
Committed: https://skia.googlesource.com/skia/+/
a814000cbb0e90624a410b4359fff7f3ec66f0e0
Review URL: https://codereview.chromium.org/
1897863008
halcanary [Thu, 21 Apr 2016 17:54:11 +0000 (10:54 -0700)]
SkPathEffect.h: add SK_API where needed
motivation: .so fiddle
TBR=reed@google.com
no api chages, only visibility
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1908893004
Review URL: https://codereview.chromium.org/
1908893004
bungeman [Thu, 21 Apr 2016 17:52:03 +0000 (10:52 -0700)]
Fix indentation and casts in SkTArray.
Review URL: https://codereview.chromium.org/
1902423007
mtklein [Thu, 21 Apr 2016 17:34:41 +0000 (10:34 -0700)]
SkCpu w/o static initializer
I think I cracked it.
Though, this may not technically be legal C++...
I've only got one definition of SkCpu::gCachedFeatures,
but two different declarations: non-const in SkCpu.cpp, const elsewhere.
Is this...
- legal C++?
- not C++ but probably works as I think?
- not C++ and will probably blow up?
- who knows, let's see?
I have tested that the features are cached properly, read properly, and that the generated code treats SkCpu::gCachedFeatures as a global constant outside SkCpu.cpp. So it all observably works optimally.
Expanding testing to more bots.
TBR=reed@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1905683003
Review URL: https://codereview.chromium.org/
1905683003
halcanary [Thu, 21 Apr 2016 16:56:43 +0000 (09:56 -0700)]
gDefaultProfileIsSRGB symbol must exist in .so
fix fiddle
TBR=
Review URL: https://codereview.chromium.org/
1912593003
brianosman [Thu, 21 Apr 2016 15:48:18 +0000 (08:48 -0700)]
Remove obsolete image codec colorspace hacks.
With Herb's latest change, the codecs themselves are emitting images
tagged based on the new (separate) global flag. All of the changes we
had here to fixup color profile type are no longer needed (and just
create more confusion). This change effectively reverts the file to
where it was two commits ago.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1904943003
Review URL: https://codereview.chromium.org/
1904943003
herb [Thu, 21 Apr 2016 15:45:39 +0000 (08:45 -0700)]
Fix code regression to more precise call.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1905993002
Review URL: https://codereview.chromium.org/
1905993002
krasin [Thu, 21 Apr 2016 15:34:00 +0000 (08:34 -0700)]
SkTArray: fix invalid reinterpret_casts over non-initialized memory.
This should fix 'CFI Linux' buildbot, which is currently horribly broken:
https://build.chromium.org/p/chromium.fyi/builders/CFI%20Linux/builds/5115
BUG=605337
Review URL: https://codereview.chromium.org/
1908763002
brianosman [Thu, 21 Apr 2016 15:29:06 +0000 (08:29 -0700)]
Include scaler context flags (gamma and contrast boost) in the text blob cache key.
Fixes a bug in skiaserve when switching between L32 and S32 modes - we were
reusing blobs created with the other (wrong) masks.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1905683004
Review URL: https://codereview.chromium.org/
1905683004
egdaniel [Thu, 21 Apr 2016 15:03:10 +0000 (08:03 -0700)]
Update min Vulkan version to 1.0.8.0, and fix various bugs
With updating the SDK, the debug layers also showed multiple bugs.
I have fixed those as well in this CL. These include:
1. Incorrectly tracking the allocated descriptor sets from the descriptor pools
2. Using MemoryBarriers inside render passes.
3. Correctly setting the Stencil Image layout anytime we are using a render pass with a stencil attachment
4. Setting the correct aspect mask for Depth/Stencil in a barrier.
TBR=bsalomon@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1906623002
Review URL: https://codereview.chromium.org/
1906623002
djsollen [Thu, 21 Apr 2016 14:59:44 +0000 (07:59 -0700)]
VulkanViewer on Android
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1903253003
Review URL: https://codereview.chromium.org/
1903253003
cdalton [Thu, 21 Apr 2016 14:41:50 +0000 (07:41 -0700)]
Fix data parameter for createBuffer
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1911703002
Review URL: https://codereview.chromium.org/
1911703002
mtklein [Thu, 21 Apr 2016 14:01:19 +0000 (07:01 -0700)]
Call SkGraphics::Init() automatically for Google3 processes.
This is logically a partial revert of https://codereview.chromium.org/
1903503002.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1906813002
Review URL: https://codereview.chromium.org/
1906813002
senorblanco [Thu, 21 Apr 2016 13:49:15 +0000 (06:49 -0700)]
Image filters: remove SkBitmap-based cache.
Also some #include cleanup.
TBR=reed@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1905753002
Review URL: https://codereview.chromium.org/
1905753002
robertphillips [Thu, 21 Apr 2016 12:17:28 +0000 (05:17 -0700)]
Remove stray files
TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1912583002
Review URL: https://codereview.chromium.org/
1912583002
fmalita [Thu, 21 Apr 2016 00:03:38 +0000 (17:03 -0700)]
Revert of Hide SkCanvas::LayerIter (patchset #2 id:20001 of https://codereview.chromium.org/
1897863008/ )
Reason for revert:
Das roll ist gebusted: https://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/214775/steps/compile%20%28with%20patch%29/logs/stdio
FAILED: /b/build/slave/cache/cipd/goma/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/third_party/WebKit/Source/platform/graphics/paint/blink_platform_unittests.PaintArtifactToSkCanvasTest.o.d -DV8_DEPRECATION_WARNINGS -DCLD_VERSION=2 -D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORE=0 -DCHROMIUM_BUILD -DCR_CLANG_REVISION=266460-1 -DUSE_LIBJPEG_TURBO=1 -DENABLE_WEBRTC=1 -DENABLE_MEDIA_ROUTER=1 -DUSE_PROPRIETARY_CODECS -DENABLE_PEPPER_CDMS -DENABLE_NOTIFICATIONS -DENABLE_TOPCHROME_MD=1 -DDCHECK_ALWAYS_ON=1 -DFIELDTRIAL_TESTING_ENABLED -DENABLE_TASK_MANAGER=1 -DENABLE_EXTENSIONS=1 -DENABLE_PDF=1 -DENABLE_PLUGIN_INSTALLATION=1 -DENABLE_PLUGINS=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_THEMES=1 -DENABLE_AUTOFILL_DIALOG=1 -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DUSE_BROWSER_SPELLCHECKER=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_APP_LIST=1 -DENABLE_SETTINGS_APP=1 -DENABLE_SUPERVISED_USERS=1 -DENABLE_SERVICE_DISCOVERY=1 -DV8_USE_EXTERNAL_STARTUP_DATA -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DINSIDE_BLINK -DMOJO_USE_SYSTEM_IMPL -DGTEST_HAS_POSIX_RE=0 -DGTEST_LANG_CXX11=0 -DUNIT_TEST -DGTEST_HAS_RTTI=0 -DENABLE_LAYOUT_UNIT_IN_INLINE_BOXES=0 -DENABLE_OILPAN=1 -DWTF_USE_CONCATENATED_IMPULSE_RESPONSES=1 -DENABLE_INPUT_MULTIPLE_FIELDS_UI=1 -DWTF_USE_ICCJPEG=1 -DWTF_USE_QCMSLIB=1 -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DU_NOEXCEPT= -DU_STATIC_IMPLEMENTATION -DSK_SUPPORT_GPU=1 -DSK_IGNORE_LINEONLY_AA_CONVEX_PATH_OPTS -DCHROME_PNG_WRITE_SUPPORT -DPNG_USER_CONFIG -DUSE_LIBPCI=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -D_FORTIFY_SOURCE=2 -Igen -Igen/blink -I../.. -I../../skia/config -I../../third_party/WebKit/Source -I../../third_party/khronos -I../../gpu -Igen/angle -I../../third_party/WebKit -Igen/third_party/WebKit -I../../testing/gmock/include -I../../testing/gtest/include -I../../third_party/icu/source/i18n -I../../third_party/icu/source/common -I../../third_party/skia/include/core -I../../third_party/skia/include/effects -I../../third_party/skia/include/pdf -I../../third_party/skia/include/gpu -I../../third_party/skia/include/lazy -I../../third_party/skia/include/pathops -I../../third_party/skia/include/pipe -I../../third_party/skia/include/ports -I../../third_party/skia/include/utils -I../../third_party/skia/include/utils/mac -I../../skia/ext -I../../third_party/harfbuzz-ng/src -I../../third_party/qcms/src -I../../third_party/libpng -I../../third_party/zlib -I../../third_party/libwebp -I../../third_party/ots/include -I../../v8/include -I../../third_party/iccjpeg -I../../third_party/libjpeg_turbo -isysroot /Applications/Xcode5.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -O2 -fvisibility=hidden -Werror -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-selector-type-mismatch -Wpartial-availability -Wheader-hygiene -Wno-char-subscripts -Wno-unneeded-internal-declaration -Wno-covered-switch-default -Wstring-conversion -Wno-c++11-narrowing -Wno-deprecated-register -Wno-inconsistent-missing-override -Wno-shift-negative-value -std=c++11 -stdlib=libc++ -fno-rtti -fno-exceptions -fvisibility-inlines-hidden -fno-threadsafe-statics -Xclang -load -Xclang /b/build/slave/mac/build/src/third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.dylib -Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang check-templates -Xclang -plugin-arg-find-bad-constructs -Xclang follow-macro-expansion -Xclang -plugin-arg-find-bad-constructs -Xclang check-implicit-copy-ctors -fcolor-diagnostics -fno-strict-aliasing -Xclang -load -Xclang /b/build/slave/mac/build/src/third_party/llvm-build/Release+Asserts/lib/libBlinkGCPlugin.dylib -Xclang -add-plugin -Xclang blink-gc-plugin -Xclang -plugin-arg-blink-gc-plugin -Xclang enable-oilpan -Xclang -plugin-arg-blink-gc-plugin -Xclang warn-raw-ptr -c ../../third_party/WebKit/Source/platform/graphics/paint/PaintArtifactToSkCanvasTest.cpp -o obj/third_party/WebKit/Source/platform/graphics/paint/blink_platform_unittests.PaintArtifactToSkCanvasTest.o
../../third_party/WebKit/Source/platform/graphics/paint/PaintArtifactToSkCanvasTest.cpp:201:22: error: 'LayerIter' is a protected member of 'SkCanvas'
return SkCanvas::LayerIter(canvas, false).clip();
^
../../third_party/skia/include/core/SkCanvas.h:1230:18: note: declared protected here
class SK_API LayerIter /*: SkNoncopyable*/ {
^
1 error generated.
ninja: build stopped: subcommand failed.
Original issue's description:
> Hide SkCanvas::LayerIter
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1897863008
>
> Committed: https://skia.googlesource.com/skia/+/
a814000cbb0e90624a410b4359fff7f3ec66f0e0
TBR=reed@google.com,robertphillips@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/
1906573003
reed [Wed, 20 Apr 2016 23:36:51 +0000 (16:36 -0700)]
post apply non-scale transforms after imagefilters have run
may choose to eliminate the final matrix-filter buffer before the sprite blit, but at the moment want to defer that change to a 2nd CL.
heavily inspired by https://codereview.chromium.org/
1140943004
Need these CLs to land first:
https://codereview.chromium.org/
1898193005/#
https://codereview.chromium.org/
1902253003/
BUG=skia:3288
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1899263002
Review URL: https://codereview.chromium.org/
1899263002
robertphillips [Wed, 20 Apr 2016 22:57:27 +0000 (15:57 -0700)]
Hide SkCanvas::LayerIter
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1897863008
Review URL: https://codereview.chromium.org/
1897863008
herb [Wed, 20 Apr 2016 22:07:32 +0000 (15:07 -0700)]
Make all the codecs default profiles based on gTreatSkColorAsSRGB.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1893203006
Review URL: https://codereview.chromium.org/
1893203006
mtklein [Wed, 20 Apr 2016 20:49:15 +0000 (13:49 -0700)]
SkOnce: 2 bytes -> 1 byte
This uses the same logic we worked out for SkOncePtr to reduce
the memory footprint of SkOnce from a done byte and lock byte
to a single 3-state byte:
- NotStarted: no thread has tried to run fn() yet
- Active: a thread is running fn()
- Done: fn() is complete
Threads which see Done return immediately.
Threads which see NotStarted try to move to Active, run fn(), then move to Done.
Threads which see Active spin until the active thread moves to Done.
This additionally fixes a too-weak memory order bug in SkOncePtr,
and adds a big note to explain.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1904483003
Committed: https://skia.googlesource.com/skia/+/
df02d338be8e3c1c50b48a3a9faa582703a39c07
Review URL: https://codereview.chromium.org/
1904483003
mtklein [Wed, 20 Apr 2016 20:02:08 +0000 (13:02 -0700)]
Revert of SkOnce: 2 bytes -> 1 byte (patchset #4 id:60001 of https://codereview.chromium.org/
1904483003/ )
Reason for revert:
bust the roll
Original issue's description:
> SkOnce: 2 bytes -> 1 byte
>
> This uses the same logic we worked out for SkOncePtr to reduce
> the memory footprint of SkOnce from a done byte and lock byte
> to a single 3-state byte:
>
> - NotStarted: no thread has tried to run fn() yet
> - Active: a thread is running fn()
> - Done: fn() is complete
>
> Threads which see Done return immediately.
> Threads which see NotStarted try to move to Active, run fn(), then move to Done.
> Threads which see Active spin until the active thread moves to Done.
>
> This additionally fixes a too-weak memory order bug in SkOncePtr,
> and adds a big note to explain.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1904483003
>
> Committed: https://skia.googlesource.com/skia/+/
df02d338be8e3c1c50b48a3a9faa582703a39c07
TBR=herb@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/
1898413004
msarett [Wed, 20 Apr 2016 18:53:35 +0000 (11:53 -0700)]
Add SkEncodedInfo to report properties of encoded image data
All this does is build an SkEncodedInfo for each codec, and
then convert it to an SkImageInfo.
In future steps I intend to:
(1) Use SkEncodedInfo in place of SrcConfig in SkSwizzler.
(2) Support more conversions in SkSwizzler (non-native
BGRA/RGBA, 16-bit components, float, fixed point)
(3) Investigate optimizing conversions from encoded data
to linear color spaces.
BUG=skia:4133
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1820073002
Committed: https://skia.googlesource.com/skia/+/
f682d9ad70d690a343bc15e26ef321d86770be41
Review URL: https://codereview.chromium.org/
1820073002
robertphillips [Wed, 20 Apr 2016 18:48:36 +0000 (11:48 -0700)]
Begin removing deprecated (and now, unused) ImageFilter code paths
This CL focuses on removing the Proxy objects but takes some other stuff with it.
BUG=skia:4965
TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1896383003
Review URL: https://codereview.chromium.org/
1896383003
robertphillips [Wed, 20 Apr 2016 18:43:33 +0000 (11:43 -0700)]
Fix ImageFilter fuzzer issue
What appears to be happening in this fuzz is that a paint index inside the picture of an SkPictureImageFilter is getting changed to be out of range.
BUG=skia:5192
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1893423002
Review URL: https://codereview.chromium.org/
1893423002
mtklein [Wed, 20 Apr 2016 17:54:54 +0000 (10:54 -0700)]
SkOnce: 2 bytes -> 1 byte
This uses the same logic we worked out for SkOncePtr to reduce
the memory footprint of SkOnce from a done byte and lock byte
to a single 3-state byte:
- NotStarted: no thread has tried to run fn() yet
- Active: a thread is running fn()
- Done: fn() is complete
Threads which see Done return immediately.
Threads which see NotStarted try to move to Active, run fn(), then move to Done.
Threads which see Active spin until the active thread moves to Done.
This additionally fixes a too-weak memory order bug in SkOncePtr,
and adds a big note to explain.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1904483003
Review URL: https://codereview.chromium.org/
1904483003
brianosman [Wed, 20 Apr 2016 17:52:54 +0000 (10:52 -0700)]
Get skiaserve working on Windows.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1903203003
Review URL: https://codereview.chromium.org/
1903203003
jvanverth [Wed, 20 Apr 2016 17:33:27 +0000 (10:33 -0700)]
Revert of Use transfer buffer for BatchAtlas texture copies (patchset #9 id:160001 of https://codereview.chromium.org/
1888473002/ )
Reason for revert:
Lots of sync issues with paths and text.
Original issue's description:
> Use transfer buffer for BatchAtlas texture copies.
>
> Sets up use of transfer buffer (if available) to do one-copy transfers.
> Get transfer buffers working properly in GL.
> Implement GrVkGpu::onTransferPixels.
> Check caps to ensure we can create a transfer buffer.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1888473002
>
> Committed: https://skia.googlesource.com/skia/+/
b0ec9836dbf7f2304a3a29289b818719ca0a39bd
TBR=robertphillips@google.com,egdaniel@google.com,bsalomon@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/
1904723003
bungeman [Wed, 20 Apr 2016 17:22:20 +0000 (10:22 -0700)]
SkTArray movable and swap for move only elements.
SkTArray cannot currently contain move only elements because its swap
currently requires the SkTArray to be copyable. This makes SkTArray
movable and makes its swap move instead of copy.
Review URL: https://codereview.chromium.org/
1904663004
brianosman [Wed, 20 Apr 2016 16:20:46 +0000 (09:20 -0700)]
Add control of the sRGB global hack flag in SampleApp
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1893313006
Review URL: https://codereview.chromium.org/
1893313006
halcanary [Wed, 20 Apr 2016 15:49:53 +0000 (08:49 -0700)]
gyp: add osmesa target to factor out common code
Test this out with `GYP_DEFINES=skia_mesa=1`.
Also uses the `library_dirs` keyword, which is relatively new.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1903233002
Review URL: https://codereview.chromium.org/
1903233002
halcanary [Wed, 20 Apr 2016 15:37:43 +0000 (08:37 -0700)]
SkFontHost/FreeType/ToUnicode: add an assert
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1900193002
Review URL: https://codereview.chromium.org/
1900193002
scroggo [Wed, 20 Apr 2016 15:27:18 +0000 (08:27 -0700)]
Add instructions for building with MSAN
Move static functions only used by GPU into if SK_SUPPORT_GPU guard.
This enables building MSAN, which seems to default to not supporting
GPU.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1908493002
DOCS_PREVIEW= https://skia.org/?cl=
1908493002
Review URL: https://codereview.chromium.org/
1908493002
egdaniel [Wed, 20 Apr 2016 14:09:46 +0000 (07:09 -0700)]
Refactor how we store and use samplers in Ganesh
The main goal of this refactorization is to allow Vulkan to use separate
sampler and texture objects in the shader and descriptor sets and combine
them into a sampler2d in the shader where needed.
A large part of this is separating how we store samplers and uniforms in the
UniformHandler. We no longer need to store handles to samplers besides when
we are initially emitting code. After we emit code all we ever do is loop over
all samplers and do some processor independent work on them, so we have no need
for direct access to individual samplers.
In the GLProgram all we ever do is set the sampler uniforms in the ctor and never
touch them again, so no need to save sampler info there. The texture access on
program reuse just assume that they come in the same order as we set the texture
units for the samplers
For Vulkan, it is a similar story. We create the descriptor set layouts with the samplers,
then when we get new textures, we just assume they come in in the same order as we
set the samplers on the descriptor sets. Thus no need to save direct vulkan info.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1885863004
Committed: https://skia.googlesource.com/skia/+/
45b61a1c4c0be896e7b12fd1405abfece799114f
Review URL: https://codereview.chromium.org/
1885863004
jvanverth [Wed, 20 Apr 2016 12:54:01 +0000 (05:54 -0700)]
Use transfer buffer for BatchAtlas texture copies.
Sets up use of transfer buffer (if available) to do one-copy transfers.
Get transfer buffers working properly in GL.
Implement GrVkGpu::onTransferPixels.
Check caps to ensure we can create a transfer buffer.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1888473002
Review URL: https://codereview.chromium.org/
1888473002
robertphillips [Wed, 20 Apr 2016 12:29:51 +0000 (05:29 -0700)]
Rein in the use of SkDevice.h
Nothing interesting.
TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1904673003
Review URL: https://codereview.chromium.org/
1904673003
svaisanen [Wed, 20 Apr 2016 07:36:53 +0000 (00:36 -0700)]
Enable NV_path_rendering in the Null GL.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1882563002
Review URL: https://codereview.chromium.org/
1882563002
brianosman [Wed, 20 Apr 2016 02:41:54 +0000 (19:41 -0700)]
Fix DM blaze build (PNG output is now dependent on picture_utils)
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1902333002
Review URL: https://codereview.chromium.org/
1902333002
egdaniel [Tue, 19 Apr 2016 22:24:29 +0000 (15:24 -0700)]
Revert of Refactor how we store and use samplers in Ganesh (patchset #7 id:120001 of https://codereview.chromium.org/
1885863004/ )
Reason for revert:
breaking bots
Original issue's description:
> Refactor how we store and use samplers in Ganesh
>
> The main goal of this refactorization is to allow Vulkan to use separate
> sampler and texture objects in the shader and descriptor sets and combine
> them into a sampler2d in the shader where needed.
>
> A large part of this is separating how we store samplers and uniforms in the
> UniformHandler. We no longer need to store handles to samplers besides when
> we are initially emitting code. After we emit code all we ever do is loop over
> all samplers and do some processor independent work on them, so we have no need
> for direct access to individual samplers.
>
> In the GLProgram all we ever do is set the sampler uniforms in the ctor and never
> touch them again, so no need to save sampler info there. The texture access on
> program reuse just assume that they come in the same order as we set the texture
> units for the samplers
>
> For Vulkan, it is a similar story. We create the descriptor set layouts with the samplers,
> then when we get new textures, we just assume they come in in the same order as we
> set the samplers on the descriptor sets. Thus no need to save direct vulkan info.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1885863004
>
> Committed: https://skia.googlesource.com/skia/+/
45b61a1c4c0be896e7b12fd1405abfece799114f
TBR=bsalomon@google.com,jvanverth@google.com,cdalton@nvidia.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/
1896013003
egdaniel [Tue, 19 Apr 2016 21:45:57 +0000 (14:45 -0700)]
Refactor how we store and use samplers in Ganesh
The main goal of this refactorization is to allow Vulkan to use separate
sampler and texture objects in the shader and descriptor sets and combine
them into a sampler2d in the shader where needed.
A large part of this is separating how we store samplers and uniforms in the
UniformHandler. We no longer need to store handles to samplers besides when
we are initially emitting code. After we emit code all we ever do is loop over
all samplers and do some processor independent work on them, so we have no need
for direct access to individual samplers.
In the GLProgram all we ever do is set the sampler uniforms in the ctor and never
touch them again, so no need to save sampler info there. The texture access on
program reuse just assume that they come in the same order as we set the texture
units for the samplers
For Vulkan, it is a similar story. We create the descriptor set layouts with the samplers,
then when we get new textures, we just assume they come in in the same order as we
set the samplers on the descriptor sets. Thus no need to save direct vulkan info.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1885863004
Review URL: https://codereview.chromium.org/
1885863004
robertphillips [Tue, 19 Apr 2016 21:23:42 +0000 (14:23 -0700)]
Add explicit clip to SkSpecialSurface's SkCanvas
It seems safer (and is probably more performant) to enforce this internal to SkSpecialSurface.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1903553002
Review URL: https://codereview.chromium.org/
1903553002
mtklein [Tue, 19 Apr 2016 21:21:30 +0000 (14:21 -0700)]
skcpu: sse4.1 floor, f16c f16<->f32
- floor with roundps is about 4.5x faster when available
- f16 srcover_n is similar to but a little faster than the version in https://codereview.chromium.org/
1884683002. This new one fuses the dst load/stores into the f16<->f32 conversions:
+0x180 movups (%r15), %xmm1
+0x184 vcvtph2ps (%rbx), %xmm2
+0x189 movaps %xmm1, %xmm3
+0x18c shufps $255, %xmm3, %xmm3
+0x190 movaps %xmm0, %xmm4
+0x193 subps %xmm3, %xmm4
+0x196 mulps %xmm2, %xmm4
+0x199 addps %xmm1, %xmm4
+0x19c vcvtps2ph $0, %xmm4, (%rbx)
+0x1a2 addq $16, %r15
+0x1a6 addq $8, %rbx
+0x1aa decl %r14d
+0x1ad jne +0x180
If we decide to land this it'd be a good idea to convert most or all users of SkFloatToHalf_01 and SkHalfToFloat_01 over to the pointer-based versions.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1891513002
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
Committed: https://skia.googlesource.com/skia/+/
cbe3c1af987d622ea67ef560d855b41bb14a0ce9
Committed: https://skia.googlesource.com/skia/+/
3faf74b8364491ca806f523fbb1d8a97be592663
Review URL: https://codereview.chromium.org/
1891513002
reed [Tue, 19 Apr 2016 21:02:52 +0000 (14:02 -0700)]
add gm to exercise rotated imagefiltesr w/ and w/o antialiasing
BUG=skia:3288
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1902253003
Review URL: https://codereview.chromium.org/
1902253003
mtklein [Tue, 19 Apr 2016 21:00:13 +0000 (14:00 -0700)]
Move CPU feature detection to its own file.
- Moves CPU feature detection to its own file.
- Cleans up some redundant feature detection scattered around core/ and opts/.
- Can now detect a few new CPU features:
* F16C -> Intel f16<->f32 instructions, added between AVX and AVX2
* FMA -> Intel FMA instructions, added at the same time as AVX2
* VFP_FP16 -> ARM f16<->f32 instructions, quite common
* NEON_FMA -> ARM FMA instructions, also quite common
* SSE and SSE3... why not?
This new internal API makes it very cheap to do fine-grained runtime CPU
feature detection. Redundant calls to SkCpu::Supports() should be eliminated
and it's hoistable out of loops. It compiles away entirely when we have the
appropriate instructions available at compile time.
This means we can call it to guard even a little snippet of 1 or 2 instructions
right where needed and let inlining hoist the check (if any at all) up to
somewhere that doesn't hurt performance. I've explained how I made this work
in the private section of the new header.
Once this lands and bakes a bit, I'll start following up with CLs to use it more
and to add a bunch of those little 1-2 instruction snippets we've been wanting,
e.g. cvtps2ph, cvtph2ps, ptest, pmulld, pmovzxbd, blendvps, pshufb, roundps
(for floor) on x86, and vcvt.f32.f16, vcvt.f16.f32 on ARM.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1890483002
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
Committed: https://skia.googlesource.com/skia/+/
872ea29357439f05b1f6995dd300fc054733e607
Review URL: https://codereview.chromium.org/
1890483002
brianosman [Tue, 19 Apr 2016 19:47:54 +0000 (12:47 -0700)]
Adding support for controlling the global sRGB SkColor switch.
Frontend change: https://codereview.chromium.org/
1900233002/
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1902143002
Review URL: https://codereview.chromium.org/
1902143002
mtklein [Tue, 19 Apr 2016 19:42:24 +0000 (12:42 -0700)]
Remove static initializer for SkOpts::Init()
Static initializers run in a confusing unspecified order,
so it's best to have as few of them as possible.
Most tools and clients I can find already call SkGraphics::Init(),
(or equivalently create an SkAutoGraphics) which calls SkOpts::Init():
- Chrome
- Chrome renderer
- Android
- DM
- nanobench
- SampleApp
- VisualBench
- the old debugger
Seems like the only thing relying on this static initializer today is
the new debugger, fixed here.
TBR=reed@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1903503002
Review URL: https://codereview.chromium.org/
1903503002
herb [Tue, 19 Apr 2016 19:30:22 +0000 (12:30 -0700)]
Add onImageInfo call to SkImage_Base.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1903483003
Review URL: https://codereview.chromium.org/
1903483003
egdaniel [Tue, 19 Apr 2016 19:13:41 +0000 (12:13 -0700)]
Fix createBuffer in Vulkan
TBR=bsalomon@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1897373002
Review URL: https://codereview.chromium.org/
1897373002
robertphillips [Tue, 19 Apr 2016 17:21:02 +0000 (10:21 -0700)]
Switch SkColorFilterImageFilter over to new onFilterImage interface (again)
Back when this was originally reverted I was able to easily repro the perf regression locally. At ToT Skia/Chrome I can no longer repro the perf regression with this CL (in fact there is a modest perf improvement).
I propose landing this and then watching the Chromium perf bots.
BUG=602300,598028
TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1901513002
Review URL: https://codereview.chromium.org/
1901513002
brianosman [Tue, 19 Apr 2016 17:16:53 +0000 (10:16 -0700)]
Adding support for playback to L32/S32/F16 canvas.
Playback of my test GM works correctly on both raster and GPU, in all three modes.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1893393002
Review URL: https://codereview.chromium.org/
1893393002
cdalton [Tue, 19 Apr 2016 17:00:02 +0000 (10:00 -0700)]
Add optional data parameter to createBuffer
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1877073002
Review URL: https://codereview.chromium.org/
1877073002
robertphillips [Tue, 19 Apr 2016 16:29:01 +0000 (09:29 -0700)]
Make skpinfo more human friendly
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1901713004
Review URL: https://codereview.chromium.org/
1901713004
brianosman [Tue, 19 Apr 2016 16:18:11 +0000 (09:18 -0700)]
Move DM png code to picture_utils, for use by other tools.
Planning to re-use this code in skiaserve in an upcoming change.
TBR=mtklein@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1901113002
Review URL: https://codereview.chromium.org/
1901113002
halcanary [Tue, 19 Apr 2016 15:46:50 +0000 (08:46 -0700)]
fiddle_build_test/gyp: fix mac mesa build (2)
TBR=
NOTRY=true
Review URL: https://codereview.chromium.org/
1900173002
robertphillips [Tue, 19 Apr 2016 15:32:40 +0000 (08:32 -0700)]
Add more diagnostic messages to ReadWriteAlpha test
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1902063002
Review URL: https://codereview.chromium.org/
1902063002
scroggo [Tue, 19 Apr 2016 15:27:39 +0000 (08:27 -0700)]
Rename CodexTest.cpp to CodecTest.cpp
CodexTest confuses me almost every time I try to open it. Renaming it
to what my brain thinks it should be called.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1897973004
Review URL: https://codereview.chromium.org/
1897973004
halcanary [Tue, 19 Apr 2016 15:00:01 +0000 (08:00 -0700)]
fiddle_build_test/gyp: fix mac mesa build
TBR=
NOTRY=true
Review URL: https://codereview.chromium.org/
1900143002
msarett [Tue, 19 Apr 2016 14:27:58 +0000 (07:27 -0700)]
Delete unused fNamedFactorySet from SkWriteBuffer
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1903483002
Review URL: https://codereview.chromium.org/
1903483002
robertphillips [Tue, 19 Apr 2016 11:41:12 +0000 (04:41 -0700)]
Revert of Add SkEncodedInfo to report properties of encoded image data (patchset #6 id:200001 of https://codereview.chromium.org/
1820073002/ )
Reason for revert:
Lots of bots failing
Original issue's description:
> Add SkEncodedInfo to report properties of encoded image data
>
> All this does is build an SkEncodedInfo for each codec, and
> then convert it to an SkImageInfo.
>
> In future steps I intend to:
> (1) Use SkEncodedInfo in place of SrcConfig in SkSwizzler.
> (2) Support more conversions in SkSwizzler (non-native
> BGRA/RGBA, 16-bit components, float, fixed point)
> (3) Investigate optimizing conversions from encoded data
> to linear color spaces.
>
> BUG=skia:4133
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1820073002
>
> Committed: https://skia.googlesource.com/skia/+/
f682d9ad70d690a343bc15e26ef321d86770be41
TBR=scroggo@google.com,reed@google.com,msarett@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4133
Review URL: https://codereview.chromium.org/
1895383002
msarett [Mon, 18 Apr 2016 23:20:00 +0000 (16:20 -0700)]
Add SkEncodedInfo to report properties of encoded image data
All this does is build an SkEncodedInfo for each codec, and
then convert it to an SkImageInfo.
In future steps I intend to:
(1) Use SkEncodedInfo in place of SrcConfig in SkSwizzler.
(2) Support more conversions in SkSwizzler (non-native
BGRA/RGBA, 16-bit components, float, fixed point)
(3) Investigate optimizing conversions from encoded data
to linear color spaces.
BUG=skia:4133
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1820073002
Review URL: https://codereview.chromium.org/
1820073002
robertphillips [Mon, 18 Apr 2016 21:49:57 +0000 (14:49 -0700)]
Make SkImageFilter::Cache purging methods pure virtual
This is intended to see if the Windows 10 bots ignoring of the purge methods is a compiler bug.
TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1901883002
Review URL: https://codereview.chromium.org/
1901883002
msarett [Mon, 18 Apr 2016 21:21:55 +0000 (14:21 -0700)]
Use libjpeg-turbo for YUV->RGB conversion in jpeg encoder
This remove the previous codepath, which performed a less
accurate conversion to YUV.
It actually faster to use the more accurate conversion, now
that we have updated to libjpeg-turbo.
z620 Performance Speed-Up:
mandrill.jpg (512x512): 1.13x
color_wheel.jpg (128x128): 1.12x
This should fix:
https://buganizer.corp.google.com/u/0/issues/
28161384
https://buganizer.corp.google.com/u/0/issues/
21891795
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1886183002
Review URL: https://codereview.chromium.org/
1886183002
herb [Mon, 18 Apr 2016 21:06:21 +0000 (14:06 -0700)]
Pass through the profile info when creating a high-quality scaled offscreen.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1897043002
Review URL: https://codereview.chromium.org/
1897043002
egdaniel [Mon, 18 Apr 2016 20:42:02 +0000 (13:42 -0700)]
Update to ToT shaderc
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1898863002
Review URL: https://codereview.chromium.org/
1898863002
djsollen [Mon, 18 Apr 2016 19:57:35 +0000 (12:57 -0700)]
Cleanup android build files and tools
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1898793004
Review URL: https://codereview.chromium.org/
1898793004
halcanary [Mon, 18 Apr 2016 19:42:05 +0000 (12:42 -0700)]
fiddle_build_test depends on skia_mesa
Builds on Build-Ubuntu-GCC-x86_64-Release-Mesa-Trybot
Shouldn't break anything else.
Review URL: https://codereview.chromium.org/
1901823002
msarett [Mon, 18 Apr 2016 19:37:46 +0000 (12:37 -0700)]
Add bench for image encodes
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1890643003
Review URL: https://codereview.chromium.org/
1890643003
halcanary [Mon, 18 Apr 2016 19:18:30 +0000 (12:18 -0700)]
fiddle_build_test: remove from most to fix build
TBR=jcgregorio@google.com
NOTRY=true
Review URL: https://codereview.chromium.org/
1897943002
halcanary [Mon, 18 Apr 2016 18:50:07 +0000 (11:50 -0700)]
experimental/fiddle -> tools/fiddle
also, test building fiddle_main.cpp & draw.cpp
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1895143002
Review URL: https://codereview.chromium.org/
1895143002
djsollen [Mon, 18 Apr 2016 18:01:02 +0000 (11:01 -0700)]
Update android toolchain variable to point to root dir and not the bin
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1900773002
Review URL: https://codereview.chromium.org/
1900773002
senorblanco [Mon, 18 Apr 2016 17:32:02 +0000 (10:32 -0700)]
Remove deprecated paths from image filter infrastructure.
Now that there are no filterImageGPUDeprecated() implementations,
we can being to rip out the deprecated infrastructure.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1888243003
Committed: https://skia.googlesource.com/skia/+/
6fb3cd7209849e665635ac17ef4eef4ad63e7f61
Review URL: https://codereview.chromium.org/
1888243003
ericrk [Mon, 18 Apr 2016 16:14:00 +0000 (09:14 -0700)]
Skia Filter Quality and Scaling Metrics
Adds histogram metrics to log the filter quality and scale factor of
each image draw. To make the data easier to consume, this is broken
down into a number of individual histograms:
- Filter quality across all draw calls
- Scale amount across all draw calls
- Scale amount per filter quality (4 histograms total)
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1686203002
Committed: https://skia.googlesource.com/skia/+/
f57b3a6e4a002caf01378832cbd756c6c163a783
Review URL: https://codereview.chromium.org/
1686203002
halcanary [Mon, 18 Apr 2016 15:17:56 +0000 (08:17 -0700)]
experimental/fiddle: update to new SkImage API
required by https://crrev.com/
1897453002
NOTRY=true
TBR=jcgregorio@google.com
Review URL: https://codereview.chromium.org/
1895103002
mtklein [Mon, 18 Apr 2016 15:09:11 +0000 (08:09 -0700)]
Modernize and trim down SkOnce.
The API and implementation are very much simplified.
You may not want to bother reading the diff.
As is our trend, SkOnce now uses <atomic> directly.
Member initialization means we don't need SK_DECLARE_STATIC_ONCE.
SkSpinlock already works this same way.
All uses of the old API taking an external bool* and Lock* were pessimal,
so I have not carried this sort of API forward. It's simpler, faster,
and more space-efficient to always use this single SkOnce class interface.
SkOnce weighs 2 bytes: a done bool and an SkSpinlock, also a bool internally.
This API refactoring opens up the opportunity to fuse those into a single
three-state byte if we'd like.
No public API changes.
TBR=reed@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1894893002
Review URL: https://codereview.chromium.org/
1894893002
robertphillips [Mon, 18 Apr 2016 14:20:05 +0000 (07:20 -0700)]
Split AlphaThresholdEffect out into its own file
Mainly mechanical although I did:
convert Create method to sk_sp Make version
rm extra '\t's and '\n's in emitCode
TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1893193002
Review URL: https://codereview.chromium.org/
1893193002
rmistry [Mon, 18 Apr 2016 11:18:56 +0000 (04:18 -0700)]
Walk through files in parse_llvm_coverage.py instead of using 'git ls-files'
The script will be executed on a swarming bot where we do not want to isolate .git directories.
BUG=skia:5159
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1888423002
NOTREECHECKS=true
Review URL: https://codereview.chromium.org/
1888423002
rmistry [Mon, 18 Apr 2016 11:14:17 +0000 (04:14 -0700)]
Do not do compile steps for Coverage
Coverage needs to do compilation in its test step. The primary reason is: the path to the out directory is compiled into the binary, which is why the compile and test steps need to be combined.
BUG=skia:5159
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1889183002
NOTREECHECKS=true
Review URL: https://codereview.chromium.org/
1889183002
rmistry [Mon, 18 Apr 2016 11:13:48 +0000 (04:13 -0700)]
Add new coverage_skia.isolate
Coverage is different from the other recipes because it needs both skia_repo and test artifacts. The primary reason is: the path to the out directory is compiled into the binary, which is why the compile and test steps need to be combined.
The isolate file will be used from the updated coverage recipe in https://codereview.chromium.org/
1862713002/
BUG=skia:5159
NOTREECHECKS=true
Review URL: https://codereview.chromium.org/
1893503003
robertphillips [Sun, 17 Apr 2016 21:31:22 +0000 (14:31 -0700)]
Revert of Remove deprecated paths from image filter infrastructure. (patchset #2 id:20001 of https://codereview.chromium.org/
1888243003/ )
Reason for revert:
Surprisingly (appallingly?), Chrome calls canFilterImageGPU
Original issue's description:
> Remove deprecated paths from image filter infrastructure.
>
> Now that there are no filterImageGPUDeprecated() implementations,
> we can being to rip out the deprecated infrastructure.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1888243003
>
> Committed: https://skia.googlesource.com/skia/+/
6fb3cd7209849e665635ac17ef4eef4ad63e7f61
TBR=reed@google.com,senorblanco@chromium.org
# 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/
1893993002
robertphillips [Sun, 17 Apr 2016 21:27:05 +0000 (14:27 -0700)]
Outline SkImageFilter Make methods
Mainly mechanical CL.
TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1893973002
Review URL: https://codereview.chromium.org/
1893973002
senorblanco [Sun, 17 Apr 2016 21:02:04 +0000 (14:02 -0700)]
Remove deprecated paths from image filter infrastructure.
Now that there are no filterImageGPUDeprecated() implementations,
we can being to rip out the deprecated infrastructure.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1888243003
Review URL: https://codereview.chromium.org/
1888243003
reed [Sat, 16 Apr 2016 19:24:09 +0000 (12:24 -0700)]
Revert of move static arrays into impl, to avoid multiple copies (patchset #3 id:40001 of https://codereview.chromium.org/
1889793007/ )
Reason for revert:
FAILED: if [ ! -e lib/libgfx.so -o ! -e lib/libgfx.so.TOC ]; then /b/build/slave/linux_chromeos/build/src/build/goma/client/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++ -shared -Wl,-z,now -Wl,-z,relro -Wl,--fatal-warnings -Wl,-z,defs -pthread -Wl,-z,noexecstack -fPIC -fuse-ld=gold -B/b/build/slave/linux_chromeos/build/src/third_party/binutils/Linux_x64/Release/bin -Wl,--disable-new-dtags -m64 -Wl,--icf=all -o lib/libgfx.so -Wl,-soname=libgfx.so @lib/libgfx.so.rsp && { readelf -d lib/libgfx.so | grep SONAME ; nm -gD -f p lib/libgfx.so | cut -f1-2 -d' '; } > lib/libgfx.so.TOC; else /b/build/slave/linux_chromeos/build/src/build/goma/client/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++ -shared -Wl,-z,now -Wl,-z,relro -Wl,--fatal-warnings -Wl,-z,defs -pthread -Wl,-z,noexecstack -fPIC -fuse-ld=gold -B/b/build/slave/linux_chromeos/build/src/third_party/binutils/Linux_x64/Release/bin -Wl,--disable-new-dtags -m64 -Wl,--icf=all -o lib/libgfx.so -Wl,-soname=libgfx.so @lib/libgfx.so.rsp && { readelf -d lib/libgfx.so | grep SONAME ; nm -gD -f p lib/libgfx.so | cut -f1-2 -d' '; } > lib/libgfx.so.tmp && if ! cmp -s lib/libgfx.so.tmp lib/libgfx.so.TOC; then mv lib/libgfx.so.tmp lib/libgfx.so.TOC ; fi; fi
obj/ui/gfx/gfx.blit.o:../../ui/gfx/blit.cc:function SkColorTypeBytesPerPixel(SkColorType): error: undefined reference to 'gPrivate_SkColorTypeBytesPerPixel'
obj/ui/gfx/gfx.canvas.o:../../ui/gfx/canvas.cc:function SkColorTypeBytesPerPixel(SkColorType): error: undefined reference to 'gPrivate_SkColorTypeBytesPerPixel'
obj/ui/gfx/gfx.canvas_skia.o:../../ui/gfx/canvas_skia.cc:function SkColorTypeBytesPerPixel(SkColorType): error: undefined reference to 'gPrivate_SkColorTypeBytesPerPixel'
obj/ui/gfx/codec/gfx.jpeg_codec.o:../../ui/gfx/codec/jpeg_codec.cc:function SkColorTypeBytesPerPixel(SkColorType): error: undefined reference to 'gPrivate_SkColorTypeBytesPerPixel'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
Original issue's description:
> move static arrays into impl, to avoid multiple copies
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1889793007
>
> Committed: https://skia.googlesource.com/skia/+/
6d7cd1f421dbde43dd2db655ca477c05312ec5fd
TBR=fmalita@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=skia:
Review URL: https://codereview.chromium.org/
1899563002
fmalita [Fri, 15 Apr 2016 20:03:07 +0000 (13:03 -0700)]
Observe gTreatSkColorAsSRGB for 4f gradients.
Use SkColor4f::FromColor() in the color packer to convert srgb->linear
when needed.
R=reed@google.com,herb@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1890253002
Review URL: https://codereview.chromium.org/
1890253002
herb [Fri, 15 Apr 2016 19:57:42 +0000 (12:57 -0700)]
Add ability to default incoming image data as sRGB by default.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1893663002
Review URL: https://codereview.chromium.org/
1893663002
robertphillips [Fri, 15 Apr 2016 19:47:42 +0000 (12:47 -0700)]
Switch SkXfermodeImagerFilter over to new onFilterImage interface
TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1894643002
Review URL: https://codereview.chromium.org/
1894643002
halcanary [Fri, 15 Apr 2016 19:30:21 +0000 (12:30 -0700)]
Revert of SkPDF: PDF/A runtime switch (patchset #1 id:100001 of https://codereview.chromium.org/
1891873002/ )
Reason for revert:
breaking something.
Original issue's description:
> SkPDF: PDF/A runtime switch
>
> TODO: remove gyp variable and modify API in SkDocument.h
>
> BUG=skia:3110
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1891873002
>
> Committed: https://skia.googlesource.com/skia/+/
570f18b43417d73c3fbd113cc0b4258e08b14c82
TBR=tomhudson@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:3110
Review URL: https://codereview.chromium.org/
1892203002
halcanary [Fri, 15 Apr 2016 18:59:31 +0000 (11:59 -0700)]
SkPDF: PDF/A runtime switch
TODO: remove gyp variable and modify API in SkDocument.h
BUG=skia:3110
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1891873002
Review URL: https://codereview.chromium.org/
1891873002
brianosman [Fri, 15 Apr 2016 18:00:51 +0000 (11:00 -0700)]
Fix skiaserve crash when displaying batch bounds
In my test case, the first actual batch would combine with the clear
issued before auditing had been enabled. After the successful combine,
we would try to inform the audit manager, but it didn't know about the
batch, triggering an assert (and subsequent crash). Fix is ijust to
ensure that no prior batches are pending when we turn on auditing.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1894633002
Review URL: https://codereview.chromium.org/
1894633002
reed [Fri, 15 Apr 2016 17:56:51 +0000 (10:56 -0700)]
exernalize imagefactory guard
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1897453002
TBR=
CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot
Review URL: https://codereview.chromium.org/
1897453002
reed [Fri, 15 Apr 2016 17:48:01 +0000 (10:48 -0700)]
WIP: runtime switch for how to interpret SkColor -vs- srgb
Still very conflicted about the "right" way to proceed with this, but thought I'd experiment with a runtime flag, so we can practice seeing SKPs in various stages of "srgb correctness".
Other aspects to either fix, or at least provide runtime switches for:
- untagged images
- gradients
- colorshader
- drawVertices
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1891013002
TBR=
Review URL: https://codereview.chromium.org/
1891013002
reed [Fri, 15 Apr 2016 17:03:03 +0000 (10:03 -0700)]
move static arrays into impl, to avoid multiple copies
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1889793007
Review URL: https://codereview.chromium.org/
1889793007
robertphillips [Fri, 15 Apr 2016 16:58:37 +0000 (09:58 -0700)]
Move SkImageFilter over to storing sk_sps
This CL also removes the old bare-pointer style ctor.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1894573002
Review URL: https://codereview.chromium.org/
1894573002
mtklein [Fri, 15 Apr 2016 15:40:22 +0000 (08:40 -0700)]
Revert of Move CPU feature detection to its own file. (patchset #7 id:120001 of https://codereview.chromium.org/
1890483002/ )
Reason for revert:
many unexpected GM diffs across GPU+CPU configs on Windows (hopefully just text masks on GPU?). seems like we pick a different srcover variant in some places.
Original issue's description:
> Move CPU feature detection to its own file.
>
> - Moves CPU feature detection to its own file.
> - Cleans up some redundant feature detection scattered around core/ and opts/.
> - Can now detect a few new CPU features:
> * F16C -> Intel f16<->f32 instructions, added between AVX and AVX2
> * FMA -> Intel FMA instructions, added at the same time as AVX2
> * VFP_FP16 -> ARM f16<->f32 instructions, quite common
> * NEON_FMA -> ARM FMA instructions, also quite common
> * SSE and SSE3... why not?
>
> This new internal API makes it very cheap to do fine-grained runtime CPU
> feature detection. Redundant calls to SkCpu::Supports() should be eliminated
> and it's hoistable out of loops. It compiles away entirely when we have the
> appropriate instructions available at compile time.
>
> This means we can call it to guard even a little snippet of 1 or 2 instructions
> right where needed and let inlining hoist the check (if any at all) up to
> somewhere that doesn't hurt performance. I've explained how I made this work
> in the private section of the new header.
>
> Once this lands and bakes a bit, I'll start following up with CLs to use it more
> and to add a bunch of those little 1-2 instruction snippets we've been wanting,
> e.g. cvtps2ph, cvtph2ps, ptest, pmulld, pmovzxbd, blendvps, pshufb, roundps
> (for floor) on x86, and vcvt.f32.f16, vcvt.f16.f32 on ARM.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1890483002
> CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
>
> Committed: https://skia.googlesource.com/skia/+/
872ea29357439f05b1f6995dd300fc054733e607
TBR=fmalita@chromium.org,herb@google.com,reed@google.com,mtklein@chromium.org
# 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/
1892643003
mtklein [Fri, 15 Apr 2016 15:37:22 +0000 (08:37 -0700)]
Revert of skcpu: sse4.1 floor, f16c f16<->f32 (patchset #11 id:200001 of https://codereview.chromium.org/
1891513002/ )
Reason for revert:
this depends on a CL I want to revert
Original issue's description:
> skcpu: sse4.1 floor, f16c f16<->f32
>
> - floor with roundps is about 4.5x faster when available
> - f16 srcover_n is similar to but a little faster than the version in https://codereview.chromium.org/
1884683002. This new one fuses the dst load/stores into the f16<->f32 conversions:
>
> +0x180 movups (%r15), %xmm1
> +0x184 vcvtph2ps (%rbx), %xmm2
> +0x189 movaps %xmm1, %xmm3
> +0x18c shufps $255, %xmm3, %xmm3
> +0x190 movaps %xmm0, %xmm4
> +0x193 subps %xmm3, %xmm4
> +0x196 mulps %xmm2, %xmm4
> +0x199 addps %xmm1, %xmm4
> +0x19c vcvtps2ph $0, %xmm4, (%rbx)
> +0x1a2 addq $16, %r15
> +0x1a6 addq $8, %rbx
> +0x1aa decl %r14d
> +0x1ad jne +0x180
>
> If we decide to land this it'd be a good idea to convert most or all users of SkFloatToHalf_01 and SkHalfToFloat_01 over to the pointer-based versions.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1891513002
> CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
>
> Committed: https://skia.googlesource.com/skia/+/
cbe3c1af987d622ea67ef560d855b41bb14a0ce9
>
> Committed: https://skia.googlesource.com/skia/+/
3faf74b8364491ca806f523fbb1d8a97be592663
TBR=fmalita@chromium.org,herb@google.com,reed@google.com,mtklein@chromium.org
# 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/
1897433002
kulshin [Fri, 15 Apr 2016 15:20:46 +0000 (08:20 -0700)]
Add option to specify font fallback when creating the skia font manager
This originally existed as https://codereview.chromium.org/
1740533003/,
but then got reverted for causing perf problems at startup. This change
avoids that by allowing callers to specify their own font fallback, and
only uses the system fallback if a fallback is needed and none was
provided.
This is part 1 of a three part change.
1: https://codereview.chromium.org/
1878843002/
Adds support for specifying a font fallback in skia
2: https://codereview.chromium.org/
1846433005/
Implements the fallback proxy in Chromium
3: https://codereview.chromium.org/
1883483002/
Adds code to blink to call skia's fallback API
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1878843002
Review URL: https://codereview.chromium.org/
1878843002
brianosman [Fri, 15 Apr 2016 15:13:57 +0000 (08:13 -0700)]
Fix ANGLE in SampleApp
Typo in DLL name meant that we were never running with ANGLE.
Fixing that exposed problem with attachANGLE -> we weren't filling out
attachment info after the first call, resulting in invalid surface
descriptions on windowSizeChanged events.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1892113002
Review URL: https://codereview.chromium.org/
1892113002
robertphillips [Fri, 15 Apr 2016 15:07:27 +0000 (08:07 -0700)]
Remove asFragmentProcessor gpu-specific ImageFilter code path
No image filter should be using this code path now.
TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1892493002
Review URL: https://codereview.chromium.org/
1892493002
robertphillips [Fri, 15 Apr 2016 14:57:40 +0000 (07:57 -0700)]
Update TileImageFilter to sk_sp
TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1882113002
Review URL: https://codereview.chromium.org/
1882113002
robertphillips [Fri, 15 Apr 2016 14:17:36 +0000 (07:17 -0700)]
Update DisplacementMapEffect to sk_sp
TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1877783003
Committed: https://skia.googlesource.com/skia/+/
a53011ef44705a091a8e24f7ea289a3f9ad759f2
Review URL: https://codereview.chromium.org/
1877783003
reed [Fri, 15 Apr 2016 13:59:38 +0000 (06:59 -0700)]
spriteblitter for memcpy case (for all configs)
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1887103003
Review URL: https://codereview.chromium.org/
1887103003