Commit Graph

348 Commits

Author SHA1 Message Date
mtklein
566b23c571 Revert of skstd -> std for unique_ptr (patchset #9 id:160001 of https://codereview.chromium.org/1436033003/ )
Reason for revert:
10.9 bots are too old too.

Original issue's description:
> skstd -> std for unique_ptr
>
> TBR=reed@google.com
> No public API changes.
>
> BUG=skia:4564
>
> Committed: https://skia.googlesource.com/skia/+/755c553c17b82bb5de3d9cc8d3b2a866ff9e9e50

TBR=bungeman@google.com,mtklein@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4564

Review URL: https://codereview.chromium.org/1446413002
2015-11-16 13:05:37 -08:00
mtklein
755c553c17 skstd -> std for unique_ptr
TBR=reed@google.com
No public API changes.

BUG=skia:4564

Review URL: https://codereview.chromium.org/1436033003
2015-11-16 12:57:52 -08:00
mtklein
64593525de Replace SkFunction with std::function
TBR=reed@google.com
No public API changes.

Review URL: https://codereview.chromium.org/1441753002
2015-11-12 10:41:05 -08:00
herb
e5911c9c5b Extract glyph find and position code in preparation to use it in XPS and GPU code.
BUG=skia:

Review URL: https://codereview.chromium.org/1409123010
2015-11-09 13:15:21 -08:00
mtklein
e71000f0df Move SkChecksum::Murmur3 out of the header.
As we use this more and more, we end up with more and more inline copies.
On my desktop, this makes Skia ~16K smaller.

Boy perf trybots would be neat.

BUG=skia:

Review URL: https://codereview.chromium.org/1415133003
2015-10-21 11:53:27 -07:00
robertphillips
423f6461e9 Add SkTTopoSort
BUG=skia:4094

Review URL: https://codereview.chromium.org/1414503003
2015-10-19 12:15:55 -07:00
mtklein
2e2ea38bb7 SkRemote
BUG=skia:

Review URL: https://codereview.chromium.org/1391023005
2015-10-16 10:29:41 -07:00
senorblanco
20311d4843 Implement SkLocalMatrixImageFilter.
At draw time, this filter simply concatenates the given matrix to the
CTM, and recurses on its input. The matrix is thus applied to any
upstream filter parameters and crop rects.

BUG=skia:

Review URL: https://codereview.chromium.org/1392833005
2015-10-14 04:53:31 -07:00
bsalomon
afa95e270c Remove image usage type enum. Use GrTextureParams instead.
BUG=skia:

Review URL: https://codereview.chromium.org/1404433002
2015-10-12 10:39:46 -07:00
herb
39e2e75f73 Remove duplicate .cpp which should have been a .h
Review URL: https://codereview.chromium.org/1389923002
2015-10-06 07:42:53 -07:00
herb
1562855b19 Add more .h files to the .gypi
BUG=skia:

Review URL: https://codereview.chromium.org/1386963002
2015-10-05 13:28:59 -07:00
herb
f32602921a Add some of my favorite headers to gyp.
BUG=skia:

Review URL: https://codereview.chromium.org/1378133003
2015-09-30 12:22:25 -07:00
reed
856e9d9214 Revert[4] of add ImageShader, sharing code with its Bitmap cousin
Now with GrTextureMaker subclasses to handle npot usage.

This reverts commit 476506d070.

BUG=skia:

Review URL: https://codereview.chromium.org/1370223002
2015-09-30 12:21:45 -07:00
herb
e4c17356b6 Unify ThreadID.
BUG=skia:

Review URL: https://codereview.chromium.org/1371303003
2015-09-29 14:38:01 -07:00
herb
62a69c26b3 Move Mutexy things to private.
There is no API change.

TBR=reed@google.com

BUG=skia:

Review URL: https://codereview.chromium.org/1368333004
2015-09-29 11:47:45 -07:00
reed
476506d070 Revert of Revert[2] of add ImageShader, sharing code with its Bitmap cousin (patchset #11 id:200001 of https://codereview.chromium.org/1352293002/ )
Reason for revert:
guess: Need to handle NPOT support in shader case

Original issue's description:
> Revert[2] of add ImageShader, sharing code with its Bitmap cousin
>
> Adjustment from previous land : runtime check for npot-support when texture is requested for tiling.
>
> (patchset #10 id:180001 of https://codereview.chromium.org/1342113002/ )
>
> This reverts commit f260851362.
>
> BUG=skia:4365
>
> Committed: https://skia.googlesource.com/skia/+/fe05707c356d2a8c2c69222591d4cafbd456b4e5

TBR=fmalita@chromium.org,robertphillips@google.com,bsalomon@google.com,reed@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4365

Review URL: https://codereview.chromium.org/1375673002
2015-09-28 10:26:51 -07:00
reed
c9e190ddac Revert of change pixel-serializer to support reencoding existing data (patchset #5 id:80001 of https://codereview.chromium.org/1373683003/ )
Reason for revert:
Need to somehow get access to encoders in chrome -- link error on the roll since SkImageEncoder is not built as part of chrome.

Original issue's description:
> change pixel-serializer to support reencoding existing data
>
> Trying to evolve this interface so it can
> - support rich set of backend-encoders (including ones like ETC1 that can cheaply convert to KXT
> - allow for encoding images as well as bitmaps (e.g. for picture serialization)
> - perhaps replace SkImageEncoder as an API (assuming we create a factory that returns a serializer given a format)
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/13f48dc85aa68a60da66aaf39c93d527d11d1278

TBR=scroggo@google.com,msarett@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1371983003
2015-09-28 09:58:41 -07:00
reed
13f48dc85a change pixel-serializer to support reencoding existing data
Trying to evolve this interface so it can
- support rich set of backend-encoders (including ones like ETC1 that can cheaply convert to KXT
- allow for encoding images as well as bitmaps (e.g. for picture serialization)
- perhaps replace SkImageEncoder as an API (assuming we create a factory that returns a serializer given a format)

BUG=skia:

Review URL: https://codereview.chromium.org/1373683003
2015-09-28 08:58:53 -07:00
reed
fe05707c35 Revert[2] of add ImageShader, sharing code with its Bitmap cousin
Adjustment from previous land : runtime check for npot-support when texture is requested for tiling.

(patchset #10 id:180001 of https://codereview.chromium.org/1342113002/ )

This reverts commit f260851362.

BUG=skia:4365

Review URL: https://codereview.chromium.org/1352293002
2015-09-25 02:31:09 -07:00
reed
dd42e5c05c Revert "Revert of remove unused SkCachingPixelRef (patchset #1 id:1 of https://codereview.chromium.org/1364743002/ )"
removed test for unsupported SkInstallDiscardable...

This reverts commit 60c73d5180.

BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1369443002
2015-09-24 00:21:20 -07:00
benjaminwagner
60c73d5180 Revert of remove unused SkCachingPixelRef (patchset #1 id:1 of https://codereview.chromium.org/1364743002/ )
Reason for revert:
Build failure: https://uberchromegw.corp.google.com/i/client.skia.compile/builders/Build-Ubuntu-GCC-Arm7-Debug-Android_FrameworkDefs/builds/1146

Original issue's description:
> remove unused SkCachingPixelRef
>
> BUG=skia:
> TBR=
>
> Committed: https://skia.googlesource.com/skia/+/70d58b7da535e32bcac35739d11ab8367e99f224

TBR=halcanary@google.com,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1359393004
2015-09-23 11:53:37 -07:00
reed
70d58b7da5 remove unused SkCachingPixelRef
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1364743002
2015-09-23 11:36:03 -07:00
tomhudson
f260851362 Revert of add ImageShader, sharing code with its Bitmap cousin (patchset #10 id:180001 of https://codereview.chromium.org/1342113002/ )
Reason for revert:
Failing ImageNewShaderTest on both Android (Tegra3 GPU) and iOS bots.

e.g.

/Users/chrome-bot/buildbot/skiabot-ipad4-000/build/slave/workdir/build/skia/tests/
	ImageNewShaderTest.cpp:24	0 == memcmp(bm1.getPixels(), bm2.getPixels(), bm1.getSize())
	ImageNewShaderTest.cpp:95	0xFFFF0000 == bmt.getColor(0, y)
	ImageNewShaderTest.cpp:98	0xFFDEDEDE == bmt.getColor(x, y)
	ImageNewShaderTest.cpp:98	0xFFDEDEDE == bmt.getColor(x, y)
	ImageNewShaderTest.cpp:98	0xFFDEDEDE == bmt.getColor(x, y)
	ImageNewShaderTest.cpp:98	0xFFDEDEDE == bmt.getColor(x, y)
	ImageNewShaderTest.cpp:95	0xFFFF0000 == bmt.getColor(0, y)
...

Original issue's description:
> add ImageShader, sharing code with its Bitmap cousin
>
> This is done by having abstracted the BitmapShaderContext to take a BitmapProvider, instead of just a bitmap. This allows us to share all of that code between SkBitmap and SkImage, since both are valid providers.
>
> It also means that we can simplify SkImage_Base to not need a virtual for onNewShader, since ALL images can uniformly be turned into a shader now.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/0b93e3149d2cb30860c51f9f3204ae811d9a97ca

TBR=fmalita@chromium.org,bsalomon@google.com,robertphillips@google.com,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1355863002
2015-09-18 09:36:12 -07:00
reed
0b93e3149d add ImageShader, sharing code with its Bitmap cousin
This is done by having abstracted the BitmapShaderContext to take a BitmapProvider, instead of just a bitmap. This allows us to share all of that code between SkBitmap and SkImage, since both are valid providers.

It also means that we can simplify SkImage_Base to not need a virtual for onNewShader, since ALL images can uniformly be turned into a shader now.

BUG=skia:

Review URL: https://codereview.chromium.org/1342113002
2015-09-18 08:26:26 -07:00
reed
013e9e3bb0 move SkBitmapProvider to its own file
BUG=skia:

Review URL: https://codereview.chromium.org/1346713002
2015-09-15 14:46:27 -07:00
reed
85d9178832 Use SkImageCacherator in SkImages
Possible follow-up changes to consider

1. Roll SkImage_Raster and _Gpu into _Generator, where the generator (or cacherator) is backed by a pre-existing texture or raster.
2. Evolve SkImageUsageType into a verb requiring stretching, and have the caller (common code) digest the caps() and usage, so that subclasses are just told what to do (stretch or not)
3. Common code/utility to convert an unstretched texture into a stretch one (and cache it) if the generator can only make an unstretched one.

BUG=skia:

Review URL: https://codereview.chromium.org/1282363002
2015-09-10 14:33:38 -07:00
robertphillips
2f0dbc761a Update SkLightingShader to support rotation
This also:
makes the SkLightingShader handle normal maps where the rects aren't aligned between the diffuse and normal maps.

adds a light aggregating class (Lights) to SkLightingShader (along with a Builder nested class).

Split out of https://codereview.chromium.org/1261433009/ (Add SkCanvas::drawLitAtlas call)

Committed: https://skia.googlesource.com/skia/+/45b59ed6e4e231814dbdb9f707b3d2a7ee50de84

Review URL: https://codereview.chromium.org/1291783003
2015-08-20 05:15:07 -07:00
robertphillips
f7d602a458 Revert "Update SkLightingShader to support rotation"
This reverts commit 45b59ed6e4.

TBR=herb@google.com

Review URL: https://codereview.chromium.org/1304673002
2015-08-19 13:11:23 -07:00
bungeman
f3c15b7cfc Move SkTemplates.h to private.
SkTemplates.h contains a number of Skia specific utilities which are
not designed for external use. In addition to reducing the external
support burden, this will allow Skia to freely refactor this file.

Review URL: https://codereview.chromium.org/1272293004
2015-08-19 11:56:48 -07:00
robertphillips
45b59ed6e4 Update SkLightingShader to support rotation
This also:
makes the SkLightingShader handle normal maps where the rects aren't aligned between the diffuse and normal maps.

adds a light aggregating class (Lights) to SkLightingShader (along with a Builder nested class).

Split out of https://codereview.chromium.org/1261433009/ (Add SkCanvas::drawLitAtlas call)

Review URL: https://codereview.chromium.org/1291783003
2015-08-19 10:35:14 -07:00
reed
95dd17737d Revert[8] "move some public headers into private"
This reverts commit fb28cd2b13.

BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1298833002
2015-08-17 18:29:48 -07:00
reed
fb28cd2b13 Revert[7] "move some public headers into private"
This reverts commit e02716908f.

BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1300523002
2015-08-15 08:46:27 -07:00
reed
e02716908f Revert[6] "move some public headers into private"
This reverts commit cc1229c9d5.

BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1295003002
2015-08-15 07:28:34 -07:00
reed
8f34372f7e Extend SkImageGenerator to support natively generated GrTextures. As part of this, added uniqueID() to the generator, and made it be in the same namespace is bitmaps, pixelrefs, images.
To do this, create SkImageCacherator, which wraps a generator and provides an
interface to get a cached answer for either the raster or texture output of
the generator.

BUG=skia:

Review URL: https://codereview.chromium.org/1291803002
2015-08-13 13:32:39 -07:00
reed
cc1229c9d5 Revert "Revert[4] "move some public headers into private""
This reverts commit 33e00db73d.

BUG=skia:
TBR=
NOTREECHECKS=True

FAILED: /b/build/goma/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/components/user_manager/user_manager_test_support.fake_user_manager.o.d -DV8_DEPRECATION_WARNINGS -DCLD_VERSION=2 -D_FILE_OFFSET_BITS=64 -DCHROMIUM_BUILD -DCR_CLANG_REVISION=242792-1 -DCOMPONENT_BUILD -DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_AURA=1 -DUSE_ASH=1 -DUSE_PANGO=1 -DUSE_CAIRO=1 -DUSE_DEFAULT_RENDER_THEME=1 -DUSE_LIBJPEG_TURBO=1 -DUSE_X11=1 -DIMAGE_LOADER_EXTENSION=1 -DENABLE_WEBRTC=1 -DENABLE_MEDIA_ROUTER=1 -DUSE_PROPRIETARY_CODECS -DENABLE_PEPPER_CDMS -DENABLE_CONFIGURATION_POLICY -DENABLE_NOTIFICATIONS -DENABLE_HIDPI=1 -DENABLE_TOPCHROME_MD=1 -DUSE_UDEV -DDONT_EMBED_BUILD_METADATA -DDCHECK_ALWAYS_ON=1 -DFIELDTRIAL_TESTING_ENABLED -DENABLE_TASK_MANAGER=1 -DENABLE_EXTENSIONS=1 -DENABLE_PLUGINS=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_THEMES=1 -DENABLE_AUTOFILL_DIALOG=1 -DENABLE_BACKGROUND=1 -DENABLE_GOOGLE_NOW=1 -DENABLE_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_APP_LIST=1 -DENABLE_SUPERVISED_USERS=1 -DENABLE_MDNS=1 -DENABLE_SERVICE_DISCOVERY=1 -DV8_USE_EXTERNAL_STARTUP_DATA -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DSAFE_BROWSING_SERVICE -DGTEST_HAS_POSIX_RE=0 -DGTEST_LANG_CXX11=0 -DUNIT_TEST -DGTEST_HAS_RTTI=0 -DUSE_LIBPCI=1 -DUSE_OPENSSL=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DOS_CHROMEOS=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DWTF_USE_DYNAMIC_ANNOTATIONS=1 -D_DEBUG -D_GLIBCXX_DEBUG=1 -Igen -I../.. -I../../skia/config -I../../testing/gmock/include -I../../testing/gtest/include -Werror -pthread -fno-strict-aliasing -Wall -Wno-unused-parameter -Wno-missing-field-initializers -fvisibility=hidden -pipe -fPIC -Wno-reserved-user-defined-literal -Xclang -load -Xclang /b/build/slave/linux_chromeos/build/src/third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so -Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang check-templates -fcolor-diagnostics -B/b/build/slave/linux_chromeos/build/src/third_party/binutils/Linux_x64/Release/bin -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 -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -m64 -march=x86-64 -O0 -g -funwind-tables -gsplit-dwarf -Wno-undefined-bool-conversion -Wno-tautological-undefined-compare -g0 -fno-exceptions -fno-rtti -fno-threadsafe-statics -fvisibility-inlines-hidden -Wsign-compare -std=gnu++11  -c ../../components/user_manager/fake_user_manager.cc -o obj/components/user_manager/user_manager_test_support.fake_user_manager.o
In file included from ../../components/user_manager/fake_user_manager.cc:5:
In file included from ../../components/user_manager/fake_user_manager.h:12:
In file included from ../../components/user_manager/user.h:14:
In file included from ../../components/user_manager/user_image/user_image.h:12:
In file included from ../../ui/gfx/image/image_skia.h:15:
In file included from ../../ui/gfx/image/image_skia_rep.h:8:
In file included from ../../third_party/skia/include/core/SkBitmap.h:11:
In file included from ../../third_party/skia/include/core/SkColor.h:11:
In file included from ../../third_party/skia/include/core/SkScalar.h:12:
../../third_party/skia/include/core/../private/SkFloatingPoint.h:13:10: fatal error: 'SkTypes.h' file not found
#include "SkTypes.h"

ninja -w dupbuild=err -C /b/build/slave/linux_chromeos/build/src/out/Debug accessibility_unittests accessibility_unittests_run app_list_unittests app_list_unittests_run app_shell_unittests app_shell_unittests_run ash_unittests ash_unittests_run aura_builder aura_unittests aura_unittests_run base_unittests base_unittests_run browser_tests browser_tests_run cacheinvalidation_unittests cacheinvalidation_unittests_run chromeos_unittests chromeos_unittests_run components_unittests components_unittests_run compositor_unittests compositor_unittests_run content_browsertests content_browsertests_run content_unittests content_unittests_run crypto_unittests crypto_unittests_run dbus_unittests device_unittests device_unittests_run display_unittests display_unittests_run events_unittests events_unittests_run extensions_browsertests extensions_browsertests_run extensions_unittests extensions_unittests_run gcm_unit_tests gcm_unit_tests_run gfx_unittests gfx_unittests_run google_apis_unittests google_apis_unittests_run gpu_unittests gpu_unittests_run interactive_ui_tests interactive_ui_tests_run ipc_tests ipc_tests_run jingle_unittests jingle_unittests_run media_unittests media_unittests_run message_center_unittests message_center_unittests_run midi_unittests midi_unittests_run nacl_helper_nonsfi_unittests nacl_loader_unittests nacl_loader_unittests_run net_unittests net_unittests_run ppapi_unittests printing_unittests printing_unittests_run remoting_unittests remoting_unittests_run sandbox_linux_unittests sandbox_linux_unittests_run skia_unittests skia_unittests_run sql_unittests sql_unittests_run sync_unit_tests sync_unit_tests_run ui_base_unittests ui_base_unittests_run ui_chromeos_unittests ui_touch_selection_unittests ui_touch_selection_unittests_run unit_tests unit_tests_run url_unittests url_unittests_run views_unittests wm_unittests wm_unittests_run -j50
ninja: Entering directory `/b/build/slave/linux_chromeos/build/src/out/Debug'

Review URL: https://codereview.chromium.org/1288863002
2015-08-12 18:58:52 -07:00
reed
33e00db73d Revert[4] "move some public headers into private"
This reverts commit 9cdcabefa3.

BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1291613007
2015-08-12 12:53:10 -07:00
reed
9cdcabefa3 Revert[3] "move some public headers into private"
This reverts commit 9d20ee57d7.

BUG=skia:
TBR=

failures here: https://codereview.chromium.org/1286103004

Review URL: https://codereview.chromium.org/1290733002
2015-08-12 05:33:12 -07:00
reed
9d20ee57d7 Revert[2] "move some public headers into private"
This reverts commit 4cf9e7e147.

BUG=skia:
TBR=
NOTRY=True

Review URL: https://codereview.chromium.org/1284173002
2015-08-12 04:42:08 -07:00
reed
4cf9e7e147 Revert "move some public headers into private"
This reverts commit eedf0fb204.

BUG=skia:
TBR=
NOTRY=True

Review URL: https://codereview.chromium.org/1270313005
2015-08-11 08:39:18 -07:00
reed
eedf0fb204 move some public headers into private
BUG=skia:

Review URL: https://codereview.chromium.org/1289483002
2015-08-11 07:15:00 -07:00
oysteine
dfcba473b0 Moved common cross-project functionality out from SkTraceEvent.h into SkTraceEventCommon.h
Traditionally, SkTraceEvent.h was manually kept in sync with base/trace_event/trace_event.h, with project-specific parts intermixed, and tended to drift out of sync a lot (mainly in Blink, less so in Skia).

The SkTraceEventCommon.h now has only the cross-project parts, and can be copy-pasted verbatim between projects (it's an identical copy of base/trace_event/trace_event_common.h), meaning SkTraceEvent.h shouldn't go out of sync as it has before.

BUG=skia:

[mtklein mucking around below here]
NOPRESUBMIT=true
CQ_EXCLUDE_TRYBOTS=client.skia.fyi:skia_presubmit-Trybot

Review URL: https://codereview.chromium.org/1270783002
2015-08-05 12:54:40 -07:00
fmalita
1dedc3d2c0 SkPictureImageGenerator
R=reed@google.com

Review URL: https://codereview.chromium.org/1240093004
2015-08-04 13:53:14 -07:00
mtklein
8317a1832f Lay groundwork for SkOpts.
This doesn't really do anything yet.  It's just the CPU detection code, skeleton new .cpp files, and a few little .gyp tweaks.

BUG=skia:4117

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

Review URL: https://codereview.chromium.org/1255193002
2015-07-30 07:30:16 -07:00
mtklein
e88b1fb7a5 Move non-trivial constructors out-of-line.
There is more than one way to skin this SkPathPriv.h cat.

These constructors are large enough that they probably shouldn't have
been inlined like this anyway.

BUG=skia:4126

Review URL: https://codereview.chromium.org/1253963004
2015-07-29 13:14:05 -07:00
mtklein
56b78a7a2a Revert of Lay groundwork for SkOpts. (patchset #3 id:40001 of https://codereview.chromium.org/1255193002/)
Reason for revert:
Chromium doesn't call SkGraphics::Init().  This setup won't work.

Original issue's description:
> Lay groundwork for SkOpts.
>
> This doesn't really do anything yet.  It's just the CPU detection code, skeleton new .cpp files, and a few little .gyp tweaks.
>
> BUG=skia:4117
>
> Committed: https://skia.googlesource.com/skia/+/ce2c5055cee5d5d3c9fc84c1b3eeed4b4d84a827

TBR=djsollen@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4117

Review URL: https://codereview.chromium.org/1261743002
2015-07-27 12:03:23 -07:00
mtklein
ce2c5055ce Lay groundwork for SkOpts.
This doesn't really do anything yet.  It's just the CPU detection code, skeleton new .cpp files, and a few little .gyp tweaks.

BUG=skia:4117

Review URL: https://codereview.chromium.org/1255193002
2015-07-27 10:52:33 -07:00
mtklein
828877d726 Outline SkSpinlock::acquire().
The proportion of time spent doing useful work is well over 99% in acquire(),
so outlining it doesn't hurt speed at all, and makes it much easier to pick out
on a profile.

It'd be about 50/50 work/overhead if we outlined the extremely-cheap release().
I also tried outlining some SkRefCnt methods with similar mixed results.

BUG=skia:

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

Review URL: https://codereview.chromium.org/1212253013
2015-07-09 10:51:36 -07:00
mtklein
1b24933e52 Remove SkThread.h, include SkMutex.h or SkAtomics.h as appropriate.
SkThread.h doesn't do anything anymore execept include those two,
and thankfully, it doesn't seem to be mentioned outside Skia.

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

BUG=skia:

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

Review URL: https://codereview.chromium.org/1215393002
2015-07-07 12:21:22 -07:00
jvanverth
02802f64ea Revert of Remove SkThread.h, include SkMutex.h or SkAtomics.h as appropriate. (patchset #4 id:60001 of https://codereview.chromium.org/1215393002/)
Reason for revert:
Breaking the roll.

E.g. on android_chromium_gn_compile_dbg:

FAILED: /b/build/goma/gomacc ../../third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ -MMD -MF obj/skia/ext/libskia.SkMemory_new_handler.o.d -DV8_DEPRECATION_WARNINGS -DCLD_VERSION=1 -DENABLE_NOTIFICATIONS -DENABLE_BROWSER_CDMS -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DDONT_EMBED_BUILD_METADATA -DUSE_OPENSSL=1 -DUSE_OPENSSL_CERTS=1 -DNO_TCMALLOC -DDISABLE_NACL -DENABLE_CONFIGURATION_POLICY -DENABLE_SUPERVISED_USERS=1 -DENABLE_AUTOFILL_DIALOG=1 -DUSE_PROPRIETARY_CODECS -DV8_USE_EXTERNAL_STARTUP_DATA -DVIDEO_HOLE=1 -DMOBILE_SAFE_BROWSING -DSAFE_BROWSING_SERVICE -DCHROMIUM_BUILD -D_FILE_OFFSET_BITS=64 -DANDROID -DHAVE_SYS_UIO_H -DCOMPONENT_BUILD -D__GNU_SOURCE=1 -D_DEBUG -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DWTF_USE_DYNAMIC_ANNOTATIONS=1 -DSKIA_IMPLEMENTATION=1 -DSK_ARM_HAS_OPTIONAL_NEON -DSK_GAMMA_APPLY_TO_A8 -DSK_GAMMA_EXPONENT=1.4 -DSK_GAMMA_CONTRAST=0.0 -DSK_DEFAULT_FONT_CACHE_LIMIT=1048576 -DSK_IGNORE_LINEONLY_AA_CONVEX_PATH_OPTS -DSKIA_DLL -DGR_GL_IGNORE_ES3_MSAA=0 -DSK_SUPPORT_GPU=1 -DSK_BUILD_FOR_ANDROID -DUSE_CHROMIUM_SKIA -DXML_STATIC -I../.. -Igen -I../../third_party/skia/include/private -I../../third_party/skia/src/core -I../../third_party/skia/src/image -I../../third_party/skia/src/opts -I../../third_party/skia/src/pdf -I../../third_party/skia/src/ports -I../../third_party/skia/src/sfnt -I../../third_party/skia/src/utils -I../../third_party/skia/src/lazy -I../../skia/config -I../../skia/ext -I../../third_party/skia/include/c -I../../third_party/skia/include/config -I../../third_party/skia/include/core -I../../third_party/skia/include/effects -I../../third_party/skia/include/images -I../../third_party/skia/include/lazy -I../../third_party/skia/include/pathops -I../../third_party/skia/include/pdf -I../../third_party/skia/include/pipe -I../../third_party/skia/include/ports -I../../third_party/skia/include/utils -I../../third_party/skia/include/gpu -I../../third_party/skia/src/gpu -I../../third_party/zlib -I../../third_party/expat/files/lib -I../../third_party/freetype-android/include -I../../third_party/freetype-android/src/include -I../../third_party/android_tools/ndk/sources/android/cpufeatures -fno-strict-aliasing -march=armv7-a -mfloat-abi=softfp -mtune=generic-armv7-a -mthumb -mthumb-interwork -fno-tree-sra -fno-caller-saves -funwind-tables -fPIC -pipe -ffunction-sections -funwind-tables -fno-short-enums -finline-limit=64 -mfpu=vfpv3-d16 -isystem../../third_party/android_tools/ndk/sources/cxx-stl/llvm-libc++/libcxx/include -isystem../../third_party/android_tools/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/include -isystem../../third_party/android_tools/ndk/sources/android/support/include -fvisibility=hidden --sysroot=/b/build/slave/android_chromium_gn/build/src/third_party/android_tools/ndk/platforms/android-16/arch-arm -Os -fdata-sections -ffunction-sections -fomit-frame-pointer -g1 -Wno-format -Wendif-labels -Werror -Wno-missing-field-initializers -Wno-unused-parameter -Wno-psabi -Wno-extra -Wno-ignored-qualifiers -Wno-type-limits -Wno-unused-local-typedefs -fno-threadsafe-statics -fvisibility-inlines-hidden -std=gnu++11 -fno-rtti -fno-exceptions -Wno-deprecated -Wno-narrowing -Wno-literal-suffix -Wno-error=c++0x-compat -Wno-non-virtual-dtor -Wno-sign-promo -c ../../skia/ext/SkMemory_new_handler.cpp -o obj/skia/ext/libskia.SkMemory_new_handler.o
../../skia/ext/SkMemory_new_handler.cpp:12:52: fatal error: third_party/skia/include/core/SkThread.h: No such file or directory
 #include "third_party/skia/include/core/SkThread.h"

Original issue's description:
> Remove SkThread.h, include SkMutex.h or SkAtomics.h as appropriate.
>
> SkThread.h doesn't do anything anymore execept include those two,
> and thankfully, it doesn't seem to be mentioned outside Skia.
>
> No public API changes.
> TBR=reed@google.com
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/c50acf2321d7a934c80d754e9cbe936dfb8eb4cc

TBR=mtklein@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1214603003
2015-07-02 06:42:49 -07:00
mtklein
c50acf2321 Remove SkThread.h, include SkMutex.h or SkAtomics.h as appropriate.
SkThread.h doesn't do anything anymore execept include those two,
and thankfully, it doesn't seem to be mentioned outside Skia.

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

BUG=skia:

Review URL: https://codereview.chromium.org/1215393002
2015-07-01 14:00:57 -07:00
herb
c782b2a046 Implement shared locks in the style of pthread's rwlock.
BUG=skia:

Review URL: https://codereview.chromium.org/1215503005
2015-06-29 13:46:55 -07:00
mtklein
2766c00fc0 remove SkInstCnt
It's been outclassed by Valgrind and leak sanitizer,
and it seems to be causing problems for external folks building Skia.

I'm not sure why our own builds seem unaffected.

Latest thread:
https://groups.google.com/forum/#!topic/skia-discuss/oj9FsQwwSF0

BUG=skia:

Review URL: https://codereview.chromium.org/1217573002
2015-06-26 11:45:03 -07:00
reed
4c21dc5ddf add drawImageNine
this also exposes nine-patch drawing directly to devices, and creates a shared iterator for unrolling a nine-patch into single rect->rect draws.

BUG=skia:

Review URL: https://codereview.chromium.org/1211583003
2015-06-25 12:32:03 -07:00
robertphillips
fcf7829b67 remove SkDeviceProperties
There is a lot more clean up to do here but this is probably a big enough bite.

Review URL: https://codereview.chromium.org/1196683003
2015-06-19 11:49:52 -07:00
mtklein
61fa22be10 Add and use SkSemaphore
This allows a faster implementation of our SkTaskGroup thread pool.
It also means we don't need SkCondVar (which, remember, isn't supported on XP.)

Doing some testing with SampleApp, this really cuts down on the overhead from SkTaskGroup, e.g. 30% to 10%.

BUG=skia:

Review URL: https://codereview.chromium.org/1192573003
2015-06-17 10:50:25 -07:00
reed
64045423dd refactor bitmapshader to use a controller
BUG=skia:

Review URL: https://codereview.chromium.org/1153123003
2015-06-04 06:31:31 -07:00
halcanary
a681433d42 SkPDF: with opaque draws, treat SRC mode as SRC_OVER
BUG=473572

Review URL: https://codereview.chromium.org/1159763004
2015-05-27 08:53:36 -07:00
reed
92fc2ae583 add SkPixmap and external locking to bitmaps
BUG=skia:

Review URL: https://codereview.chromium.org/1074983003
2015-05-22 08:06:22 -07:00
reed
5a72c42952 remove unused SkBitmap::scrollRect API
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1154623002
2015-05-21 15:46:20 -07:00
mtklein
9db912c2ac Sketch splitting SkPicture into an interface and SkBigPicture.
Adds small pictures for drawRect(), drawTextBlob(), and drawPath().
These cover about 89% of draw calls from Blink SKPs,
and about 25% of draw calls from our GMs.

SkPicture handles:
  - serialization and deserialization
  - unique IDs

Everything else is left to the subclasses:
  - playback(), cullRect()
  - hasBitmap(), hasText(), suitableForGPU(), etc.
  - LayerInfo / AccelData if applicable.

The time to record a 1-op picture improves a good chunk
(2 mallocs to 1), and the time to record a 0-op picture
greatly improves (2 mallocs to none):

    picture_overhead_draw:   450ns -> 350ns
    picture_overhead_nodraw: 300ns -> 90ns

BUG=skia:

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

Latest blink_linux_rel:

http://build.chromium.org/p/tryserver.blink/builders/linux_blink_rel/builds/61248

Committed: https://skia.googlesource.com/skia/+/15877b6eae33a9282458bdb904a6d00440eca0ec

http://build.chromium.org/p/tryserver.blink/builders/linux_blink_rel/builds/62015

Review URL: https://codereview.chromium.org/1112523006
2015-05-19 11:11:26 -07:00
mtklein
72743b1654 Revert of Sketch splitting SkPicture into an interface and SkBigPicture. (patchset #25 id:480001 of https://codereview.chromium.org/1112523006/)
Reason for revert:
win_chromium_compile_dbg_ng

FAILED: ninja -t msvc -e environment.x86 -- E:\b\build\goma/gomacc "E:\b\depot_tools\win_toolchain\vs2013_files\VC\bin\amd64_x86\cl.exe" /nologo /showIncludes /FC @obj\third_party\skia\src\core\skia.SkBitmapHeap.obj.rsp /c ..\..\third_party\skia\src\core\SkBitmapHeap.cpp /Foobj\third_party\skia\src\core\skia.SkBitmapHeap.obj /Fdobj\skia\skia.cc.pdb
e:\b\build\slave\win\build\src\third_party\skia\include\core\skpicture.h(176) : error C2487: 'CURRENT_PICTURE_VERSION' : member of dll interface class may not be declared with dll interface

Original issue's description:
> Sketch splitting SkPicture into an interface and SkBigPicture.
>
> Adds small pictures for drawRect(), drawTextBlob(), and drawPath().
> These cover about 89% of draw calls from Blink SKPs,
> and about 25% of draw calls from our GMs.
>
> SkPicture handles:
>   - serialization and deserialization
>   - unique IDs
>
> Everything else is left to the subclasses:
>   - playback(), cullRect()
>   - hasBitmap(), hasText(), suitableForGPU(), etc.
>   - LayerInfo / AccelData if applicable.
>
> The time to record a 1-op picture improves a good chunk
> (2 mallocs to 1), and the time to record a 0-op picture
> greatly improves (2 mallocs to none):
>
>     picture_overhead_draw:   450ns -> 350ns
>     picture_overhead_nodraw: 300ns -> 90ns
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/c92c129ff85b05a714bd1bf921c02d5e14651f8b
>
> Latest blink_linux_rel:
>
> http://build.chromium.org/p/tryserver.blink/builders/linux_blink_rel/builds/61248
>
> Committed: https://skia.googlesource.com/skia/+/15877b6eae33a9282458bdb904a6d00440eca0ec

TBR=reed@google.com,robertphillips@google.com,fmalita@chromium.org,mtklein@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1130283004
2015-05-18 14:53:43 -07:00
mtklein
15877b6eae Sketch splitting SkPicture into an interface and SkBigPicture.
Adds small pictures for drawRect(), drawTextBlob(), and drawPath().
These cover about 89% of draw calls from Blink SKPs,
and about 25% of draw calls from our GMs.

SkPicture handles:
  - serialization and deserialization
  - unique IDs

Everything else is left to the subclasses:
  - playback(), cullRect()
  - hasBitmap(), hasText(), suitableForGPU(), etc.
  - LayerInfo / AccelData if applicable.

The time to record a 1-op picture improves a good chunk
(2 mallocs to 1), and the time to record a 0-op picture
greatly improves (2 mallocs to none):

    picture_overhead_draw:   450ns -> 350ns
    picture_overhead_nodraw: 300ns -> 90ns

BUG=skia:

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

Latest blink_linux_rel:

http://build.chromium.org/p/tryserver.blink/builders/linux_blink_rel/builds/61248

Review URL: https://codereview.chromium.org/1112523006
2015-05-18 13:47:17 -07:00
reed
39a9a5069b Make SkAdvancedTypefaceMetrics private.
Review URL: https://codereview.chromium.org/1129283003
2015-05-12 09:50:04 -07:00
caryclark
624637cc8e Path ops formerly found the topmost unprocessed edge and determined its angle sort order to initialize the winding. This never worked correctly with cubics and was flaky with paths consisting mostly of vertical edges.
This replacement shoots axis-aligned rays through all intersecting edges to find the outermost one either horizontally or vertically. The resulting code is smaller and twice as fast.

To support this, most of the horizontal / vertical intersection code was rewritten and standardized, and old code supporting the top-directed winding was deleted.

Contours were pointed to by an SkTDArray. Instead, put them in a linked list, and designate the list head with its own class to ensure that methods that take lists of contours start at the top. This change removed a large percentage of memory allocations used by path ops.

TBR=reed@google.com
BUG=skia:3588

Review URL: https://codereview.chromium.org/1111333002
2015-05-11 07:21:28 -07:00
reed
b7ed856fad Revert of Sketch splitting SkPicture into an interface and SkBigPicture. (patchset #22 id:420001 of https://codereview.chromium.org/1112523006/)
Reason for revert:
speculative revert to fix failures in DEPS roll

Original issue's description:
> Sketch splitting SkPicture into an interface and SkBigPicture.
>
> Adds small pictures for drawRect(), drawTextBlob(), and drawPath().
> These cover about 89% of draw calls from Blink SKPs,
> and about 25% of draw calls from our GMs.
>
> SkPicture handles:
>   - serialization and deserialization
>   - unique IDs
>
> Everything else is left to the subclasses:
>   - playback(), cullRect()
>   - hasBitmap(), hasText(), suitableForGPU(), etc.
>   - LayerInfo / AccelData if applicable.
>
> The time to record a 1-op picture improves a good chunk
> (2 mallocs to 1), and the time to record a 0-op picture
> greatly improves (2 mallocs to none):
>
>     picture_overhead_draw:   450ns -> 350ns
>     picture_overhead_nodraw: 300ns -> 90ns
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/c92c129ff85b05a714bd1bf921c02d5e14651f8b

TBR=reed@google.com,robertphillips@google.com,mtklein@google.com,mtklein@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1130333002
2015-05-07 17:30:13 -07:00
mtklein
c92c129ff8 Sketch splitting SkPicture into an interface and SkBigPicture.
Adds small pictures for drawRect(), drawTextBlob(), and drawPath().
These cover about 89% of draw calls from Blink SKPs,
and about 25% of draw calls from our GMs.

SkPicture handles:
  - serialization and deserialization
  - unique IDs

Everything else is left to the subclasses:
  - playback(), cullRect()
  - hasBitmap(), hasText(), suitableForGPU(), etc.
  - LayerInfo / AccelData if applicable.

The time to record a 1-op picture improves a good chunk
(2 mallocs to 1), and the time to record a 0-op picture
greatly improves (2 mallocs to none):

    picture_overhead_draw:   450ns -> 350ns
    picture_overhead_nodraw: 300ns -> 90ns

BUG=skia:

Review URL: https://codereview.chromium.org/1112523006
2015-05-07 13:41:07 -07:00
halcanary
0b9d4118ba SkTime: return timezone information; format in ISO-8601
Motivation: PDF/A metadata will need the creation date embedded in it.

Also, GetDateTime returns local time in Win32.  This now behaves the
same as on Unix systems.

BUG=skia:3110

Review URL: https://codereview.chromium.org/1109593002
2015-05-01 07:06:23 -07:00
caryclark
aec2510125 minor fixes to cubics code and overall alignment of how bounds and tops are computed for all curve types
All but 17 extended tests work.

A helper function is privately added to SkPath.h to permit a test to modify a given point in a path.

BUG=skia:3588

Review URL: https://codereview.chromium.org/1107353004
2015-04-29 08:28:30 -07:00
reed
5b6db07fb5 SkRWBuffer for thread-safe 'stream' sharing
WIP
- Can accumulate (write) data in one thread, and share snapshots of it in other threads
  ... e.g. network accumulates image data, and periodically we want to decode/draw it
- If this sort of thing sticks, should we promote SkData to have the same generality as
  SkRBuffer?

BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1106113002
2015-04-28 17:50:32 -07:00
caryclark
1049f1246e Now, path ops natively intersect conics, quads, and cubics in any combination. There are still a class of cubic tests that fail and a handful of undiagnosed failures from skps and fuzz tests, but things are much better overall.
Extended tests (150M+) run to completion in release in about 6 minutes; the standard test suite exceeds 100K and finishes in a few seconds on desktops.

TBR=reed
BUG=skia:3588

Review URL: https://codereview.chromium.org/1037953004
2015-04-20 08:31:59 -07:00
caryclark
54359294a7 cumulative pathops patch
Replace the implicit curve intersection with a geometric curve intersection. The implicit intersection proved mathematically unstable and took a long time to zero in on an answer.

Use pointers instead of indices to refer to parts of curves. Indices required awkward renumbering.

Unify t and point values so that small intervals can be eliminated in one pass.

Break cubics up front to eliminate loops and cusps.

Make the Simplify and Op code more regular and eliminate arbitrary differences.

Add a builder that takes an array of paths and operators.

Delete unused code.

BUG=skia:3588
R=reed@google.com

Review URL: https://codereview.chromium.org/1037573004
2015-03-26 07:52:43 -07:00
scroggo
3e5622764a Add copyright headers to remaining gyp files.
Prevents some PRESUBMIT errors.

TBR=mtklein@google.com

Review URL: https://codereview.chromium.org/1035523003
2015-03-25 10:22:41 -07:00
reed
0dc4dd6dda Revert of pathops version two (patchset #16 id:150001 of https://codereview.chromium.org/1002693002/)
Reason for revert:
ASAN investigation

Original issue's description:
> pathops version two
>
> R=reed@google.com
>
> marked 'no commit' to attempt to get trybots to run
>
> TBR=reed@google.com
>
> Committed: https://skia.googlesource.com/skia/+/ccec0f958ffc71a9986d236bc2eb335cb2111119

TBR=caryclark@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1029993002
2015-03-24 13:55:33 -07:00
senorblanco
8c24d453a2 Move SkMatrixImageFilter.h into src/core.
Callers in Blink have been updated to call
SkImageFilter::CreateMatrixFilter() instead.

BUG=skia:3568

Review URL: https://codereview.chromium.org/1013753013
2015-03-24 07:51:30 -07:00
caryclark
ccec0f958f pathops version two
R=reed@google.com

marked 'no commit' to attempt to get trybots to run

TBR=reed@google.com

Review URL: https://codereview.chromium.org/1002693002
2015-03-24 07:28:17 -07:00
senorblanco
8c874eee94 Move SkMatrixImageFilter into core, and add a factory fn for it.
BUG=skia:

Review URL: https://codereview.chromium.org/1011273003
2015-03-20 06:38:17 -07:00
mtklein
a0d7b7bf62 delete dead code
BUG=skia:

Review URL: https://codereview.chromium.org/1003493002
2015-03-11 12:17:00 -07:00
kkinnunen
73953e7d00 Make SkNewImageFromBitmap take pixel ref origin into account
Make SkNewImageFromBitmap take pixel ref origin into account.

BUG=skia:3388

Review URL: https://codereview.chromium.org/951483002
2015-02-23 22:12:12 -08:00
mtklein
2aa1f7e679 Port GrGLCaps over to use SkTHash.
I've written some new hashtable interfaces that should be easier to use,
and I've been trying to roll them out bit by bit, hopefully replacing
SkTDynamicHash, SkTMultiMap, SkTHashCache, etc.

This turns the cache in GrGLCaps::readPixelsSupported() into an SkTHashMap,
mapping the format key to a bool.  Functionally, it's the same.

BUG=skia:

Review URL: https://codereview.chromium.org/948473002
2015-02-20 12:35:32 -08:00
reed
9e447c08de remove unneeded preroll
BUG=skia:
TBR=robertphilips

Review URL: https://codereview.chromium.org/927443006
2015-02-15 11:08:40 -08:00
bsalomon
3555bd88a6 Add a templated priority queue class.
Review URL: https://codereview.chromium.org/914003004
2015-02-13 11:08:21 -08:00
reed
3cb3840c9a Rename SkCanvasDrawable to SkDrawable, and make public
(patchset #2 id:20001 of https://codereview.chromium.org/903993002/)"

This reverts commit c4e8772492.

BUG=skia:
TBR=
NOTREECHECKS=True

Review URL: https://codereview.chromium.org/898343004
2015-02-06 08:36:15 -08:00
reed
c4e8772492 Revert of rename SkCanvasDrawable to SkDrawable, and make public (patchset #2 id:20001 of https://codereview.chromium.org/903993002/)
Reason for revert:
bug in gyp

Original issue's description:
> rename SkCanvasDrawable to SkDrawable, and make public
>
> BUG=skia:
> NOTRY=True
> ... winbuilder flake
>
> Committed: https://skia.googlesource.com/skia/+/4ae9eb7463cf2160723407359608f221c0d5e2a6

TBR=robertphillips@google.com,djsollen@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/882853006
2015-02-06 08:20:07 -08:00
reed
4ae9eb7463 rename SkCanvasDrawable to SkDrawable, and make public
BUG=skia:
NOTRY=True
... winbuilder flake

Review URL: https://codereview.chromium.org/903993002
2015-02-06 08:02:57 -08:00
reed
96a857ef5a initial preroll api
BUG=skia:

Review URL: https://codereview.chromium.org/855473002
2015-01-25 10:33:58 -08:00
bungeman
e1a828c555 Move SkFontMgr and SkFontStyle impls to own cpp.
SkFontMgr and SkFontStyle implementations are currently burried in the
old SkFontHost.cpp file. Move these implementations to their own file
so that the implementations are easier to find, and to make clearer that
SkFontHost.cpp needs to be removed.

Review URL: https://codereview.chromium.org/799533004
2015-01-20 11:15:37 -08:00
sugoi
692135f968 YUV planes cache
- Added new classes to contain YUV planes of memory, along with the associated data.
- Used these classes in load_yuv_texture() to enable YUV planes caching
- Added a unit test for the new cache

BUG=450021

Review URL: https://codereview.chromium.org/851273003
2015-01-19 10:10:27 -08:00
reed
f5872d2f41 add stroke params to c api
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/848553002
2015-01-10 17:59:31 -08:00
mtklein
703dd2ed18 Remove SkTileGrid (except for TileGridInfo).
TBR=reed@google.com

BUG=skia:3085

Review URL: https://codereview.chromium.org/845623002
2015-01-09 06:41:48 -08:00
reed
5f2ee72f97 add SkGeometry.h to core.gypi
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/820683005
2015-01-05 06:47:44 -08:00
reed
b9bb38cd18 make SkColorShader private, use public factory
BUG=skia:

Need https://codereview.chromium.org/785823002/ to land first

Review URL: https://codereview.chromium.org/788533002
2014-12-08 06:06:36 -08:00
jvanverth
936799204b Add float-to-half (binary16) conversion functions.
Based on code by Fabian Giesen at
https://fgiesen.wordpress.com/2012/03/28/half-to-float-done-quic/.

These will be needed for creating binary16 textures from floating point data.

BUG=skia:3103

Review URL: https://codereview.chromium.org/760753003
2014-11-26 13:15:59 -08:00
mtklein
f98862c39b SkRecord: outline methods that are not called O(N) times.
Looks like a noop-to-minor-win:
                tabl_sahadan.skp	94.9us -> 98.6us	1x
         desk_jsfiddlebigcar.skp	38.9us -> 39.7us	1x
            desk_silkfinance.skp	  78us -> 78.9us	1x
     desk_jsfiddlehumperclip.skp	43.8us -> 44.3us	1x
                 desk_sfgate.skp	 547us ->  548us	1x
                  tabl_gmail.skp	19.9us -> 19.8us	1x
           tabl_worldjournal.skp	 230us ->  229us	1x
          desk_css3gradients.skp	 248us ->  247us	1x
                    tabl_cnn.skp	 205us ->  203us	0.99x
               desk_linkedin.skp	 342us ->  340us	0.99x
                desk_wowwiki.skp	1.63ms -> 1.62ms	0.99x
                   tabl_cnet.skp	 142us ->  141us	0.99x
            desk_pokemonwiki.skp	9.76ms -> 9.67ms	0.99x
                   desk_espn.skp	 267us ->  264us	0.99x
                desk_youtube.skp	 576us ->  570us	0.99x
                 tabl_pravda.skp	 238us ->  235us	0.99x
                  tabl_ukwsj.skp	 566us ->  560us	0.99x
               tabl_engadget.skp	 630us ->  622us	0.99x
desk_googlespreadsheetdashed.skp	1.66ms -> 1.64ms	0.99x
             desk_mobilenews.skp	 486us ->  480us	0.99x
         tabl_googlecalendar.skp	 211us ->  208us	0.99x
               desk_samoasvg.skp	 740us ->  730us	0.99x
                    desk_gws.skp	 187us ->  184us	0.99x
                   desk_ebay.skp	 234us ->  230us	0.99x
                 desk_mapsvg.skp	 1.6ms -> 1.58ms	0.98x
                tabl_nytimes.skp	 130us ->  128us	0.98x
             tabl_googleblog.skp	 305us ->  300us	0.98x
               desk_fontwipe.skp	40.3us -> 39.6us	0.98x
               desk_tigersvg.skp	 189us ->  186us	0.98x
          tabl_androidpolice.skp	 662us ->  650us	0.98x
              desk_wordpress.skp	 824us ->  809us	0.98x
                    tabl_mlb.skp	 338us ->  331us	0.98x
      tabl_culturalsolutions.skp	 390us ->  382us	0.98x
                  desk_baidu.skp	 213us ->  208us	0.98x
                  tabl_gspro.skp	72.9us -> 71.1us	0.97x
                 tabl_nofolo.skp	  74us -> 71.9us	0.97x
           desk_yahooanswers.skp	 173us ->  168us	0.97x
               tabl_frantzen.skp	57.3us -> 55.6us	0.97x
             desk_chalkboard.skp	 891us ->  865us	0.97x
              desk_pinterest.skp	 154us ->  149us	0.97x
                desk_blogger.skp	 537us ->  519us	0.97x
                   tabl_hsfi.skp	10.1us -> 9.69us	0.96x
            desk_gmailthread.skp	 333us ->  318us	0.96x
                   tabl_digg.skp	 926us ->  883us	0.95x
      desk_googlespreadsheet.skp	 586us ->  558us	0.95x
             desk_forecastio.skp	 101us -> 95.7us	0.95x
                desk_booking.skp	 1.1ms -> 1.04ms	0.95x
             tabl_deviantart.skp	 144us ->  136us	0.95x
               desk_facebook.skp	 584us ->  553us	0.95x
                desk_weather.skp	 289us ->  272us	0.94x
             desk_googlehome.skp	61.1us -> 57.5us	0.94x
             desk_googleplus.skp	 914us ->  849us	0.93x
                desk_twitter.skp	 499us ->  463us	0.93x

BUG=skia:

Review URL: https://codereview.chromium.org/756783002
2014-11-24 14:45:47 -08:00
mtklein
8113dd1369 SkVarAlloc
Like SkChunkAlloc, but
  - does its allocation with better sympathy for malloc granularity;
  - the fast path inlines entirely;
  - smaller per-block overhead;
  - smaller per-SkVarAlloc overhead;
  - growth parameters are a little more tunable.

Its main downside is less flexibility; it supports fewer methods than SkChunkAlloc.

These current parameters bring the first allocation down from 4K to 1K,
without affecting recording time on my desktop.  skiaperf.com will tell the
whole story.

BUG=skia:

Review URL: https://codereview.chromium.org/674263002
2014-11-12 15:15:28 -08:00
mtklein
71a2363707 More cleanup: streamline paths and bitmaps.
SkBitmapHeap is still used---now exclusively---by pipe.

BUG=skia:

Review URL: https://codereview.chromium.org/715413002
2014-11-12 10:24:55 -08:00
robertphillips
8236591547 Rename GrAccelData to SkLayerInfo and move it to src/core
Review URL: https://codereview.chromium.org/719133002
2014-11-12 09:32:34 -08:00
reed
c536942dc9 initial checkin for experimenting
BUG=skia:

Review URL: https://codereview.chromium.org/696063005
2014-11-11 04:56:05 -08:00
mtklein
ecf987559b Turn SkTaskGroups back on.
Revert "Disable SkTaskGroup in SkMultiPictureDraw temporarily."
Revert "Revert harder, removing SkTaskGroup.cpp from core temporarily."

NOTREECHECKS=true

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/2100c5ed7a5e5470a04e7af7309d8bd3fc4249f7

Review URL: https://codereview.chromium.org/687263007
2014-11-03 17:41:08 -08:00
mtklein
e9f7fbfaee Revert of Turn SkTaskGroups back on. (patchset #1 id:1 of https://codereview.chromium.org/687263007/)
Reason for revert:
precautionary revert.  may have caused WinXP crashes on Chrome tree: https://code.google.com/p/chromium/issues/detail?id=429207

Original issue's description:
> Turn SkTaskGroups back on.
>
> Revert "Disable SkTaskGroup in SkMultiPictureDraw temporarily."
> Revert "Revert harder, removing SkTaskGroup.cpp from core temporarily."
>
> NOTREECHECKS=true
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/2100c5ed7a5e5470a04e7af7309d8bd3fc4249f7

TBR=reed@google.com,mtklein@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/693993002
2014-10-31 11:30:22 -07:00
mtklein
2100c5ed7a Turn SkTaskGroups back on.
Revert "Disable SkTaskGroup in SkMultiPictureDraw temporarily."
Revert "Revert harder, removing SkTaskGroup.cpp from core temporarily."

NOTREECHECKS=true

BUG=skia:

Review URL: https://codereview.chromium.org/687263007
2014-10-31 06:38:25 -07:00