Commit Graph

2877 Commits

Author SHA1 Message Date
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
Mike Klein
478c9e4851 Revert "Move headers used by headers in include/ to include/private."
This reverts commit 928e16565f.

BUG=skia:

Review URL: https://codereview.chromium.org/1213093004.
2015-07-01 16:35:59 -04:00
mtklein
928e16565f Move headers used by headers in include/ to include/private.
Some of this is transitive, like SkRecords.h used by SkMiniRecorder.h
used by (public) SkPictureRecorder.h.

BUG=skia:

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

Review URL: https://codereview.chromium.org/1217293004
2015-07-01 11:55:42 -07:00
bsalomon
ebaf6a69bf Revert of Fix SkTileImageFilter clipping/cropRect interaction issue (patchset #2 id:30001 of https://codereview.chromium.org/1210053003/)
Reason for revert:
Perf regression: https://code.google.com/p/chromium/issues/detail?id=505564

Original issue's description:
> Fix SkTileImageFilter clipping/cropRect interaction issue
>
> BUG=499499
>
> Committed: https://skia.googlesource.com/skia/+/157bcd0840b578060dbc3365daafffc6837da391

TBR=reed@google.com,senorblanco@google.com,senorblanco@chromium.org,robertphillips@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=499499

Review URL: https://codereview.chromium.org/1219193002
2015-07-01 11:02:50 -07:00
jvanverth
4417c7f8bb Revert "Move headers used by headers in include/ to include/private."
This reverts commit a89f55198b.

Reason: breaking the roll.

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

Review URL: https://codereview.chromium.org/1216033008
2015-07-01 09:45:46 -07:00
mtklein
a89f55198b Move headers used by headers in include/ to include/private.
Some of this is transitive, like SkRecords.h used by SkMiniRecorder.h
used by (public) SkPictureRecorder.h.

BUG=skia:

Review URL: https://codereview.chromium.org/1217293004
2015-07-01 08:41:15 -07:00
mtklein
d711d115d2 Thread through a flag to force SkPicture::playback() when recording subpictures.
This makes nanobench picture recording benchmarks somewhat useful again,
as opposed to all taking about 5us to run no matter the content.

ATTN Sheriff: this will probably trigger perf.skia.org alerts.

BUG=skia:

Review URL: https://codereview.chromium.org/1219873002
2015-07-01 07:04:37 -07:00
bsalomon
d3e259a16c Add SkSurface factory for wrapping an FBO in SkSurface
Review URL: https://codereview.chromium.org/1221853003
2015-06-30 12:04:40 -07:00
bsalomon
c49e8682ab Rename flushForExternalRead->flushForExternalIO and always call in SkSurface::getTextureHandle
Review URL: https://codereview.chromium.org/1216243003
2015-06-30 11:37:35 -07:00
reed
fa5e68e4b4 add getTextureHandle to SkSurface
BUG=485243

Review URL: https://codereview.chromium.org/1210303003
2015-06-29 07:37:01 -07:00
robertphillips
d24955ad35 Make SkPaint::glyphsToUnichars use explicit SkSurfaceProps
BUG=skia:3984,skia:3934

Review URL: https://codereview.chromium.org/1211413003
2015-06-26 12:17:59 -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
robertphillips
157bcd0840 Fix SkTileImageFilter clipping/cropRect interaction issue
BUG=499499

Review URL: https://codereview.chromium.org/1210053003
2015-06-26 08:07:39 -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
reed
71c3c760a8 add SkCanvas::drawAtlas
BUG=skia:

Review URL: https://codereview.chromium.org/1181913003
2015-06-24 10:29:18 -07:00
reed
af4b233d46 remove SK_SUPPORT_LEGACY_FILTERLEVEL_ENUM
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1205803002
2015-06-23 21:47:30 -07:00
reed
56b73fc63f remove (legacy) NewFromData
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1199413003
2015-06-23 21:31:08 -07:00
reed
e582a5a891 remove SK_SUPPORT_LEGACY_OPTIONLESS_GET_PIXELS
BUG=skia:

Review URL: https://codereview.chromium.org/1201233002
2015-06-23 12:10:27 -07:00
reed
b3fe1b87e0 more tests for offsetimagefilter
BUG=skia:

Review URL: https://codereview.chromium.org/1199933011
2015-06-23 08:29:20 -07:00
reed
871872f3f2 change old picture serialization to really handle images
BUG=skia:3965

Review URL: https://codereview.chromium.org/1199473002
2015-06-22 12:48:26 -07:00
robertphillips
efbffedd68 Clean up usage of SkSurfaceProps
This CL continues cleaning up Skia's usage of SkSurfaceProps. It:

  Removes the duplicate SkSurfaceProps object from SkImageFilter::Proxy.

  Removes a dispreferred ctor from SkCanvas

  Removes the initForRootLayer entry point from SkDevice (since the root device and the canvas should always have the same pixel geometry now).

Review URL: https://codereview.chromium.org/1201983006
2015-06-22 12:06:08 -07:00
robertphillips
9a53fd7c41 Begin kLegacyFontHost_InitType cleanup
This CL starts the process of pushing kLegacyFontHost_InitType-type SkSurfaceProps up the call stack and out of Skia. It:

 Gets rid of the default SkBaseDevice ctor. This means everyone has to always hand an explicit SkSurfaceProps to it.

 It makes public the SkBitmapDevice creation methods that require SkSurfaceProps.

 Removes (in Skia's code base) all SkBitmapDevice ctor calls w/o SkSurfaceProps.

 Makes the "recording" canvases (e.g., pdf, svg, xps) explicitly not use kLegacyFontHost_InitType.

 Replicates the creating canvas/device's flags on saveLayer devices

BUG=skia:3934

Review URL: https://codereview.chromium.org/1204433002
2015-06-22 09:46:59 -07:00
jvanverth
4854d13c27 Remove distance field flag from SkPaint
Review URL: https://codereview.chromium.org/1192413005
2015-06-22 06:46:56 -07:00
robertphillips
7b05ff11eb Rename all things "leaky" in SkDevice
Review URL: https://codereview.chromium.org/1198603002
2015-06-19 14:14:55 -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
robertphillips
8b1fa6dd8d Fix precision error in https://codereview.chromium.org/1188433011/
TBR=reed@google.com

Review URL: https://codereview.chromium.org/1192853002
2015-06-19 06:40:02 -07:00
robertphillips
20eee3f047 Added check for ill-conditioned invert
sk_inv_determinant has a guard that the determinant can't get too big so this CL only checks if the determinant gets too small.

BUG=492263

Review URL: https://codereview.chromium.org/1188433011
2015-06-19 05:14:26 -07:00
reed
ce777c9ea3 remove deprecated NewRasterPMColor
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1192353002
2015-06-19 03:42:56 -07:00
reed
7ab04d949b remove dead guarded code for legacy SkData proc
BUG=skia:

Review URL: https://codereview.chromium.org/1173173007
2015-06-18 13:42:03 -07:00
reed
de49988bc2 add callbacks to Images that wrap client-provided content
BUG=skia:

Review URL: https://codereview.chromium.org/1169553003
2015-06-18 13:41:40 -07:00
bsalomon
6dc6f5f4a1 Add support for creating texture backed images where Skia will delete the texture.
Review URL: https://codereview.chromium.org/1187523005
2015-06-18 09:12:17 -07:00
mtklein
00b621cfc0 Add sk_parallel_for()
This should be a drop-in replacement for most for-loops to make them run in parallel:
   for (int i = 0; i < N; i++) { code... }
   ~~~>
   sk_parallel_for(N, [&](int i) { code... });

This is just syntax sugar over SkTaskGroup to make this use case really easy to write.
There's no more overhead that we weren't already forced to add using an interface like batch(),
and no extra heap allocations.

I've replaced 3 uses of SkTaskGroup with sk_parallel_for:
  1) My unit tests for SkOnce.
  2) Cary's path fuzzer.
  3) SkMultiPictureDraw.
Performance should be the same.  Please compare left and right for readability. :)

BUG=skia:

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

Review URL: https://codereview.chromium.org/1184373003
2015-06-17 15:26:15 -07:00
reed
6b7f34e34c simplify release-proc for SkData, removing unneeded size param
request https://codereview.chromium.org/1184953005 to land first

BUG=skia:

Review URL: https://codereview.chromium.org/1193553002
2015-06-17 09:58:25 -07:00
mtklein
942e99b9c4 Modernize atomics in SkTaskGroup's threadpool.
- Use SkAtomic<int32_t> for pending work count so we're statically
      forced to operate on it with atomic methods.
    - Replacing old methods like sk_atomic_inc/dec gives us finer control
      over which barriers we need for each operation.

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

BUG=skia:

Review URL: https://codereview.chromium.org/1193493003
2015-06-17 07:53:22 -07:00
hendrikw
446ee67fda skia: Add runtime option to disable picture IO security precautions
Replaced the compile time file IO security setting with a runtime setting.

Unfortunately the setting is global.

Review URL: https://codereview.chromium.org/1183853003
2015-06-16 09:28:37 -07:00
fmalita
109a23d64f Remove the SkCanvas comment API
No longer used in Chromium/Blink.

R=reed@google.com,robertphillips@google.com,mtklein@google.com

Review URL: https://codereview.chromium.org/1153593003
2015-06-15 13:15:31 -07:00
junov
da5469d7bc Invalidate GrTexture mipmap on content change notification
This fix is necessary to correctly propagate invalidations that
are external to skia. For example, when drawing video or WebGL
into a 2D canvas in Chrome, with mipmaps enabled.

BUG=crbug.com/498356
TEST=GrTextureMipMapInvalidationTest

Review URL: https://codereview.chromium.org/1177843007
2015-06-15 09:48:15 -07:00
fmalita
fd674ddbd6 Remove SkDrawPictureCallback
No longer used in Chromium.

R=reed@google.com

[mtklein mischief]
No one objects to removing dead API...
TBR=reed@google.com

Review URL: https://codereview.chromium.org/1151633003
2015-06-15 06:56:22 -07:00
reed
8f086023bf fix deserialization after FirstDirection change to paths
BUG=skia:

Review URL: https://codereview.chromium.org/1185453003
2015-06-11 14:22:19 -07:00
reed
026beb52a2 SkPath::Direction serves two masters:
- input param to addFoo (e.g. addRect), where only CW or CCW are valid)
- output param from computing functions, that sometimes return kUnknown

This CL's intent is to split these into distinct enums/features:
- Direction (public) loses kUnknown, and is only used for input
- FirstDirection (private) is used for computing the first direction we see when analyzing a contour

BUG=skia:

Review URL: https://codereview.chromium.org/1176953002
2015-06-10 14:23:15 -07:00
bsalomon
55812362f1 Towards removing getTexture() on SkImage
Review URL: https://codereview.chromium.org/1166993002
2015-06-10 08:49:28 -07:00
mtklein
519580553a Use SkMScalar as float by default to match Chromium.
Tweak some test values to pass with floats.

As expected, this regresses matrix44_setconcat_general by about 2x.

BUG=skia:

Review URL: https://codereview.chromium.org/1169813006
2015-06-09 15:06:22 -07:00
reed
41e010cb90 Revert[2] SkDraw and all Blitters to use pixmap instead of bitmapi
This reverts commit b3f0ec9f99.

BUG=skia:

Review URL: https://codereview.chromium.org/1168303006
2015-06-09 12:16:53 -07:00
mtklein
1831f990c3 A bunch of little SkMScalar-as-float build fixes.
Landing this before http://crrev.com/1169813006 so the test changes needed
there are clearer.  This just lets things build with floats, and is a no-op for
doubles.

No public API changes we didn't intend to already have...
TBR=reed@google.com

BUG=skia:

Review URL: https://codereview.chromium.org/1173673003
2015-06-09 11:47:01 -07:00
reed
2c55d7b7f3 remove subclassing from ImageFilter::Proxy
BUG=skia:

Review URL: https://codereview.chromium.org/1172693002
2015-06-09 08:18:40 -07:00
reed
ded9a6f794 remove Proxy entrypoints for canHandleFilter
BUG=skia:

Review URL: https://codereview.chromium.org/1169923002
2015-06-09 06:38:49 -07:00
reed
b3f0ec9f99 Revert of change SkDraw and all Blitters to use pixmap instead of bitmap (patchset #6 id:100001 of https://codereview.chromium.org/1148793007/)
Reason for revert:
speculative revert to try to unblock DEPS roll

Original issue's description:
> change SkDraw and all Blitters to use pixmap instead of bitmap
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/c31af44336f5eb4a50e83e76e51962d46c3ed458

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

Review URL: https://codereview.chromium.org/1164373003
2015-06-08 19:58:07 -07:00
reed
c31af44336 change SkDraw and all Blitters to use pixmap instead of bitmap
BUG=skia:

Review URL: https://codereview.chromium.org/1148793007
2015-06-08 10:47:13 -07:00
reed
7aefe03211 Revert "Revert of move erase into SkPixmap (patchset #1 id:1 of https://codereview.chromium.org/1161033005/)"
This reverts commit cca9b3ac90.

BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1153473012
2015-06-08 10:22:22 -07:00