Commit Graph

2343 Commits

Author SHA1 Message Date
commit-bot@chromium.org
97f8167622 We don't flatten or unflatten SkPaintOptionsAndroid. Reproduce and fix.
BUG=skia:1625
R=djsollen@google.com, reed@google.com

Author: mtklein@google.com

Review URL: https://chromiumcodereview.appspot.com/24075010

git-svn-id: http://skia.googlecode.com/svn/trunk@11472 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-26 15:16:12 +00:00
commit-bot@chromium.org
3fddf0eed6 First pass at font cache refactor: Create an atlas manager per texture
This changes the AtlasMgr from a singleton class to one that is
created per-texture. This is the first step in allowing us to create
Atlases of other types (e.g., combine small icons into one big texture).

R=bsalomon@google.com

Author: jvanverth@google.com

Review URL: https://chromiumcodereview.appspot.com/24608002

git-svn-id: http://skia.googlecode.com/svn/trunk@11468 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-26 12:57:19 +00:00
robertphillips@google.com
ca0c8389e2 Move bound and isFinite into pathref
https://codereview.chromium.org/24350006/



git-svn-id: http://skia.googlecode.com/svn/trunk@11467 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-26 12:18:23 +00:00
scroggo@google.com
b5571b3324 Change SkImageDecoders to take an SkStreamRewindable.
Only affects factories, static functions that will use the factories,
and subset decoding, which all require rewinding. The decoders
themselves continue to take an SkStream. This is merely documentation
stating which functions will possibly rewind the passed in SkStream.

This is part of the general change to coordinate SkStreams with
Android's streams, which don't necessarily support rewinding in all
cases.

Update callers to use SkStreamRewindable.

BUG=skia:1572
R=bungeman@google.com, reed@google.com

Review URL: https://codereview.chromium.org/23477009

git-svn-id: http://skia.googlecode.com/svn/trunk@11460 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-25 21:34:24 +00:00
commit-bot@chromium.org
4382330a15 Replace GR_*_BUILD by their SK_BUILD_FOR_* equivalents.
BUG=None
TEST=None, no functional changes.
R=bsalomon@google.com, robertphillips@google.com

Author: tfarina@chromium.org

Review URL: https://chromiumcodereview.appspot.com/24253009

git-svn-id: http://skia.googlecode.com/svn/trunk@11457 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-25 20:57:51 +00:00
robertphillips@google.com
485e1c0128 Patch SkImage.h so Chrome will compile
git-svn-id: http://skia.googlecode.com/svn/trunk@11429 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-22 21:57:03 +00:00
robertphillips@google.com
b1b6a46740 Remove SK_ENABLE_LEGACY_API_ALIASING from SkImage.h
git-svn-id: http://skia.googlecode.com/svn/trunk@11428 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-22 21:01:28 +00:00
skia.committer@gmail.com
572a865846 Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@11426 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-21 07:01:53 +00:00
reed@google.com
94248f85e5 add trailing quote on #error
git-svn-id: http://skia.googlecode.com/svn/trunk@11422 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-20 19:47:32 +00:00
reed@google.com
d28ba8010c promote SkImage::AlphaType to SkAlphaType
BUG=
R=bsalomon@google.com

Review URL: https://codereview.chromium.org/24130009

git-svn-id: http://skia.googlecode.com/svn/trunk@11421 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-20 19:33:52 +00:00
mtklein@google.com
519f9677a4 Add sk_calloc. Remove SkMemory_stdlib, which seems unused.
I'm seeing basically no difference between malloc + bzero and calloc on my desktop, but on a Galaxy Nexus calloc is never slower, and significantly faster once the allocation size becomes large, both for allocation and for _reading_.

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

Review URL: https://codereview.chromium.org/24251008

git-svn-id: http://skia.googlecode.com/svn/trunk@11414 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-20 14:31:45 +00:00
commit-bot@chromium.org
22d69f9973 I'm investigating how to make the IPC transfer a bit more secure on the
skia side by adding some safety checks. This cl is about brainstorming
and proposing possible solutions for type checking at different stages.

BUG=
R=senorblanco@google.com, sugoi@google.com, scroggo@google.com, reed@android.com, senorblanco@chromium.org, mtklein@google.com, reed@google.com

Author: sugoi@chromium.org

Review URL: https://chromiumcodereview.appspot.com/22799007

git-svn-id: http://skia.googlecode.com/svn/trunk@11395 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-19 18:40:49 +00:00
djsollen@google.com
9902c38f48 Add new entry point that supports fallback font selection based on language.
BUG= chromium:287995
R=reed@google.com, wangxianzhu@chromium.org

Review URL: https://codereview.chromium.org/23819067

git-svn-id: http://skia.googlecode.com/svn/trunk@11394 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-19 18:22:30 +00:00
senorblanco@chromium.org
962c8864e4 Implement crop rect support for the merge image filter.
Note: this will require rebaselining of the imagefilterscropped and testimagefilters GMs.

R=reed@google.com

Review URL: https://codereview.chromium.org/23600047

git-svn-id: http://skia.googlecode.com/svn/trunk@11387 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-19 17:26:47 +00:00
djsollen@google.com
0936c01a39 Remove 2 unused defines USE_CHROMIUM_SKIA and SK_BUILD_FOR_CHROMIUM
R=robertphillips@google.com

Review URL: https://codereview.chromium.org/23618057

git-svn-id: http://skia.googlecode.com/svn/trunk@11381 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-19 14:29:12 +00:00
commit-bot@chromium.org
e2419cc5ed Add getFloat/setFloat funcs to SkMatrix44
These match the existing getDouble/setDouble functions.

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

Author: enne@chromium.org

Review URL: https://chromiumcodereview.appspot.com/23757031

git-svn-id: http://skia.googlecode.com/svn/trunk@11355 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-18 18:52:09 +00:00
commit-bot@chromium.org
a0b40280a4 Replace uses of GrNoncopyable by SkNoncopyable.
BUG=None
TEST=None, no functional changes.
R=bsalomon@google.com, robertphillips@google.com

Author: tfarina@chromium.org

Review URL: https://chromiumcodereview.appspot.com/23483042

git-svn-id: http://skia.googlecode.com/svn/trunk@11341 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-18 13:00:55 +00:00
skia.committer@gmail.com
2291e72b99 Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@11336 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-18 07:01:33 +00:00
reed@google.com
636d87a3f4 update devicelooper to skip internal tiles that are empty, and unittests
BUG=

Review URL: https://codereview.chromium.org/23463040

git-svn-id: http://skia.googlecode.com/svn/trunk@11331 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-17 20:03:43 +00:00
senorblanco@chromium.org
8fcad98791 Implement crop rect for the dilate and erode (morphology) filters. This provoked some cleanup on the GPU side: apply_morphology() now deals with SkBitmaps, rather than GrTextures. There's still a clear opportunity for more refactoring between the two filters.
Note: this adds some test cases to the morphology GM, so it will require a rebaseline.

R=bsalomon@google.com, reed@google.com

Review URL: https://codereview.chromium.org/23892011

git-svn-id: http://skia.googlecode.com/svn/trunk@11313 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-17 13:41:43 +00:00
fmalita@google.com
ef45a646a7 [External patch] Source-over support for SkLumaXfermode.
This is a patch by Andrei Parvu <parvu@adobe.com> (Adobe CLA signer).

Original CL/review: https://codereview.chromium.org/24078006/

GM:lumamode will need rebaselining after landing this.

---

  In order to use CSS luminance masking, we need to be able to create an
  instance of SkLumaXfermode which can receive a kSrcOver mode, and applies
  that mode after converting the source using the luminance-to-alpha
  coefficients.

BUG=289420
R=reed@google.com

Review URL: https://codereview.chromium.org/23710053

git-svn-id: http://skia.googlecode.com/svn/trunk@11312 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-17 13:09:16 +00:00
robertphillips@google.com
07f81a57ba Baby step in making SkGpuDevice no longer derive from SkBitmapDevice
https://codereview.chromium.org/23641008/



git-svn-id: http://skia.googlecode.com/svn/trunk@11311 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-17 12:26:23 +00:00
robertphillips@google.com
24ddde9758 Revert 11247, 11250, 11251, 11257, and 11279 to unblock DEPS roll (https://codereview.chromium.org/24159002/)
11279 Sanitizing source files in Housekeeper-Nightly - https://code.google.com/p/skia/source/detail?r=11279
11257 Canary build fix - https://codereview.chromium.org/23532068
11251 More warnings as errors fixes - https://code.google.com/p/skia/source/detail?r=11251
11250 Warnings as errors fix - https://code.google.com/p/skia/source/detail?r=11250
11247 Initial error handling code - https://chromiumcodereview.appspot.com/23021015



git-svn-id: http://skia.googlecode.com/svn/trunk@11288 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-16 14:04:05 +00:00
robertphillips@google.com
ba6e954140 Revert the revert of 11247, 11250, 11251 and 11279 (Chrome already relies on changes in r11247)
git-svn-id: http://skia.googlecode.com/svn/trunk@11287 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-16 13:40:12 +00:00
robertphillips@google.com
478884f7d3 Revert 11247, 11250, 11251 and 11279 to unblock DEPS roll (https://codereview.chromium.org/24159002/)
11279 Sanitizing source files in Housekeeper-Nightly - https://code.google.com/p/skia/source/detail?r=11279
11251 More warnings as errors fixes - https://code.google.com/p/skia/source/detail?r=11251
11250 Warnings as errors fix - https://code.google.com/p/skia/source/detail?r=11250
11247 Initial error handling code - https://chromiumcodereview.appspot.com/23021015



git-svn-id: http://skia.googlecode.com/svn/trunk@11285 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-16 13:19:11 +00:00
reed@google.com
cee9dcb837 start to remove lockPixels from bitmapshader
BUG=
R=scroggo@google.com

Review URL: https://codereview.chromium.org/23591030

git-svn-id: http://skia.googlecode.com/svn/trunk@11258 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-13 16:04:49 +00:00
sugoi@google.com
f4dc60457b Canary build fix
BUG=
R=bsalomon@google.com, robertphillips@google.com

Review URL: https://codereview.chromium.org/23532068

git-svn-id: http://skia.googlecode.com/svn/trunk@11257 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-13 15:42:46 +00:00
commit-bot@chromium.org
4b681bc95b Fixed issues found by fuzzer
Last week, the fuzzer found a few numerical issue with filters and I had written some fixes for them. Here are the fixes with some unit tests.

For senorblanco : So I figured out what was asserting when we'd get a 0 width "result" in SkBicubicImageFilter::onFilterImage(). Basically, if the "result" SkBitmap object calls SkBitmap::setConfig() with "width" and/or "height" set to 0, then the SkBitmap object will call SkBitmap::reset(), making the SkBitmap object's config invalid. At this point, calling SkBitmap::getAddr32() will assert, even without attempting to dereference the data pointer, because the SkBitmap's config is invalid. If height is valid, but width is 0, then this call to SkBitmap::getAddr32() happens directly in SkBicubicImageFilter::onFilterImage() a few lines lower and asserts right away.

BUG=
R=senorblanco@google.com, senorblanco@chromium.org, bsalomon@google.com

Author: sugoi@chromium.org

Review URL: https://chromiumcodereview.appspot.com/23533042

git-svn-id: http://skia.googlecode.com/svn/trunk@11249 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-13 12:40:02 +00:00
commit-bot@chromium.org
5792cded61 Initial error handling code
I made it as simple as possible. The impact seems minimal and it should do what's necessary to make this code secure.

BUG=
R=reed@google.com, scroggo@google.com, djsollen@google.com, sugoi@google.com, bsalomon@google.com, mtklein@google.com, senorblanco@google.com, senorblanco@chromium.org

Author: sugoi@chromium.org

Review URL: https://chromiumcodereview.appspot.com/23021015

git-svn-id: http://skia.googlecode.com/svn/trunk@11247 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-13 12:39:34 +00:00
commit-bot@chromium.org
e0e7cfe44b Change old PRG to be SkLCGRandom; change new one to SkRandom
The goal here is to get people to start using the new random number
generator, while leaving the old one in place so we don't have to 
rebaseline GMs.

R=reed@google.com, bsalomon@google.com

Author: jvanverth@google.com

Review URL: https://chromiumcodereview.appspot.com/23576015

git-svn-id: http://skia.googlecode.com/svn/trunk@11169 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-09 20:09:12 +00:00
bsalomon@google.com
82d1223aec Two and three color GPU gradients without textures.
R=bsalomon@google.com

Review URL: https://codereview.chromium.org/22854005

git-svn-id: http://skia.googlecode.com/svn/trunk@11158 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-09 15:36:26 +00:00
commit-bot@chromium.org
a4de8c257e Remove GrRefCnt.h in favor of SkRefCnt.h
This removes GrRefCnt.h with all its tyepdefs and #defines and just switch them
to the Sk* equivalents.

GrSafeSetNull was promoted to SkSafeSetNull in SkRefCnt.h.

BUG=None
TEST=none, no functional changes.
R=bsalomon@google.com, robertphillips@google.com

Author: tfarina@chromium.org

Review URL: https://chromiumcodereview.appspot.com/23904003

git-svn-id: http://skia.googlecode.com/svn/trunk@11151 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-09 13:38:37 +00:00
commit-bot@chromium.org
1acc3d7cc2 Replace uses of GR_DEBUGCODE by SkDEBUGCODE.
BUG=None
TEST=none, no functional changes.
R=bsalomon@google.com, robertphillips@google.com

Author: tfarina@chromium.org

Review URL: https://chromiumcodereview.appspot.com/23703010

git-svn-id: http://skia.googlecode.com/svn/trunk@11142 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-06 23:13:05 +00:00
commit-bot@chromium.org
040fd8f567 Rip out CSAA support
R=robertphillips@google.com

Author: bsalomon@google.com

Review URL: https://chromiumcodereview.appspot.com/23882009

git-svn-id: http://skia.googlecode.com/svn/trunk@11138 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-06 20:00:41 +00:00
jvanverth@google.com
bfe2b9d3a2 Move oval and rect renderer includes to private interface
R=bsalomon@google.com, robertphillips@google.com

Review URL: https://codereview.chromium.org/23513016

git-svn-id: http://skia.googlecode.com/svn/trunk@11132 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-06 16:57:29 +00:00
commit-bot@chromium.org
91a798f121 alpha threshold bitmap shader
Committed: http://code.google.com/p/skia/source/detail?r=11122

R=reed@google.com

Author: bsalomon@google.com

Review URL: https://chromiumcodereview.appspot.com/23707019

git-svn-id: http://skia.googlecode.com/svn/trunk@11131 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-06 15:31:06 +00:00
commit-bot@chromium.org
a8e5a06f69 Add support for ES3 MSAA.
R=robertphillips@google.com, jvanverth@google.com

Author: bsalomon@google.com

Review URL: https://chromiumcodereview.appspot.com/23404002

git-svn-id: http://skia.googlecode.com/svn/trunk@11124 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-05 23:44:09 +00:00
bsalomon@google.com
67db510c9c Revert "alpha threshold bitmap shader"
This reverts commit r11122.

git-svn-id: http://skia.googlecode.com/svn/trunk@11123 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-05 22:48:05 +00:00
commit-bot@chromium.org
4ec4cf93b7 alpha threshold bitmap shader
R=reed@google.com

Author: bsalomon@google.com

Review URL: https://chromiumcodereview.appspot.com/23707019

git-svn-id: http://skia.googlecode.com/svn/trunk@11122 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-05 21:54:04 +00:00
commit-bot@chromium.org
5242ed761f Add device-independent rendering of ovals, take two.
This permits GPU support for arbitrary matrices. The only exception is 
not all stroked ovals are supported, as thin ovals + fat strokes do not
produce elliptical borders.

R=bsalomon@google.com, robertphillips@google.com

Author: jvanverth@google.com

Review URL: https://chromiumcodereview.appspot.com/23701013

git-svn-id: http://skia.googlecode.com/svn/trunk@11115 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-05 19:26:51 +00:00
skia.committer@gmail.com
c3723db387 Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@11092 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-05 07:01:19 +00:00
humper@google.com
3aad3b01af add support for high quality image filtering on the GPU
R=bsalomon@google.com, reed@google.com

Review URL: https://codereview.chromium.org/23779003

git-svn-id: http://skia.googlecode.com/svn/trunk@11087 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-04 19:23:53 +00:00
mtklein@google.com
bd6343b1d6 Rewrite SkTRegistry to take any trivially-copyable type.
Obviously these are all currently function pointers of type T(*)(P) for various
T and P.  In bench refactoring, I'm trying to register a function pointer of
type T(*)(), which can't be done as is (passing P=void doesn't work).  This
also lets us register things like primitives, which is conceivable useful.

BUG=
R=reed@google.com, scroggo@google.com

Review URL: https://codereview.chromium.org/23453031

git-svn-id: http://skia.googlecode.com/svn/trunk@11082 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-04 17:20:18 +00:00
djsollen@google.com
339e79fbea Add SkCanvasStack and update the Canvas utilities to use it.
BUG=
R=reed@google.com

Review URL: https://codereview.chromium.org/23865004

git-svn-id: http://skia.googlecode.com/svn/trunk@11081 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-04 17:16:00 +00:00
jvanverth@google.com
059a5a339b Reverting r11075.
git-svn-id: http://skia.googlecode.com/svn/trunk@11080 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-04 16:40:37 +00:00
commit-bot@chromium.org
97f74abcbc Add device-independent GPU rendering of ovals.
This permits GPU support for arbitrary matrices. The only exception is not all stroked ovals are supported, as thin ovals and fat strokes do not produce ellipses.

R=robertphillips@google.com, bsalomon@google.com

Author: jvanverth@google.com

Review URL: https://chromiumcodereview.appspot.com/23719004

git-svn-id: http://skia.googlecode.com/svn/trunk@11075 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-04 14:14:17 +00:00
commit-bot@chromium.org
5651512aa3 Remove uses of GR_RELEASE.
Instead of using GR_RELEASE new code should just use SK_RELEASE, like its
counterpart SK_DEBUG instead of GR_DEBUG.

R=bsalomon@google.com, robertphillips@google.com

Author: tfarina@chromium.org

Review URL: https://chromiumcodereview.appspot.com/23479017

git-svn-id: http://skia.googlecode.com/svn/trunk@11070 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-03 23:32:08 +00:00
commit-bot@chromium.org
f5897f83e6 Add OpenGL 4.4 support to SkNativeGLContext and GrGLCreateNativeInterface android versions.
R=robertphillips@google.com

Author: bsalomon@google.com

Review URL: https://chromiumcodereview.appspot.com/23702015

git-svn-id: http://skia.googlecode.com/svn/trunk@11060 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-03 17:50:50 +00:00
commit-bot@chromium.org
b8bd6cbbcd Fix bounds computation in GrAAHairlineRenderer
R=robertphillips@google.com, jvanverth@google.com

Author: bsalomon@google.com

Review URL: https://chromiumcodereview.appspot.com/23684008

git-svn-id: http://skia.googlecode.com/svn/trunk@11054 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-03 14:56:17 +00:00
commit-bot@chromium.org
46fbfe0cd1 Add glTexGen funcs to interface
R=robertphillips@google.com

Author: bsalomon@google.com

Review URL: https://chromiumcodereview.appspot.com/23513006

git-svn-id: http://skia.googlecode.com/svn/trunk@11032 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-30 15:52:12 +00:00