Commit Graph

3488 Commits

Author SHA1 Message Date
reed
c6f28f7f0e Reland of "Finish conversion to sk_sp<SkShader> (patchset #2 id:20001 of https://codereview.chromium.org/1803763002/ )"
This reverts commit 106e10ddff.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1803783002
CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot

TBR=

Review URL: https://codereview.chromium.org/1803783002
2016-03-14 12:22:10 -07:00
reed
106e10ddff Revert of Finish conversion to sk_sp<SkShader> (patchset #2 id:20001 of https://codereview.chromium.org/1803763002/ )
Reason for revert:
need to update cmake build example

Original issue's description:
> Finish conversion to sk_sp<SkShader>
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1803763002
>
> TBR=
>
> Committed: https://skia.googlesource.com/skia/+/15c3a0e55bd9134dace0ace2fffb855a0f09542f

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

Review URL: https://codereview.chromium.org/1798133003
2016-03-14 11:53:07 -07:00
reed
15c3a0e55b Finish conversion to sk_sp<SkShader>
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1803763002

TBR=

Review URL: https://codereview.chromium.org/1803763002
2016-03-14 11:42:58 -07:00
reed
fde05114e6 Make sp variants for SkData
Review URL: https://codereview.chromium.org/1779263003
2016-03-11 13:02:28 -08:00
bsalomon
41b952c296 Add deferred texture upload API.
Performs thread-safe decoding of SkImage in order to later create a texture-backed SkImage.

The client allocates storage for the data.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1776693002

Review URL: https://codereview.chromium.org/1776693002
2016-03-11 06:46:33 -08:00
mtklein
218c846ac0 Revert of Use std::unique_ptr. (patchset #8 id:130001 of https://codereview.chromium.org/1780933003/ )
Reason for revert:
Another Android ambiguity due to implicit bool...

frameworks/base/core/jni/android/graphics/Utils.cpp:110:35: error: call of overloaded 'SkMemoryStream(SkAutoTUnref<SkData>&)' is ambiguous
     return new SkMemoryStream(data);

Original issue's description:
> Use std::unique_ptr.
>
> TBR=reed@google.com
>
> Committed: https://skia.googlesource.com/skia/+/20c1e3abfc681771f73eb19fde7284196e028940
>
> Committed: https://skia.googlesource.com/skia/+/3dd9ed37c24611af86f0fe374bd3698b63f09450

TBR=bungeman@google.com,mtklein@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1785353002
2016-03-11 06:10:30 -08:00
mtklein
3dd9ed37c2 Use std::unique_ptr.
TBR=reed@google.com

Committed: https://skia.googlesource.com/skia/+/20c1e3abfc681771f73eb19fde7284196e028940

Review URL: https://codereview.chromium.org/1780933003
2016-03-11 05:18:48 -08:00
reed
7fb4f8bd03 Revert "Revert of add Make variations to return SkImage by sk_sp (patchset #5 id:80001 of https://codereview.chromium.org/1778393002/ )"
Fix was to call get() instead of release() when passing the sp to a bare-ptr method.

This reverts commit e683c56115.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1789443002

TBR=

Review URL: https://codereview.chromium.org/1789443002
2016-03-11 04:33:52 -08:00
robertphillips
e683c56115 Revert of add Make variations to return SkImage by sk_sp (patchset #5 id:80001 of https://codereview.chromium.org/1778393002/ )
Reason for revert:
Experimental revert to try to clear up ASAN failures

Original issue's description:
> add Make variations to return SkImage by sk_sp
>
> some internal call-sites update, but not. Will follow-up in future to complete that.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1778393002
>
> Committed: https://skia.googlesource.com/skia/+/bd73ffb83022f1f6b1997e2a91c049949e88a8a2

TBR=fmalita@chromium.org,bsalomon@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/1783063002
2016-03-10 16:18:46 -08:00
bungeman
dd67e3d1b3 Add SkScalarTruncToScalar and speed up SkScalarFraction.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1783583003

Review URL: https://codereview.chromium.org/1783583003
2016-03-10 13:39:30 -08:00
reed
bd73ffb830 add Make variations to return SkImage by sk_sp
some internal call-sites update, but not. Will follow-up in future to complete that.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1778393002

Review URL: https://codereview.chromium.org/1778393002
2016-03-10 12:45:18 -08:00
mtklein
977c07dad2 Revert of Use std::unique_ptr. (patchset #7 id:120001 of https://codereview.chromium.org/1780933003/ )
Reason for revert:
Now we remember!  The problem was Clank:

https://build.chromium.org/p/tryserver.chromium.android/builders/android_clang_dbg_recipe/builds/34329

Original issue's description:
> Use std::unique_ptr.
>
> TBR=reed@google.com
>
> Committed: https://skia.googlesource.com/skia/+/20c1e3abfc681771f73eb19fde7284196e028940

TBR=bungeman@google.com,mtklein@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1782973002
2016-03-10 11:31:27 -08:00
bungeman
d7dc76f7e9 Remove version checks for _MSC_VER < 1800 (msvs2013).
We already actively do not support older versions of the vc++
compiler and runtime, so don't check for them anymore.

TBR=reed
No API changes.

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1777213003

Review URL: https://codereview.chromium.org/1777213003
2016-03-10 11:14:40 -08:00
mtklein
20c1e3abfc Use std::unique_ptr.
TBR=reed@google.com

Review URL: https://codereview.chromium.org/1780933003
2016-03-10 10:10:03 -08:00
reed
150835e779 sk_sp versions of newWithColorFilter and newWithLocalMatrix
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1782703002

Review URL: https://codereview.chromium.org/1782703002
2016-03-10 06:36:49 -08:00
msarett
4984c3c95f Update Skia's YUV API
We should match the recently designed API in SkCodec.
https://codereview.chromium.org/1549473003/

This requires changes in Chromium as well.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1716523002

Committed: https://skia.googlesource.com/skia/+/095d31c8a0eeb5d491febf064bc3c8a44e22b94f

Review URL: https://codereview.chromium.org/1716523002
2016-03-10 05:44:43 -08:00
bsalomon
0d996868c3 Restore SkImage::NewTextureFromPixmap changes.
6ceeebd37a contained the fix for the issues that prompted the revert (index8 bitmaps weren't drawing).

Revert "TBR=robertphillips@google.com"

This reverts commit 236640872f.

TBR=
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1775263004

Review URL: https://codereview.chromium.org/1775263004
2016-03-09 18:44:43 -08:00
bsalomon
236640872f TBR=robertphillips@google.com
Revert "Add SkImage::NewTextureFromPixmap"

This reverts commit 045afea979.

Revert "Fix Mac bots because of failing readback of 565"

This reverts commit e344b26a7d.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1777863003

Review URL: https://codereview.chromium.org/1777863003
2016-03-09 14:50:15 -08:00
reed
5671c5b912 SkImage now has makeShader to return sk_sp
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1785473002

Review URL: https://codereview.chromium.org/1785473002
2016-03-09 14:47:34 -08:00
reed
6ceeebd37a unify peekPixels around pixmap parameter
requires this chrome CL to land first
https://codereview.chromium.org/1775393003/

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1784563002

Review URL: https://codereview.chromium.org/1784563002
2016-03-09 14:26:26 -08:00
bsalomon
045afea979 Add SkImage::NewTextureFromPixmap
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1776913003

Review URL: https://codereview.chromium.org/1776913003
2016-03-09 11:31:18 -08:00
msarett
c3adf2fb41 Deprecate SkImageDecoder
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1776153003

Review URL: https://codereview.chromium.org/1776153003
2016-03-09 07:14:41 -08:00
reed
8a21c9fe7f use Make instead of Create to return a shared shader
Partially updated call sites. Undefine the flag in SkSHader.h to convert the remaining sites.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1772463002

Review URL: https://codereview.chromium.org/1772463002
2016-03-08 18:50:00 -08:00
reed
647cc84748 Add sk_ref_sp helper function.
Review URL: https://codereview.chromium.org/1773943004
2016-03-08 12:54:48 -08:00
bungeman
c901c11549 Add element_type, swap, operators, fix reset on sk_sp.
The 'element_type' typedef is to play nice with std::pointer_traits.

The full complement of operators and swap to match unique_ptr so that
sk_sp can be properly compared to nullptr and used with standard
containers.

Update to 'reset' so that calling 'unref' is the last operation.

This also adds tests for these changes, and sets the fPtr to nullptr
in debug for easier bug finding.

Review URL: https://codereview.chromium.org/1773453002
2016-03-08 08:35:23 -08:00
robertphillips
4418dbac33 Swap over to using SkImageFilter::filterImage instead of filterImageDeprecated
This CL relies on https://codereview.chromium.org/1757983002/ (Add SkSpecialImage-based methods to SkImageFilter)

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1762013002

TBR=bsalomon@google.com

Review URL: https://codereview.chromium.org/1762013002
2016-03-07 12:45:14 -08:00
msarett
1590f3b328 Revert of Update Skia's YUV API (patchset #5 id:160001 of https://codereview.chromium.org/1716523002/ )
Reason for revert:
Blimp failures with manual roll in Chrome.

Original issue's description:
> Update Skia's YUV API
>
> We should match the recently designed API in SkCodec.
> https://codereview.chromium.org/1549473003/
>
> This requires changes in Chromium as well.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1716523002
>
> Committed: https://skia.googlesource.com/skia/+/095d31c8a0eeb5d491febf064bc3c8a44e22b94f

TBR=scroggo@google.com,reed@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/1775493002
2016-03-07 09:16:52 -08:00
msarett
095d31c8a0 Update Skia's YUV API
We should match the recently designed API in SkCodec.
https://codereview.chromium.org/1549473003/

This requires changes in Chromium as well.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1716523002

Review URL: https://codereview.chromium.org/1716523002
2016-03-07 08:39:12 -08:00
robertphillips
eaf086e3ce Add SkSpecialImage-based methods to SkImageFilter
This is calved off of https://codereview.chromium.org/1695823002/ (Get OffsetImageFilter really working with SkSpecialImages)

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1757983002

Review URL: https://codereview.chromium.org/1757983002
2016-03-07 04:51:10 -08:00
reed
a5ab9ec295 Add variants of the setters on SkPaint which take a sk_sp<effect>. At the same time, change the internal storage to be sk_sp<effect>.
Follow-on CL might try to use = default for the constructors and assignment operators.

This reverts commit 992854d62e.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1770723002

Review URL: https://codereview.chromium.org/1770723002
2016-03-06 18:10:48 -08:00
reed
941da9d661 Fix behavior of sk_sp::reset(T*) and add unittest.
Previously, sk_sp::reset(T* t) did not release its own reference
if its internal pointer was the same as 't'. This leaks a reference.
Now always release the current reference when non-nullptr.

Review URL: https://codereview.chromium.org/1767983002
2016-03-06 13:54:00 -08:00
reed
992854d62e Revert of add setter on SkPaint that takes sk_sp (patchset #1 id:1 of https://codereview.chromium.org/1769803002/ )
Reason for revert:
investigate leak

Original issue's description:
> add setter on SkPaint that takes sk_sp
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1769803002
>
> TBR=
>
> Committed: https://skia.googlesource.com/skia/+/a917eba6ea8a6936f2c9271e487b14d14b99c98e

TBR=
# 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/1771613002
2016-03-05 17:51:45 -08:00
reed
a917eba6ea add setter on SkPaint that takes sk_sp
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1769803002

TBR=

Review URL: https://codereview.chromium.org/1769803002
2016-03-05 16:39:25 -08:00
halcanary
ffa39e02bc sk_sp: fix contravariant constructors
TBR=reed
This is obviously correct and needs to be fixed.

Review URL: https://codereview.chromium.org/1771583002
2016-03-05 08:30:28 -08:00
reed
ec7c0cec3f remove unneeded flag for annotations
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1767783004

TBR=halcanary

Review URL: https://codereview.chromium.org/1767783004
2016-03-05 06:00:12 -08:00
reed
f70b531daa Move annotations to canvas virtual (patchset #8 id:140001 of https://codereview.chromium.org/1744103002/ )"
Need to land chrome change first https://codereview.chromium.org/1766723003/

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1758023003

TBR=

Review URL: https://codereview.chromium.org/1758023003
2016-03-04 16:36:20 -08:00
reed
773ceda51c Enforce 16byte alignment in shader contexts (patchset #1 id:1 of https://codereview.chromium.org/1759653004/ )"
This reverts commit e38bcaf24b.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1763973002

TBR=

Review URL: https://codereview.chromium.org/1763973002
2016-03-03 18:18:25 -08:00
halcanary
e38bcaf24b Revert of enforce 16byte alignment in shader contexts (patchset #1 id:1 of https://codereview.chromium.org/1759653004/ )
Reason for revert:

Test-Win8-MSVC-ShuttleB-CPU-AVX2-x86-Debug failed dm:

	....
    FYI: loaded 23439 distinct uninteresting hashes from 23439 lines
    Skipping config gpu: Don't understand 'gpu'.
    Skipping config msaa16: Don't understand 'msaa16'.
    168400 srcs * 7 sinks + 481 tests == 1179281 tasks
    0ns elapsed, 5 active, 1179276 queued, 55MB RAM, 55MB peak
        565 gm  xfermodes2
        565 gm  xfermodes
        565 gm  xfermodeimagefilter
        565 gm  xfermodes3
        565 gm  verylarge_picture_image
    c:\0\build\slave\workdir\build\skia\src\core\skshader.cpp:108:
        fatal error: ""(0 == ((size) & 15))""
    step returned non-zero exit code: 3
    @@@STEP_FAILURE@@@

Original issue's description:
> enforce 16byte alignment in shader contexts
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1759653004
>
> Committed: https://skia.googlesource.com/skia/+/d812fb458807245daa812adb7af0733cf5b54d96

TBR=mtklein@google.com,fmalita@chromium.org,herb@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/1759323002
2016-03-03 14:23:47 -08:00
reed
d812fb4588 enforce 16byte alignment in shader contexts
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1759653004

Review URL: https://codereview.chromium.org/1759653004
2016-03-03 13:25:25 -08:00
reed
1610835624 Revert of move annotations to canvas virtual (patchset #8 id:140001 of https://codereview.chromium.org/1744103002/ )
Reason for revert:
need to update unittest in blink:

FAILED: /b/build/goma/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/third_party/WebKit/Source/core/page/webkit_unit_tests.PrintContextTest.o.d -DV8_DEPRECATION_WARNINGS -DCLD_VERSION=2 -D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORE=0 -DCHROMIUM_BUILD -DCR_CLANG_REVISION=261368-1 -DCOMPONENT_BUILD -DUSE_LIBJPEG_TURBO=1 -DENABLE_WEBRTC=1 -DENABLE_MEDIA_ROUTER=1 -DENABLE_PEPPER_CDMS -DENABLE_CONFIGURATION_POLICY -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 -DBLINK_IMPLEMENTATION=1 -DINSIDE_BLINK -DMOJO_USE_SYSTEM_IMPL -DGTEST_HAS_POSIX_RE=0 -DGTEST_LANG_CXX11=0 -DSKIA_DLL -DGR_GL_IGNORE_ES3_MSAA=0 -DSK_SUPPORT_GPU=1 -DSK_IGNORE_LINEONLY_AA_CONVEX_PATH_OPTS -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DCHROME_PNG_WRITE_SUPPORT -DPNG_USER_CONFIG -DENABLE_LAYOUT_UNIT_IN_INLINE_BOXES=0 -DWTF_USE_CONCATENATED_IMPULSE_RESPONSES=1 -DENABLE_INPUT_MULTIPLE_FIELDS_UI=1 -DWTF_USE_ICCJPEG=1 -DWTF_USE_QCMSLIB=1 -DENABLE_OILPAN=1 -DUNIT_TEST -DGTEST_HAS_RTTI=0 -DV8_SHARED -DUSING_V8_SHARED -DUSE_LIBPCI=1 -DUSE_OPENSSL=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DWTF_USE_DYNAMIC_ANNOTATIONS=1 -Igen -I../../third_party/WebKit/public/web -I../../third_party/WebKit/Source/web -I../../third_party/WebKit/Source/web/src -I../../third_party/WebKit/public/web/mac -I../.. -I../../skia/config -I../../third_party/WebKit/Source -I../../third_party/khronos -I../../gpu -Igen/angle -I../../third_party/WebKit -I../../skia/ext -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../../third_party/icu/source/common -I../../third_party/npapi -I../../third_party/npapi/bindings -I../../third_party/libpng -I../../third_party/ots/include -I../../third_party/qcms/src -I../../third_party/iccjpeg -I../../third_party/libjpeg_turbo -I../../third_party/WebKit -I../../third_party/icu/source/i18n -I../../testing/gmock/include -I../../testing/gtest/include -I../../third_party/libwebp -I../../third_party/zlib -I../../v8/include -Igen/blink -isysroot /Applications/Xcode5.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -O0 -fvisibility=hidden -Werror -mmacosx-version-min=10.6 -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 -Wexit-time-destructors -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 -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 -fstack-protector-all  -c ../../third_party/WebKit/Source/core/page/PrintContextTest.cpp -o obj/third_party/WebKit/Source/core/page/webkit_unit_tests.PrintContextTest.o
../../third_party/WebKit/Source/core/page/PrintContextTest.cpp:54:20: error: no member named 'getAnnotation' in 'SkPaint'
        if (!paint.getAnnotation())
             ~~~~~ ^

Original issue's description:
> move annotations to canvas virtual
>
> In an effort to do it all at once, this change assumes that its ok to ignore annotations that were previously stored on paints in old SKP files (since this feature is only interesting to PDF printing).
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1744103002
>
> Committed: https://skia.googlesource.com/skia/+/0eda2587cc9233066cb3f3fec08f35c061780f8e

TBR=halcanary@google.com,fmalita@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/1761793003
2016-03-03 09:14:36 -08:00
reed
0eda2587cc move annotations to canvas virtual
In an effort to do it all at once, this change assumes that its ok to ignore annotations that were previously stored on paints in old SKP files (since this feature is only interesting to PDF printing).

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1744103002

Review URL: https://codereview.chromium.org/1744103002
2016-03-03 08:13:54 -08:00
bungeman
beab9e7ba0 Add operator* and operator safe-bool to sk_sp.
This greatly reduces the need to use '.get()' in conditionals.

Review URL: https://codereview.chromium.org/1760453004
2016-03-03 07:50:49 -08:00
reed
e2b0a0a034 update SkSmallAllocator to force internal allocations to be 16-byte aligned
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1755293002

Review URL: https://codereview.chromium.org/1755293002
2016-03-02 13:03:46 -08:00
halcanary
89bd99bed8 sk_sp: remove explicit operator bool()
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1757593005

Review URL: https://codereview.chromium.org/1757593005
2016-03-02 08:21:39 -08:00
halcanary
cb6cb3841a sk_sp: Covariant Move Constructor and Move Assignment
Also Covariant Copy Constructor, Copy Assignment,
and comparison operators.

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1752093002

Review URL: https://codereview.chromium.org/1752093002
2016-03-02 08:11:26 -08:00
halcanary
217c0b3f13 sk_make_sp<T>()
because
    auto atm = sk_make_sp<SkAdvancedTypefaceMetrics>();
is better than
    sk_sp<SkAdvancedTypefaceMetrics> atm(new SkAdvancedTypefaceMetrics);

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1753973002

Review URL: https://codereview.chromium.org/1753973002
2016-03-02 08:06:20 -08:00
reed
bb7b043b2d isolate sk_sp from larger cl
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1752683002

Review URL: https://codereview.chromium.org/1752683002
2016-03-01 07:28:51 -08:00
bsalomon
84a4e5a8d6 Remove internal calls to SkImage::getTexture
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1744243002

Review URL: https://codereview.chromium.org/1744243002
2016-02-29 11:41:52 -08:00
bsalomon
e93c17b35a Remove legacy Budgeted enum aliases from SkSurface
TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1743233002

Review URL: https://codereview.chromium.org/1743233002
2016-02-29 07:06:22 -08:00
brucedawson
0fe12bcfb7 Revert of Add non-inline SkRTreeFactory constructor to fix clang-cl (patchset #2 id:20001 of https://codereview.chromium.org/1676833002/ )
Reason for revert:
This workaround should no longer be needed, per comment#16 from
thakis@ on the original CL.

Original issue's description:
> Add non-inline SkRTreeFactory constructor to fix clang-cl
>
> When Chromium is switched to build with VS 2015 that switches clang-cl
> to build in -fmsc-version=1900 mode. This causes some changes in
> importing of constructors and vftables which leads to link errors in
> blink_platform.dll. Adding a non-inline constructor makes 1900 mode
> behave consistently with 1800 mode and avoids the link error.
>
> The root cause needs investigation but this will unblock the VS 2015
> switch.
>
> BUG=440500,498544
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1676833002
>
> Committed: https://skia.googlesource.com/skia/+/964eec67760196585954203ba625e440607f7e92

TBR=reed@google.com,bsalomon@google.com,mtklein@chromium.org,thakis@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=440500,498544

Review URL: https://codereview.chromium.org/1739363002
2016-02-26 16:31:12 -08:00
caryclark
952538ed50 fix undefined signed shifts
The expression (1 << 31) is technically undefined.

Fixed the undefined shift referenced by this bug and
a few friends.

R=reed@google.com
BUG=skia:2285
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1737363002

Review URL: https://codereview.chromium.org/1737363002
2016-02-26 05:01:42 -08:00
ericrk
82e26bf239 Revert of Skia Filter Quality and Scaling Metrics (patchset #3 id:60001 of https://codereview.chromium.org/1686203002/ )
Reason for revert:
reverting this to address Ilya's comments.

Original issue's description:
> 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

TBR=bsalomon@google.com,isherman@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/1735423002
2016-02-25 22:15:29 -08:00
ericrk
f57b3a6e4a 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

Review URL: https://codereview.chromium.org/1686203002
2016-02-25 11:21:57 -08:00
benjaminwagner
f6bfccd562 Cleanups related to SkFixed.
This CL relands https://codereview.chromium.org/1683743005/ with two fixes:
  - Removing the test for vertical text. Vertical text doesn't work on Windows and breakText isn't supported for non-trivial text.
  - Omit PaintBreakTextTest in Google3 because we don't have the correct font setup yet.

Remove SK_FixedNaN. It does not seem to be supported or used anywhere in Skia, Chromium, Android, or Google3, (except accidentally by TwoPtRadial::kDontDrawT). I think supporting it would erase any benefit of SkFixed over float.

Remove SkBitmapFilter::lookup. It does not appear to be used anywhere in Skia, Chromium, Android, or Google3.

Fix a bug in SkPaint::breakText that limited it to ~5kB of text. Now it can handle more than 1GB.

BUG=skia:4632
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1683743005

Committed: https://skia.googlesource.com/skia/+/7ea5cb18389db11a94175de95c9db2b44972630c

patch from issue 1683743005 at patchset 120001 (http://crrev.com/1683743005#ps120001)

Review URL: https://codereview.chromium.org/1739453002
2016-02-25 10:28:11 -08:00
bsalomon
5ec26ae9bf Move Budgeted enum out of SkSurface, use in GrTextureProvider
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1728093005
DOCS_PREVIEW= https://skia.org/?cl=1728093005

Committed: https://skia.googlesource.com/skia/+/57599fe6c0336feaeeeb9b1996e77b70219b483c
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/1728093005
2016-02-25 08:33:02 -08:00
bsalomon
bd500f09ce Revert of Move Budgeted enum out of SkSurface, use in GrTextureProvider (patchset #6 id:100001 of https://codereview.chromium.org/1728093005/ )
Reason for revert:
Need workaround for chrome to build

Original issue's description:
> Move Budgeted enum out of SkSurface, use in GrTextureProvider
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1728093005
> DOCS_PREVIEW= https://skia.org/?cl=1728093005
>
> Committed: https://skia.googlesource.com/skia/+/57599fe6c0336feaeeeb9b1996e77b70219b483c

TBR=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/1734043002
2016-02-25 06:52:12 -08:00
bsalomon
57599fe6c0 Move Budgeted enum out of SkSurface, use in GrTextureProvider
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1728093005
DOCS_PREVIEW= https://skia.org/?cl=1728093005

Review URL: https://codereview.chromium.org/1728093005
2016-02-25 06:33:27 -08:00
ericrk
f7b8b8affe Add wrapBackendTextureAsRenderTarget API
Skia's GrTextureProvider currently exposes two APIs for wrapping backend
objects:
 * wrapBackendTexture - wraps a texture into a GrTexture. Depending on
   flags, this GrTexture can be converted to a GrRenderTarget. Skia
   manages the render target objects it may create to provide a render
   target for the texture. This allows Skia to create stencil buffers
   if needed and manager MSAA resolves.
 * wrapBackendRenderTarget - wraps a FBO into a GrRenderTarget. This
   object cannot be converted to a GrTexture. Skia does not manage
   the render target objects for such a GrRenderTarget, and as such
   cannot attach stencil buffers or perform MSAA resolves on the
   created GrRenderTarget.

Given these two options, wrapBackendTexture provides more versatility
and allows Skia more room for optimization. Chrome currently uses
wrapBackendTexture for this reason.

While these two functions cover most cases, they do not provide a way
for Skia to wrap a texture into a render target (and gain the MSAA and
stencil buffer management), without also creating a GrTexture. This is
problematic in cases where a texture can be bound to a render target,
but cannot be textured from, as is the case in Chrome's limited support
for GL_TEXTURE_RECTANGLE.

To address this, a new function is created:
 * wrapBackendTextureAsRenderTarget - wraps a texture into a
   GrRenderTarget. As with wrapBackendTexture, the created render
   target objects are fully managed by Skia. Unlike wrapBackendTexture
   no GrTexture is created, and the created object will never be
   textured from.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1709163003

Review URL: https://codereview.chromium.org/1709163003
2016-02-24 14:49:52 -08:00
benjaminwagner
f156ea3c3e Change SkUnitScalarClampToByte to more accurate implementation.
The previous implementation was likely more efficient when SkScalar was SkFixed.

BUG=skia:4632
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1691403002

Review URL: https://codereview.chromium.org/1691403002
2016-02-24 10:07:52 -08:00
benjaminwagner
c2d35d8513 Revert of Simple cleanups related to SkFixed. (patchset #4 id:120001 of https://codereview.chromium.org/1683743005/ )
Reason for revert:
New test is failing on Windows.

Original issue's description:
> Cleanups related to SkFixed.
>
> Remove SK_FixedNaN. It does not seem to be supported or used anywhere in Skia, Chromium, Android, or Google3, (except accidentally by TwoPtRadial::kDontDrawT). I think supporting it would erase any benefit of SkFixed over float.
>
> Remove SkBitmapFilter::lookup. It does not appear to be used anywhere in Skia, Chromium, Android, or Google3.
>
> Fix a bug in SkPaint::breakText that limited it to ~5kB of text. Now it can handle more than 1GB.
>
> BUG=skia:4632
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1683743005
>
> Committed: https://skia.googlesource.com/skia/+/7ea5cb18389db11a94175de95c9db2b44972630c

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:4632

Review URL: https://codereview.chromium.org/1724283003
2016-02-24 08:29:11 -08:00
benjaminwagner
7ea5cb1838 Cleanups related to SkFixed.
Remove SK_FixedNaN. It does not seem to be supported or used anywhere in Skia, Chromium, Android, or Google3, (except accidentally by TwoPtRadial::kDontDrawT). I think supporting it would erase any benefit of SkFixed over float.

Remove SkBitmapFilter::lookup. It does not appear to be used anywhere in Skia, Chromium, Android, or Google3.

Fix a bug in SkPaint::breakText that limited it to ~5kB of text. Now it can handle more than 1GB.

BUG=skia:4632
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1683743005

Review URL: https://codereview.chromium.org/1683743005
2016-02-24 06:51:52 -08:00
reed
8f7b0b2d80 simplify/unify xferproc api
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1721223002

Review URL: https://codereview.chromium.org/1721223002
2016-02-24 06:21:36 -08:00
fmalita
ca058f57a3 Retire SkShader::kSupports4f_Flag
No longer used except in one test.

Introduce kPrefers4f_Flag instead.

R=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1726983002

Review URL: https://codereview.chromium.org/1726983002
2016-02-23 19:02:20 -08:00
bungeman
ccb74b824a Move SkPackBits to src/effects.
Prior to this change SkPackBits.h was in include/core and SkPackBits.cpp
in src/core. However, SkPackBits appears to have been written
specifically as an implementation detail of the SkTableColorFilter
effect. This change moves SkPackBits out of core and into effects, which
is the only current user.

Review URL: https://codereview.chromium.org/1722173003
2016-02-23 12:55:20 -08:00
benjaminwagner
d936f63c35 Simplify and combine SkDrawCacheProc and SkMeasureCacheProc to SkPaint::GlyphCacheProc.
All callers of (the result of) SkPaint::getDrawCacheProc were passing zero as the last two arguments. This is the same as (the result of) SkPaint::getMeasureCacheProc(true).

Per bungeman, make this typedef a member of SkPaint.

Although the typedef is technically public, the only uses are private, so this is not really an API change.

TBR=reed
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1718423002

Review URL: https://codereview.chromium.org/1718423002
2016-02-23 10:44:32 -08:00
caryclark
5a70bc7f3c make transformed rrect radii fit rectangle
one more case caught by 1M skps
R=herb@google.com,reed@google.com
BUG=skia:4413
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1722483003

Review URL: https://codereview.chromium.org/1722483003
2016-02-23 10:32:40 -08:00
bungeman
5d2cd6e074 Move SkUtils.h to src/core.
Review URL: https://codereview.chromium.org/1722703003
2016-02-23 07:34:25 -08:00
fmalita
d0c4e092d5 Add dest type hint to SkShader::ContextRec
Let SkBlitter decide which dst type is optimal (PMColor vs PM4f), and
pass that info to shaders.

R=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1724503002

Review URL: https://codereview.chromium.org/1724503002
2016-02-22 17:19:04 -08:00
bungeman
f6d1e60531 Only use fake gamma with linear devices.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1711223003

Review URL: https://codereview.chromium.org/1711223003
2016-02-22 13:20:29 -08:00
reed
ca726abe1e fix misc asserts and checks found by fuzzer
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1719993002

Review URL: https://codereview.chromium.org/1719993002
2016-02-22 12:50:26 -08:00
caryclark
d49a86ade0 allow move/zero-line/close to draw caps
R=fmalita@chromium.org
BUG=skia:4784
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1720953002

Review URL: https://codereview.chromium.org/1720953002
2016-02-22 12:44:54 -08:00
bsalomon
f47b9a3b88 Allow client to force an SkImage snapshot to be unique (and uniquely own its backing store).
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1686163002

Review URL: https://codereview.chromium.org/1686163002
2016-02-22 11:02:58 -08:00
fmalita
8d9f2e474a Add ContextRec param to SkShader::contextSize()
To facilitate upcoming context selection changes.

R=reed@google.com,mtklein@google.com,herb@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1720933002

Review URL: https://codereview.chromium.org/1720933002
2016-02-22 10:39:41 -08:00
ethannicholas
23e7af0e8a Revert of fix misc asserts and checks found by fuzzer (patchset #1 id:1 of https://codereview.chromium.org/1719913002/ )
Reason for revert:
Looks to be causing failures in LayerTreeHostFilters* tests (https://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/177297/steps/cc_unittests%20%28with%20patch%29/logs/stdio).

Original issue's description:
> fix misc asserts and checks found by fuzzer
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1713383002
>
> TBR=
>
> Committed: https://skia.googlesource.com/skia/+/653db51b440491b0fb1908bf5a43dcc89c90044d

TBR=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/1721743002
2016-02-22 07:42:18 -08:00
reed
129ed1cd6d lots of sRGB and F16 blits
- generalize F16 xfermode procs
- spriteblits for F16 and sRGB
- saveLayer now respects colortype and profiletype

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1686013002

Review URL: https://codereview.chromium.org/1685203002
2016-02-22 06:42:31 -08:00
reed
653db51b44 fix misc asserts and checks found by fuzzer
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1713383002

TBR=

Review URL: https://codereview.chromium.org/1719913002
2016-02-22 06:34:47 -08:00
reed
1d56448400 add SkGraphics::PurageAllCaches
BUG=skia:4755
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1722603002

TBR=

Review URL: https://codereview.chromium.org/1722603002
2016-02-22 06:19:54 -08:00
reed
1d52469927 Revert of ix misc asserts and checks found by fuzzer (patchset #1 id:1 of https://codereview.chromium.org/1723473002/ )
Reason for revert:
need to not land the canvas change yet

Original issue's description:
> Reland of ix misc asserts and checks found by fuzzer (patchset #1 id:1 of https://codereview.chromium.org/1713413002/ )
>
> Reason for revert:
> deps instability seemingly fixed. trying again.
>
> Original issue's description:
> > Revert of fix misc asserts and checks found by fuzzer (patchset #1 id:1 of https://codereview.chromium.org/1713383002/ )
> >
> > Reason for revert:
> > speculative deps-roll fix
> >
> > Original issue's description:
> > > fix misc asserts and checks found by fuzzer
> > >
> > > BUG=skia:
> > > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1713383002
> > >
> > > TBR=robertphilips
> > >
> > > Committed: https://skia.googlesource.com/skia/+/00bea4ad310c4ec4dd95809b47ce3fbfa8fd0e1e
> >
> > TBR=robertphillips@google.com
> > # Skipping CQ checks because original CL landed less than 1 days ago.
> > NOPRESUBMIT=true
> > NOTREECHECKS=true
> > NOTRY=true
> > BUG=skia:
> >
> > Committed: https://skia.googlesource.com/skia/+/d98ef6377269e3596423225ab922301ed40529a0
>
> TBR=robertphillips@google.com
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/75a73297cb44c65a9efcf5f212854cb457140e34

TBR=robertphillips@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/1723483002
2016-02-22 05:57:32 -08:00
reed
75a73297cb Reland of ix misc asserts and checks found by fuzzer (patchset #1 id:1 of https://codereview.chromium.org/1713413002/ )
Reason for revert:
deps instability seemingly fixed. trying again.

Original issue's description:
> Revert of fix misc asserts and checks found by fuzzer (patchset #1 id:1 of https://codereview.chromium.org/1713383002/ )
>
> Reason for revert:
> speculative deps-roll fix
>
> Original issue's description:
> > fix misc asserts and checks found by fuzzer
> >
> > BUG=skia:
> > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1713383002
> >
> > TBR=robertphilips
> >
> > Committed: https://skia.googlesource.com/skia/+/00bea4ad310c4ec4dd95809b47ce3fbfa8fd0e1e
>
> TBR=robertphillips@google.com
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/d98ef6377269e3596423225ab922301ed40529a0

TBR=robertphillips@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/1723473002
2016-02-22 05:54:53 -08:00
reed
d98ef63772 Revert of fix misc asserts and checks found by fuzzer (patchset #1 id:1 of https://codereview.chromium.org/1713383002/ )
Reason for revert:
speculative deps-roll fix

Original issue's description:
> fix misc asserts and checks found by fuzzer
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1713383002
>
> TBR=robertphilips
>
> Committed: https://skia.googlesource.com/skia/+/00bea4ad310c4ec4dd95809b47ce3fbfa8fd0e1e

TBR=robertphillips@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/1713413002
2016-02-21 10:27:49 -08:00
reed
00bea4ad31 fix misc asserts and checks found by fuzzer
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1713383002

TBR=robertphilips

Review URL: https://codereview.chromium.org/1713383002
2016-02-20 14:18:27 -08:00
reed
c5b1228141 remove supports4f flag for colorfilters
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1720443002

Review URL: https://codereview.chromium.org/1720443002
2016-02-19 13:38:53 -08:00
robertphillips
df7bb471e5 Update SkImageFilter's cache to handle SkSpecialImages and add unit test
This is calved off of: https://codereview.chromium.org/1695823002/ (Get OffsetImageFilter really working with SkSpecialImages)

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1709263002
TBR=bsalomon@google.com

Review URL: https://codereview.chromium.org/1709263002
2016-02-19 08:19:40 -08:00
caryclark
449f7fcf70 fix iter to document close correctly
R=reed@google.com
BUG=skia:4950
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1717623002

Review URL: https://codereview.chromium.org/1717623002
2016-02-19 07:40:34 -08:00
reed
dd9ffea9ce make SkPM4f private
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1713653002

Review URL: https://codereview.chromium.org/1713653002
2016-02-18 12:39:14 -08:00
bungeman
d689bf8748 Move SkTInternalLList.h to src/core.
TBR=reed
Not intended for external use.

Review URL: https://codereview.chromium.org/1712563004
2016-02-18 11:53:18 -08:00
bungeman
bc1cebbd2b Move SkTDStack.h to src/animator.
This file is only used by animator and may or may not be sane. Move
the file from include/core to src/animator since no one else is using
it.

TBR=reed
Make it go away!

Review URL: https://codereview.chromium.org/1710083002
2016-02-18 11:01:13 -08:00
bungeman
a7e9f05119 Move SkTDArray to private.
TBR=reed
Moving to private is good.

Review URL: https://codereview.chromium.org/1707213002
2016-02-18 08:53:33 -08:00
reed
4528c867c4 lcd blits for sRGB
Unimplemented for F16 for the moment, but not needed yet.
Surprisingly not much slower than current impl (not srgb correct)

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1707883002

Review URL: https://codereview.chromium.org/1707883002
2016-02-18 08:16:33 -08:00
caryclark
8e7b19d0f0 add interp path
Add path methods to determine if a pair of paths
can be interpolated, and to interpolate them.

R=reed@google.com, robertphillips@google.com
BUG=skia:4549
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1703943003

Review URL: https://codereview.chromium.org/1703943003
2016-02-18 04:11:49 -08:00
mtklein
3bc2624a4b try plain-old code for sk_memset16/32 now that NEON is compile-time
Most of these implementations now just say "always inline".
Let's see if we can get away with the simplicity of doing that all the time.

These inlined implementations can autovectorize easily.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1639863002
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Review URL: https://codereview.chromium.org/1639863002
2016-02-17 14:21:28 -08:00
robertphillips
48e78468f5 Mark existing image filter entry points that will be going away with Deprecated
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1709753002

Review URL: https://codereview.chromium.org/1709753002
2016-02-17 13:57:17 -08:00
bungeman
bf521ff941 Move SkTArray to include/private.
TBR=reed
Agreed moving to private is good.

Review URL: https://codereview.chromium.org/1702073002
2016-02-17 13:13:44 -08:00
caryclark
6900641e02 add last move to serialized path
A deserialized path keeps the last move location so that
a subsequent append to the path does not add an unwanted
close verb.

R=reed@oogle.com
BUG=skia:4847
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1702393002

Review URL: https://codereview.chromium.org/1702393002
2016-02-17 12:16:27 -08:00
msarett
8715d47e24 Make SkPicture/SkImageGenerator default to SkCodec
Remove reference to SkImageDecoder from SkPicture. Make the default
InstallPixelRefProc passed to CreateFromStream use
SkImageGenerator::NewFromEncoded instead.

Make SkImageGenerator::NewFromEncoded create an SkCodecImageGenerator.
Remove the old version that used SkImageDecoder.

Remove all versions of lazy_decode_bitmap/LazyDecodeBitmap. The default
now behaves lazily.

Update all clients to use the default.

Move SkImageDecoderGenerator into KtxTest.cpp, and use it directly.

This is a rebased version of:
https://codereview.chromium.org/1671193002/

TBR=reed@google.com

BUG=skia:4691
BUG=skia:4290
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1699183004

Review URL: https://codereview.chromium.org/1699183004
2016-02-17 10:02:29 -08:00
benjaminwagner
8e17556349 Change SkMatrix::fixedStepInX to return SkVector (of SkScalar) rather than SkFixed.
All users were immediately converting to SkScalar or SkFixed3232.

This method is not used in Chromium, Android, or Google3.

BUG=skia:4632
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1692013002

Review URL: https://codereview.chromium.org/1692013002
2016-02-16 10:09:40 -08:00
senorblanco
afec27f13b Image filters: change applyCropRect() to take a src rect.
Instead of taking the source bitmap and offset, we simply take the
source rect bounds, and make the caller responsible for computing it.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1702683002

Review URL: https://codereview.chromium.org/1702683002
2016-02-16 09:11:18 -08:00
reed
8681e60b2c make SkComposeShader.h private
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1697523003

Review URL: https://codereview.chromium.org/1697523003
2016-02-15 08:27:14 -08:00
halcanary
d798feb97e SkDocument: remove use of SkTArray (part 3/3).
TBR=reed
Removal only. Verbal lgtm.

Review URL: https://codereview.chromium.org/1692703003
2016-02-12 07:26:46 -08:00
halcanary
7001576c71 SkDocument: remove use of SkTArray (part 1/3).
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1689683002

Review URL: https://codereview.chromium.org/1689683002
2016-02-11 07:59:59 -08:00
erikchen
9a1ed5d81d skia: Add support for CHROMIUM_image backed textures.
I created a new abstract base class TextureStorageAllocator that consumers of
Skia can subclass and pass back to Skia. When a surface is created with a
pointer to a TextureStorageAllocator, any textures it creates, or that are
derived from the original surface, will allocate and deallocate storage using
the methods on TextureStorageAllocator.

BUG=https://code.google.com/p/chromium/issues/detail?id=579664
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1623653002

Committed: https://skia.googlesource.com/skia/+/92098e691f10a010e7421125ba4d44c02506bb55

Committed: https://skia.googlesource.com/skia/+/7fec91ce6660190f8d7c5eb6f3061e4550cc672b

Committed: https://skia.googlesource.com/skia/+/b8d6e088590160f1198110c2371b802c1d541a36

Review URL: https://codereview.chromium.org/1623653002
2016-02-10 16:32:35 -08:00
kjlubick
1de415f2c3 Revert of Make SkPicture/SkImageGenerator default to SkCodec (patchset #7 id:120001 of https://codereview.chromium.org/1671193002/ )
Reason for revert:
Breaks Ubuntu and Mac CMAKE

Original issue's description:
> Make SkPicture/SkImageGenerator default to SkCodec
>
> Remove reference to SkImageDecoder from SkPicture. Make the default
> InstallPixelRefProc passed to CreateFromStream use
> SkImageGenerator::NewFromEncoded instead.
>
> Make SkImageGenerator::NewFromEncoded create an SkCodecImageGenerator.
> Remove the old version that used SkImageDecoder.
>
> Remove all versions of lazy_decode_bitmap/LazyDecodeBitmap. The default
> now behaves lazily.
>
> Update all clients to use the default.
>
> Move SkImageDecoderGenerator into KtxTest.cpp, and use it directly.
>
> BUG=skia:4691
> BUG=skia:4290
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1671193002
>
> Committed: https://skia.googlesource.com/skia/+/026388a01864c74208ad57d1ba4f711602d101c6

TBR=msarett@google.com,reed@google.com,scroggo@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4691

Review URL: https://codereview.chromium.org/1685963004
2016-02-10 11:25:07 -08:00
scroggo
026388a018 Make SkPicture/SkImageGenerator default to SkCodec
Remove reference to SkImageDecoder from SkPicture. Make the default
InstallPixelRefProc passed to CreateFromStream use
SkImageGenerator::NewFromEncoded instead.

Make SkImageGenerator::NewFromEncoded create an SkCodecImageGenerator.
Remove the old version that used SkImageDecoder.

Remove all versions of lazy_decode_bitmap/LazyDecodeBitmap. The default
now behaves lazily.

Update all clients to use the default.

Move SkImageDecoderGenerator into KtxTest.cpp, and use it directly.

BUG=skia:4691
BUG=skia:4290
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1671193002

Review URL: https://codereview.chromium.org/1671193002
2016-02-10 11:15:21 -08:00
reed
a2b340f8a8 move compose-shader into base-class as factory
next steps:
1. this lands
2. update android to call the new factory
3. move SkComposeShader.h into private

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1686803003

Review URL: https://codereview.chromium.org/1686803003
2016-02-10 08:53:15 -08:00
caryclark
64e7533091 Revert of skia: Add support for CHROMIUM_image backed textures. (patchset #19 id:380001 of https://codereview.chromium.org/1623653002/ )
Reason for revert:
Breaks ASAN bot:

Direct leak of 56 byte(s) in 1 object(s) allocated from:
...
test_CustomTexture

https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Ubuntu-GCC-Golo-GPU-GT610-x86_64-Debug-ASAN/builds/2676/steps/dm/logs/stdio

Original issue's description:
> skia: Add support for CHROMIUM_image backed textures.
>
> I created a new abstract base class TextureStorageAllocator that consumers of
> Skia can subclass and pass back to Skia. When a surface is created with a
> pointer to a TextureStorageAllocator, any textures it creates, or that are
> derived from the original surface, will allocate and deallocate storage using
> the methods on TextureStorageAllocator.
>
> BUG=https://code.google.com/p/chromium/issues/detail?id=579664
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1623653002
>
> Committed: https://skia.googlesource.com/skia/+/92098e691f10a010e7421125ba4d44c02506bb55
>
> Committed: https://skia.googlesource.com/skia/+/7fec91ce6660190f8d7c5eb6f3061e4550cc672b
>
> Committed: https://skia.googlesource.com/skia/+/b8d6e088590160f1198110c2371b802c1d541a36

TBR=bsalomon@chromium.org,cblume@chromium.org,bsalomon@google.com,robertphillips@google.com,egdaniel@google.com,reed@google.com,erikchen@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=https://code.google.com/p/chromium/issues/detail?id=579664

Review URL: https://codereview.chromium.org/1684993002
2016-02-09 16:28:46 -08:00
erikchen
b8d6e08859 skia: Add support for CHROMIUM_image backed textures.
I created a new abstract base class TextureStorageAllocator that consumers of
Skia can subclass and pass back to Skia. When a surface is created with a
pointer to a TextureStorageAllocator, any textures it creates, or that are
derived from the original surface, will allocate and deallocate storage using
the methods on TextureStorageAllocator.

BUG=https://code.google.com/p/chromium/issues/detail?id=579664
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1623653002

Committed: https://skia.googlesource.com/skia/+/92098e691f10a010e7421125ba4d44c02506bb55

Committed: https://skia.googlesource.com/skia/+/7fec91ce6660190f8d7c5eb6f3061e4550cc672b

Review URL: https://codereview.chromium.org/1623653002
2016-02-09 13:30:55 -08:00
caryclark
0449bcfb2f add helper to create fancy underlines
Add a couple of utility functions to SkPaint that return the bounds
of glyphs between a pair of lines.

The common use case envisioned generates the edges of descenders
between the top and bottom bounds of an underline to allow computing
a stroke that skips those descenders.

The implementation stores a linked list in each glyph containing
the bounds of the lines parallel to the advance and the outermost
intersections within those bounds.

When the glyph cache is constructed, the glyph path is intersected
with the bounds and the extreme min and max values within the bounds
is added to an intercept.

Share the text to path iter to construct the data.

Make a half-hearted attempt to support vertical text; while the
vertical implementation is complete; surrounding code (e.g. paint
align) has short-comings with vertical.

R=fmalita@chromium.org, reed@google.com

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1654883003

Review URL: https://codereview.chromium.org/1654883003
2016-02-09 13:25:45 -08:00
bungeman
85dc359f74 Remove SkNEW_APPEND_TO_TARRAY.
The use of SkNEW_APPEND_TO_TARRAY is now better served by
SkTArray::emplace_back(...) which should now be used instead. The
existing users of SkNEW_APPEND_TO_TARRAY are converted and the code
relating to SkNEW_APPEND_TO_TARRAY is removed.

TBR=reed
This only removes code. The file should also be made private.

Review URL: https://codereview.chromium.org/1682083002
2016-02-09 11:32:56 -08:00
reed
d2ed622a2f start experimenting with 64bit frame-buffers
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1680523002

Review URL: https://codereview.chromium.org/1680523002
2016-02-09 09:14:59 -08:00
bungeman
918090c819 SkTArray to move when moving.
This updates SkTArray to move elements when possible, instead of always
copying them.

TBR=reed
Agreed moving is good. This should also become private.

Committed: https://skia.googlesource.com/skia/+/3c69348e725131150e4ab962dec1b3ff1148a6bd

Review URL: https://codereview.chromium.org/1672063002
2016-02-09 09:14:28 -08:00
mtklein
4984b85037 Revert of SkTArray to move when moving. (patchset #3 id:40001 of https://codereview.chromium.org/1672063002/ )
Reason for revert:
Broke the Chrome roll:

https://codereview.chromium.org/1680563005

Original issue's description:
> SkTArray to move when moving.
>
> This updates SkTArray to move elements when possible, instead of always
> copying them.
>
> TBR=reed
> Agreed moving is good. This should also become private.
>
> Committed: https://skia.googlesource.com/skia/+/3c69348e725131150e4ab962dec1b3ff1148a6bd

TBR=reed@google.com,bungeman@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/1683693002
2016-02-09 05:14:04 -08:00
robertphillips
4f0379444d Alter SkXfermode's asFragmentProcessor & asXPFactory contracts
TBR=bsalomon@google.com

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1674673002

Review URL: https://codereview.chromium.org/1674673002
2016-02-09 05:09:28 -08:00
reed
3125565804 extend modecolorfilter to 4f
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1670063002

Review URL: https://codereview.chromium.org/1670063002
2016-02-08 12:56:57 -08:00
kjlubick
f5b8b6dd54 Reland of SkTArray to move when moving. (patchset #1 id:1 of https://codereview.chromium.org/1677103002/ )
Reason for revert:
This was not the problem.

Original issue's description:
> Revert of SkTArray to move when moving. (patchset #3 id:40001 of https://codereview.chromium.org/1672063002/ )
>
> Reason for revert:
> This appears to have broken several things.
>
> Original issue's description:
> > SkTArray to move when moving.
> >
> > This updates SkTArray to move elements when possible, instead of always
> > copying them.
> >
> > TBR=reed
> > Agreed moving is good. This should also become private.
> >
> > Committed: https://skia.googlesource.com/skia/+/3c69348e725131150e4ab962dec1b3ff1148a6bd
>
> TBR=reed@google.com,mtklein@google.com,bungeman@google.com
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
>
> Committed: https://skia.googlesource.com/skia/+/2f8c9bf96ceea9d13fb0fc29285ecaf1673f2e8b

TBR=reed@google.com,mtklein@google.com,bungeman@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/1678923002
2016-02-08 10:20:12 -08:00
kjlubick
2f8c9bf96c Revert of SkTArray to move when moving. (patchset #3 id:40001 of https://codereview.chromium.org/1672063002/ )
Reason for revert:
This appears to have broken several things.

Original issue's description:
> SkTArray to move when moving.
>
> This updates SkTArray to move elements when possible, instead of always
> copying them.
>
> TBR=reed
> Agreed moving is good. This should also become private.
>
> Committed: https://skia.googlesource.com/skia/+/3c69348e725131150e4ab962dec1b3ff1148a6bd

TBR=reed@google.com,mtklein@google.com,bungeman@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/1677103002
2016-02-08 10:03:14 -08:00
bungeman
3c69348e72 SkTArray to move when moving.
This updates SkTArray to move elements when possible, instead of always
copying them.

TBR=reed
Agreed moving is good. This should also become private.

Review URL: https://codereview.chromium.org/1672063002
2016-02-08 09:02:34 -08:00
bungeman
9d55297f1f Make SkString movable.
This adds a move constructor and move assignment to SkString. This
allows elision of atomic increments and decrements on the fRec.

TBR=reed
Already agreed that moving is good.

Review URL: https://codereview.chromium.org/1672123002
2016-02-07 18:42:54 -08:00
bungeman
ccce0e0257 Make SkPaint movable.
This adds a move constructor and move assignment to SkPaint. This
allows elision of atomic increments and decrements on the reference
counted fields.

Review URL: https://codereview.chromium.org/1676843002
2016-02-07 14:37:23 -08:00
brucedawson
964eec6776 Add non-inline SkRTreeFactory constructor to fix clang-cl
When Chromium is switched to build with VS 2015 that switches clang-cl
to build in -fmsc-version=1900 mode. This causes some changes in
importing of constructors and vftables which leads to link errors in
blink_platform.dll. Adding a non-inline constructor makes 1900 mode
behave consistently with 1800 mode and avoids the link error.

The root cause needs investigation but this will unblock the VS 2015
switch.

BUG=440500,498544
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1676833002

Review URL: https://codereview.chromium.org/1676833002
2016-02-06 12:40:56 -08:00
bsalomon
f1036b2c66 Revert of skia: Add support for CHROMIUM_image backed textures. (patchset #17 id:340001 of https://codereview.chromium.org/1623653002/ )
Reason for revert:
New unit test is failing on Windows ANGLE bots:
http://build.chromium.org/p/client.skia/builders/Test-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Release-ANGLE/builds/1866/steps/dm/logs/stdio

Original issue's description:
> skia: Add support for CHROMIUM_image backed textures.
>
> I created a new abstract base class TextureStorageAllocator that consumers of
> Skia can subclass and pass back to Skia. When a surface is created with a
> pointer to a TextureStorageAllocator, any textures it creates, or that are
> derived from the original surface, will allocate and deallocate storage using
> the methods on TextureStorageAllocator.
>
> BUG=https://code.google.com/p/chromium/issues/detail?id=579664
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1623653002
>
> Committed: https://skia.googlesource.com/skia/+/92098e691f10a010e7421125ba4d44c02506bb55
>
> Committed: https://skia.googlesource.com/skia/+/7fec91ce6660190f8d7c5eb6f3061e4550cc672b

TBR=bsalomon@chromium.org,cblume@chromium.org,robertphillips@google.com,egdaniel@google.com,reed@google.com,erikchen@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=https://code.google.com/p/chromium/issues/detail?id=579664

Review URL: https://codereview.chromium.org/1673923003
2016-02-05 17:56:39 -08:00
ericrk
369e9375a3 Add Histogram Macros to Skia
Adds a set of histogram macros to Skia, modeled after Chrome's
UMA_HISTOGRAM_* macros. These allow logging of high frequency events,
and are useful to analyze real world usage of certain features.

By default, these macros are no-ops. Users can provide a custom
header file which defines these macros if they wish to collect
histogram data. Chrome will provide such a header.

I've currently only added two macros:
- SK_HISTOGRAM_BOOLEAN - logs a true/false type relationship (whether
we are tiling a texture or not on each draw).
- SK_HISTOGRAM_ENUMERATION - logs a set of potential values (which of
a number of choices were selected for the texture upload path).

We could add more unused macros at the moment, but it seems easier to
add these as needed, WDYT?

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1652053004

Review URL: https://codereview.chromium.org/1652053004
2016-02-05 15:32:36 -08:00
erikchen
7fec91ce66 skia: Add support for CHROMIUM_image backed textures.
I created a new abstract base class TextureStorageAllocator that consumers of
Skia can subclass and pass back to Skia. When a surface is created with a
pointer to a TextureStorageAllocator, any textures it creates, or that are
derived from the original surface, will allocate and deallocate storage using
the methods on TextureStorageAllocator.

BUG=https://code.google.com/p/chromium/issues/detail?id=579664
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1623653002

Committed: https://skia.googlesource.com/skia/+/92098e691f10a010e7421125ba4d44c02506bb55

Review URL: https://codereview.chromium.org/1623653002
2016-02-05 12:10:55 -08:00
reed
3601f280dc add kRGBA_F16_SkColorType
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1666343002

Review URL: https://codereview.chromium.org/1666343002
2016-02-05 11:18:39 -08:00
bsalomon
e63ffef624 Remove deferred clear from SkGpuDevice
Add combining to GrClearBatch

Fix issue with state tracking in GrGLGpu::createTestingOnlyBackendTexture

Add tests for clearing GPU SkSurfaces and add tests for GrDrawContext::clear().

Add comment that SkCanvas::flush will resolve the RT in the GPU case.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1658823002

Review URL: https://codereview.chromium.org/1658823002
2016-02-05 07:17:34 -08:00
benjaminwagner
f49c75a8f1 Move Google3-specific stack limitation logic to template classes.
Remove #ifdefs in other files.

Reapplies https://codereview.chromium.org/1656143003; removing the implicit constructors for GLPtr and GLPtrAlias resolves the build issue on Android.

Also reverts https://codereview.chromium.org/1663013004

Does not change the public API.

TBR=reed
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1666203002

Review URL: https://codereview.chromium.org/1666203002
2016-02-05 07:02:38 -08:00
jcgregorio
e7d7f90b59 Revert of skia: Add support for CHROMIUM_image backed textures. (patchset #14 id:260001 of https://codereview.chromium.org/1623653002/ )
Reason for revert:
Seems to causing the DEPS roll to fail:

   https://codereview.chromium.org/1668293002/

Original issue's description:
> skia: Add support for CHROMIUM_image backed textures.
>
> I created a new abstract base class TextureStorageAllocator that consumers of
> Skia can subclass and pass back to Skia. When a surface is created with a
> pointer to a TextureStorageAllocator, any textures it creates, or that are
> derived from the original surface, will allocate and deallocate storage using
> the methods on TextureStorageAllocator.
>
> BUG=https://code.google.com/p/chromium/issues/detail?id=579664
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1623653002
>
> Committed: https://skia.googlesource.com/skia/+/92098e691f10a010e7421125ba4d44c02506bb55

TBR=bsalomon@chromium.org,cblume@chromium.org,bsalomon@google.com,robertphillips@google.com,egdaniel@google.com,reed@google.com,erikchen@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=https://code.google.com/p/chromium/issues/detail?id=579664

Review URL: https://codereview.chromium.org/1669213002
2016-02-04 19:51:25 -08:00
fmalita
3a94c6c62c Add SkAutoPixmapStorage::detachPixelsAsData()
Allows passing pixels ownership to clients.

BUG=skia:4896
R=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1662353002

Review URL: https://codereview.chromium.org/1662353002
2016-02-04 13:09:59 -08:00
erikchen
92098e691f skia: Add support for CHROMIUM_image backed textures.
I created a new abstract base class TextureStorageAllocator that consumers of
Skia can subclass and pass back to Skia. When a surface is created with a
pointer to a TextureStorageAllocator, any textures it creates, or that are
derived from the original surface, will allocate and deallocate storage using
the methods on TextureStorageAllocator.

BUG=https://code.google.com/p/chromium/issues/detail?id=579664
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1623653002

Review URL: https://codereview.chromium.org/1623653002
2016-02-04 12:03:08 -08:00
reed
f7cdb06d62 extend compose-colorfilter to 4f
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1664663003

Review URL: https://codereview.chromium.org/1664663003
2016-02-04 11:35:27 -08:00
robertphillips
b6c65e9995 Add SkSpecialImage & SkSpecialSurface classes
Initial classes.

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1579323002

Review URL: https://codereview.chromium.org/1579323002
2016-02-04 10:52:42 -08:00
benjaminwagner
ff172dab92 Revert of Work around exasperating Google3 Android build error. (patchset #1 id:1 of https://codereview.chromium.org/1649493005/ )
Reason for revert:
This workaround no longer seems to be necessary.

Original issue's description:
> Work around exasperating Google3 Android build error.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1649493005
>
> Committed: https://skia.googlesource.com/skia/+/900901fb1ba5170549670829fc8f9d9b590ff5f0

TBR=mtklein@google.com,reed@google.com
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=skia:

Review URL: https://codereview.chromium.org/1669663003
2016-02-03 16:29:25 -08:00
Brian Salomon
de3a726ad3 Make SkImage::readYUV8Planes const
TBR=reed@google.com

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1660393003
BUG=skia:

Review URL: https://codereview.chromium.org/1660393003 .
2016-02-03 17:09:00 -05:00
senorblanco
afc7cce5d6 Fix for rounded-rect clips with filters.
Don't use the base canvas size to limit raster of complex clips, since
the top canvas size may actually be larger (e.g., a blur filter which
expands the clip bounds to accommodate filter margins). Use the top
canvas bounds instead.

BUG=skia:4879,471212
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1657333002

Review URL: https://codereview.chromium.org/1657333002
2016-02-02 18:44:16 -08:00
benjaminwagner
67e8bd2072 Revert of Move Google3-specific stack limitation logic to template classes. Remove #ifdefs in other files. (patchset #2 id:50001 of https://codereview.chromium.org/1656143003/ )
Reason for revert:
See https://codereview.chromium.org/1665603002

Original issue's description:
> Move Google3-specific stack limitation logic to template classes. Remove #ifdefs in other files.
>
> Does not change the public API.
>
> TBR=reed
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1656143003
>
> Committed: https://skia.googlesource.com/skia/+/c92159c8250c62cc47b7b63686538d61d54d2835

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

Review URL: https://codereview.chromium.org/1666503002
2016-02-02 16:01:39 -08:00
benjaminwagner
c92159c825 Move Google3-specific stack limitation logic to template classes. Remove #ifdefs in other files.
Does not change the public API.

TBR=reed
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1656143003

Review URL: https://codereview.chromium.org/1656143003
2016-02-02 12:48:14 -08:00
bsalomon
f267c1efe7 Add ability to extract YUV planes from SkImage
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1513393002

Review URL: https://codereview.chromium.org/1513393002
2016-02-01 13:16:14 -08:00
bsalomon
8610002ff8 Move SkColorMatrixFilter implementation to core.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1648933002

Review URL: https://codereview.chromium.org/1648933002
2016-02-01 12:09:07 -08:00
xidachen
2352696313 Replace the id<-->key hashmap in SkImageFilter by a SkTArray
In the current implementation, SkImageFilter::Cache maintains a hash map
that maps SkImageFilter's uniqueID to an array of keys, and its purpose
is to remove the values in Cache that are associated with this array of
keys that are indexed by uniqueID. However, maintaining this hash map
causes perf regression to smoothness.tough_filters_cases.

This CL removes the id<-->key hashmap. Instead, we maintain an array of
keys in SkImageFilter. Whenever there is a new key, we push it into the
array. In ~SkImageFilter(), we call Cache::purgeByKeys to remove all the
values that are associated with the keys that are maintained by SkImageFilter.

BUG=571655
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1651433002

Review URL: https://codereview.chromium.org/1651433002
2016-02-01 05:27:16 -08:00
reed
395eabeb0e float components in xfermodes
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1623483002

TBR=mtklein

Review URL: https://codereview.chromium.org/1634273002
2016-01-30 18:52:31 -08:00
bsalomon
8e74f80ca1 Add SkImage factory method that forces image to be resolved to a texture.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1631053003

Review URL: https://codereview.chromium.org/1631053003
2016-01-30 10:01:40 -08:00
reed
9cd016e9b6 allow the caller to specified raster-surface rowbytes.
along the way, simplify how we copy the surface's bitmap

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1643873002

Review URL: https://codereview.chromium.org/1643873002
2016-01-30 10:01:06 -08:00
djsollen
f2b340fc88 Consolidate SK_CRASH and sk_throw into SK_ABORT
TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1648343003

Review URL: https://codereview.chromium.org/1648343003
2016-01-29 08:51:04 -08:00
reed
fbc1e296b2 starter procs for blending with pm4f
curr/maxrss	loops	min	median	mean	max	stddev	samples   	config	bench
   8/8   MB	4	87.1µs	91µs	89.8µs	92µs	2%	▇▇▇▇█▇▅▁▁▁	nonrendering	xfer4f_srcover_N_opaque_linear
   9/9   MB	2	196µs	196µs	215µs	383µs	27%	▁▁▁▁█▁▁▁▁▁	nonrendering	xfer4f_srcover_N_opaque_srgb
   9/9   MB	1	313µs	313µs	313µs	313µs	0%	▁▄▅▅▅▂████	nonrendering	xfer4f_srcover_N_alpha_linear
   9/9   MB	1	580µs	580µs	582µs	602µs	1%	▁▁▁▁▁▁▂▁▁█	nonrendering	xfer4f_srcover_N_alpha_srgb
   9/9   MB	23	13.1µs	13.1µs	13.1µs	13.1µs	0%	▆▄▄█▂▂▂▁▂▁	nonrendering	xfer4f_srcover_1_opaque_linear
   9/9   MB	23	13.2µs	13.2µs	13.2µs	13.2µs	0%	█▄▂▁▃▁▂▂▂▂	nonrendering	xfer4f_srcover_1_opaque_srgb
   9/9   MB	2	178µs	183µs	183µs	185µs	1%	▇▇▇█▇▇▇▇▇▁	nonrendering	xfer4f_srcover_1_alpha_linear
   9/9   MB	1	517µs	517µs	517µs	517µs	0%	▇█▄▃▄▁▂▁▂▄	nonrendering	xfer4f_srcover_1_alpha_srgb

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1642703003

TBR=
landing now so these incremental types/functions can be used to collaborate with herb's work. nothing is active at this point

Review URL: https://codereview.chromium.org/1642703003
2016-01-29 05:22:59 -08:00
fmalita
54d60293ce SaveFlags begone!
This is now dead code (post https://codereview.chromium.org/1636103002).

R=reed@google.com,robertphillips@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1648773002

Review URL: https://codereview.chromium.org/1648773002
2016-01-28 13:14:53 -08:00
benjaminwagner
900901fb1b Work around exasperating Google3 Android build error.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1649493005

Review URL: https://codereview.chromium.org/1649493005
2016-01-28 12:55:31 -08:00
senorblanco
d8ff5b336e Image filters: Make a recursive, forward-mapping bounds
traversal which respects the CropRect. This is useful when
you want the device-space bounds of a primitive after
filtering. (This may also eventually subsume
computeFastBounds()).

This CL generalizes filterBounds() and onFilterBounds() to
take a mapping direction. It also makes filterBounds()
responsible for calling onFilterNodeBounds() and applying
the crop rect, simplifying onFilterBounds().

BUG=skia:4627
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1612953004

Review URL: https://codereview.chromium.org/1612953004
2016-01-28 08:23:02 -08:00
fmalita
4c5f1f6114 Remove SK_SUPPORT_LEGACY_SAVEFLAGS define on Android
Android is the only platform still using SK_SUPPORT_LEGACY_SAVEFLAGS
(indirectly, due to SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG).

At this point it should be safe to remove the define.

R=djsollen@google.com,scroggo@google.com,reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1636103002

Review URL: https://codereview.chromium.org/1636103002
2016-01-27 18:46:30 -08:00
mtklein
bbb6dc80fd kill SkValue
This is clearly not what we're going to do.

TBR=reed@google.com

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1643753002

Review URL: https://codereview.chromium.org/1643753002
2016-01-27 13:08:33 -08:00
lsalzman
05332d9c8a check for both __ARM_NEON__ and __ARM_NEON
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=1630903004

Review URL: https://codereview.chromium.org/1630903004
2016-01-26 07:34:51 -08:00
robertphillips
64b0f5f957 Remove SkLerpXfermode
This relies on the Chromium CL https://codereview.chromium.org/1610573004/ (Replace use of SkLerpXfermode with SkArithmeticMode)

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1611633002

Review URL: https://codereview.chromium.org/1611633002
2016-01-25 14:19:56 -08:00