Commit Graph

2906 Commits

Author SHA1 Message Date
scroggo
91110195a2 Revert of guard to remove DrawBitmapRectFlags (patchset #1 id:1 of https://codereview.chromium.org/1235393003/)
Reason for revert:
breaking android framework build

Original issue's description:
> guard to remove DrawBitmapRectFlags
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/6fb0b6779e40ce05c20cf279f0ecff31fa3cd60d

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

Review URL: https://codereview.chromium.org/1230823007
2015-07-17 05:57:34 -07:00
senorblanco
ed7cf27322 Now that the SkImageFilter::CropRect crop edges refer to
width & height, name them appropriately.

BUG=240827

Review URL: https://codereview.chromium.org/1234873005
2015-07-16 15:19:11 -07:00
reed
189186337e refactor code to apply the croprect
BUG=skia:

Review URL: https://codereview.chromium.org/1218993002
2015-07-16 13:17:13 -07:00
reed
c83a29759a have canvas send discard instead of retain if the draw would overwrite everything
Motivation:
- perf win for clients that overwrite the surface after a snapshot.
- may allow us to eliminate SkDeferredCanvas, as this was its primary advantage.

BUG=skia:

Review URL: https://codereview.chromium.org/1236023004
2015-07-16 07:40:45 -07:00
mtklein
767d273ea0 Replace buggy_blend_modes GM with an exhaustive test.
The new test is disabled by default, as it's quite slow.
We can run it if we suspect problems by passing -x to DM.

This test would have been failing before the bug fix, and now is passing.

Assuming the Priv on the end means it's not considered public API...
TBR=reed@google.com

BUG=skia:4052

Review URL: https://codereview.chromium.org/1228333003
2015-07-16 07:01:40 -07:00
reed
6fb0b6779e guard to remove DrawBitmapRectFlags
BUG=skia:

Review URL: https://codereview.chromium.org/1235393003
2015-07-16 06:10:02 -07:00
caryclark
e8c5666e03 Very tiny paths are subsumed by the Convexicator
and are treated as convex when they are not.

Allow the SkPath::Iter to leave degenerate path
segments unmolested by passing an additional exact
bool to next().

Treat any non-zero length as significant in addPt().

R=reed@google.com,robertphillips@google.com
BUG=493450

Review URL: https://codereview.chromium.org/1228383002
2015-07-14 11:19:26 -07:00
reed
a5517e2b19 add src-rect-constraint to drawImageRect
Follow-on work
- unify around SrcRectConstraint (i.e. drawBitmapRect)
- remove silly drawBitmapRectToRect alias
- clean-up (possibly remove) alias problems around drawBitmapRect + IRect parameter

BUG=skia:

Review URL: https://codereview.chromium.org/1228083004
2015-07-14 10:54:12 -07:00
dongseong.hwang
5ce8b438da Fix componene debug build failure in chromium
The error log is as follows:
../../third_party/skia/include/core/SkSpinlock.h:24: error: undefined reference to 'SkPODSpinlock::contendedAcquire()'
collect2: error: ld returned 1 exit status

[mtklein added below here]
Despite the presence in include/ and the added SK_API, this file is not part of Skia's public API... it's just used by files which are.
TBR=reed@google.com

Review URL: https://codereview.chromium.org/1229003004
2015-07-10 08:32:23 -07:00
reed
d7c05bfd7c remove getter for imagegenerator factory, update test
BUG=skia:

Review URL: https://codereview.chromium.org/1223413002
2015-07-09 14:08:49 -07:00
herb
ac09471140 Create a template AutoTAcquire, and specialize an SkMutex version.
Add copyright notice.

BUG=skia:

Review URL: https://codereview.chromium.org/1230583008
2015-07-09 13:44:32 -07:00
reed
1c84634454 add runtime option to provide data->imagegenerator factory
BUG=skia:

Review URL: https://codereview.chromium.org/1229933003
2015-07-09 11:47:36 -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
scroggo
5315fd4761 Remove SkImageGenerator pieces only for SkCodec.
Follow up to the split between SkImageGenerator and SkCodec. Now that
SkCodec does not inherit from SkImageGenerator, SkImageGenerator no
longer needs Options or Result, which were added for SkCodec. Remove
them, but keep them behind a flag, since Chromium has its own
subclasses of SkImageGenerator which assume the old signature for
onGetPixels.

Review URL: https://codereview.chromium.org/1226023003
2015-07-09 09:08:00 -07:00
joshualitt
9cc1775e72 rename GrShaderDataManager -> GrProcessorDataManager
BUG=skia:

Review URL: https://codereview.chromium.org/1228683002
2015-07-09 06:28:14 -07:00
joshualitt
81793410a8 add ability to get FBO ID to Surface
BUG=skia:

Review URL: https://codereview.chromium.org/1220733007
2015-07-08 12:54:04 -07:00
reed
3c06511e91 Add image->bitmap
BUG=skia:

patch from issue 1212163012 at patchset 1 (http://crrev.com/1212163012#ps1)

Review URL: https://codereview.chromium.org/1208993017
2015-07-08 12:46:23 -07:00
joshualitt
b2456053c7 more threading of GrShaderDataManager
TBR=bsalomon@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/1215643006
2015-07-08 09:36:59 -07:00
joshualitt
85ff25e8d9 Thread GrShaderDataManager through Image filters
TBR=bsalomon@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/1229613002
2015-07-08 09:10:03 -07:00
joshualitt
2cff176fa2 More threading of GrShaderDataManager
TBR=bsalomon@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/1213613016
2015-07-08 07:58:18 -07:00
joshualitt
8ca93e7c73 Initial CL to create dummy GrShaderDataManager and thread it through
TBR=bsalomon@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/1225673007
2015-07-08 06:51:43 -07:00
schenney
eeff8bb8ff Allow reset of the SkPictureRecorder cull rect and other parameters during endRecording.
For some users of SkPictureRecorder, the cull rect is more efficiently
determined while drawing is in progress, rather than when recording starts.
The existing API requires the cull rect at start time, even though the
information is not used for any culling purpose until the end of recording.

This patch provides a means to reset the cull rect when recording ends,
allowing users to update the rect based on information learned during
drawing and for the new rect to be used as the culling bound. A valid
bound is still required on the beginRecording call because
it sizes the underlying canvas and sets the aspect ratio for any bounding
box hierarchy. The bounding box factory can also be specified and parameters
that control SkPicture creation.

R=mtklein, reed1
BUG=skia:3919

Review URL: https://codereview.chromium.org/1178673007
2015-07-07 14:27:10 -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
reed
a8db72864a add matrix options to drawDrawable
BUG=skia:

Review URL: https://codereview.chromium.org/1224783002
2015-07-07 10:22:31 -07:00
reed
5617900063 add SkImage::NewFromBitmap
BUG=skia:

Review URL: https://codereview.chromium.org/1217053003
2015-07-07 06:11:20 -07:00
robertphillips
07abbbec4b Fix up SkMatrix::isFinite call
Review URL: https://codereview.chromium.org/1228473004
2015-07-06 12:15:34 -07:00
robertphillips
d312dcade1 Revert of Revert of Revert of Fix SkTileImageFilter clipping/cropRect interaction issue (patchset #1 id:1 of https://codereview.chromium.org/1207353004/)
Reason for revert:
Still want to disable due to pref regression

Original issue's description:
> Revert of Revert of Fix SkTileImageFilter clipping/cropRect interaction issue (patchset #1 id:1 of https://codereview.chromium.org/1219193002/)
>
> Reason for revert:
> Blocking the roll
>
> Original issue's description:
> > 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
> >
> > Committed: https://skia.googlesource.com/skia/+/ebaf6a69bf604c85185e23aca3fb93308e747ff5
>
> TBR=reed@google.com,senorblanco@google.com,senorblanco@chromium.org,robertphillips@google.com,reed@chromium.org,bsalomon@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=499499
>
> Committed: https://skia.googlesource.com/skia/+/835510085062f055c04d8ea46d82831cfbe51793

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

Review URL: https://codereview.chromium.org/1217303004
2015-07-06 07:59:09 -07:00
reed
759373a9fe add colortable param to newrastercopy
BUG=skia:
TBR=
NOTREECHECKS=True

Review URL: https://codereview.chromium.org/1222683004
2015-07-03 21:01:10 -07:00
jvanverth
8355100850 Revert of Revert of Fix SkTileImageFilter clipping/cropRect interaction issue (patchset #1 id:1 of https://codereview.chromium.org/1219193002/)
Reason for revert:
Blocking the roll

Original issue's description:
> 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
>
> Committed: https://skia.googlesource.com/skia/+/ebaf6a69bf604c85185e23aca3fb93308e747ff5

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

Review URL: https://codereview.chromium.org/1207353004
2015-07-03 05:48:53 -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
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