aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core
Commit message (Collapse)AuthorAge
* Fixed bad bitmap size crashesGravatar commit-bot@chromium.org2013-12-04
| | | | | | | | | | | | | | | There were 2 issues : 1 ) If the size of an SkBitmap's underlying SkPixelRef's alocated memory is too small to fit the bitmap, then the deserialization will now check this and set an error appropriately. 2 ) If a device fails to allocate its pixels, the device will be deleted and NULL will be returned to avoid attempting to draw on a bad device. BUG= R=senorblanco@chromium.org, reed@google.com, sugoi@google.com, halcanary@google.com, mtklein@google.com Author: sugoi@chromium.org Review URL: https://codereview.chromium.org/92793002 git-svn-id: http://skia.googlecode.com/svn/trunk@12484 2bbb7eff-a529-9590-31e7-b0007b416f81
* Put all of SkPostConfig.h inside top level ifdef.Gravatar bungeman@google.com2013-12-04
| | | | | | | | | | | | Due to inconsistent indentation, the last third of this header is outside of the top level ifdef header guard. This CL fixes that, as well as makes the indents more consistent to avoid this issue in the future. R=mtklein@google.com, reed@google.com Review URL: https://codereview.chromium.org/102153002 git-svn-id: http://skia.googlecode.com/svn/trunk@12482 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make SkTInternalLList::validate validate all nodesGravatar commit-bot@chromium.org2013-12-04
| | | | | | | | | | | | | Make SkTInternalLList::validate validate all nodes, including the first one. R=mtklein@google.com, bsalomon@google.com Author: kkinnunen@nvidia.com Review URL: https://codereview.chromium.org/104553002 git-svn-id: http://skia.googlecode.com/svn/trunk@12479 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-12-04
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@12477 2bbb7eff-a529-9590-31e7-b0007b416f81
* SkSplay and SkUnsplay work on any uint32_t, not just SkPMColor.Gravatar commit-bot@chromium.org2013-12-04
| | | | | | | | | | | BUG= R=reed@google.com, tfarina@chromium.org Author: mtklein@google.com Review URL: https://codereview.chromium.org/102813002 git-svn-id: http://skia.googlecode.com/svn/trunk@12476 2bbb7eff-a529-9590-31e7-b0007b416f81
* Code cleanup following recapture of skpsGravatar robertphillips@google.com2013-12-03
| | | | | | | | https://codereview.chromium.org/88233003/ git-svn-id: http://skia.googlecode.com/svn/trunk@12472 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix 32/64 bit warnings on g++-4.2.Gravatar mtklein@google.com2013-12-03
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/98343006 git-svn-id: http://skia.googlecode.com/svn/trunk@12470 2bbb7eff-a529-9590-31e7-b0007b416f81
* Refactor FourByteInterps. Add 64-bit Fast version. Add tests.Gravatar commit-bot@chromium.org2013-12-03
| | | | | | | | | | | | | | | | | | | | | | | | | Effect on benches (only _fast_ should be affected, and only on 64-bit): Desktop (64-bit) four_byte_interp_slow_255 NONRENDERING c 7.80 7.84 -0.04 -0.5% four_byte_interp_slow_256 NONRENDERING c 7.38 7.36 +0.02 +0.3% four_byte_interp_fast_256 NONRENDERING c 4.86 4.38 +0.48 +9.9% four_byte_interp_fast_255 NONRENDERING c 5.80 5.16 +0.64 +11.0% N5 (32-bit) four_byte_interp_slow_256 NONRENDERING c 22.22 22.66 -0.44 -2.0% four_byte_interp_fast_255 NONRENDERING c 22.22 22.22 +0.00 +0.0% four_byte_interp_fast_256 NONRENDERING c 18.81 18.81 +0.00 +0.0% four_byte_interp_slow_255 NONRENDERING c 22.42 22.42 +0.00 +0.0% BUG= R=reed@google.com Author: mtklein@google.com Review URL: https://codereview.chromium.org/100923003 git-svn-id: http://skia.googlecode.com/svn/trunk@12468 2bbb7eff-a529-9590-31e7-b0007b416f81
* Move fIsOval from SkPath to SkPathRefGravatar robertphillips@google.com2013-12-03
| | | | | | | | https://codereview.chromium.org/89123002/ git-svn-id: http://skia.googlecode.com/svn/trunk@12463 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert of r12450 (Move fIsOval from SkPath to SkPathRef)Gravatar robertphillips@google.com2013-12-03
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@12452 2bbb7eff-a529-9590-31e7-b0007b416f81
* Move fIsOval from SkPath to SkPathRefGravatar robertphillips@google.com2013-12-02
| | | | | | | | https://codereview.chromium.org/89123002/ git-svn-id: http://skia.googlecode.com/svn/trunk@12450 2bbb7eff-a529-9590-31e7-b0007b416f81
* SkDiscardablePixelRef objects are now marked immutable.Gravatar commit-bot@chromium.org2013-12-02
| | | | | | | | | | | | | | | | | | | I also specifically mentioned in the SkImageGenerator documentation that it should always return the same information on subsequent calls to getInfo() and getPixels(). Motivation: When a bitmap is recorded into a SkPicture, it will choose whether to shallow- or deep-copy itself into the SkBitmapHeap based on the immutable flag. Failing to set it would make picture recording slow. BUG= R=fmalita@google.com, reed@google.com, scroggo@google.com Author: halcanary@google.com Review URL: https://codereview.chromium.org/99303003 git-svn-id: http://skia.googlecode.com/svn/trunk@12445 2bbb7eff-a529-9590-31e7-b0007b416f81
* restore [6] for setPrefConfigTable, accidentally changed with A1 CLGravatar reed@google.com2013-12-02
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/99963002 git-svn-id: http://skia.googlecode.com/svn/trunk@12433 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix spelling errors in SkWeakRefCnt.Gravatar bungeman@google.com2013-12-02
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@12432 2bbb7eff-a529-9590-31e7-b0007b416f81
* Reverting r12427Gravatar rmistry@google.com2013-12-02
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@12428 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-12-02
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@12427 2bbb7eff-a529-9590-31e7-b0007b416f81
* DM: write failed comparison mode .pngs one more level deep in the tree.Gravatar mtklein@google.com2013-11-26
| | | | | | | | | | | | | | | | | | | | | | E.g. instead of having to compare /tmp/dm/565/optimizations.png vs. /tmp/dm/replay/optimizations_565.png it's now /tmp/dm/565/optimizations.png vs. /tmp/dm/replay/565/optimizations.png This lets working with skdiff go a lot more smoothly. BUG= R=bsalomon@google.com Review URL: https://codereview.chromium.org/88773002 git-svn-id: http://skia.googlecode.com/svn/trunk@12402 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "Revert "remove kA1_Config, as it is no longer supported""Gravatar commit-bot@chromium.org2013-11-26
| | | | | | | | | | | | | This reverts commit 36d712f2d4c5c79719280ad95523e6aaa88b068e. BUG= R=rmistry@google.com, mtklein@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/86483002 git-svn-id: http://skia.googlecode.com/svn/trunk@12392 2bbb7eff-a529-9590-31e7-b0007b416f81
* Adding more validationGravatar commit-bot@chromium.org2013-11-25
| | | | | | | | | | | | | | | | - Added a way to check that the number of inputs of a filter is not more than a filter expects - Added validation of reftype in SkBitmap::unflatten() - Added validation on fKD (diffuse lighting constant) and fKS (specular lighting constant) to make sure that they are always non-negative numbers - Added validation of SkPerlinNoiseShader::fType and SkPerlinNoiseShader::fNumOctaves BUG= R=reed@google.com, senorblanco@google.com, mtklein@google.com, senorblanco@chromium.org, sugoi@google.com Author: sugoi@chromium.org Review URL: https://codereview.chromium.org/83343003 git-svn-id: http://skia.googlecode.com/svn/trunk@12388 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "remove kA1_Config, as it is no longer supported"Gravatar reed@google.com2013-11-25
| | | | | | This reverts commit 2d72d8b242eac6e9d30228f5b0a407236491c369. git-svn-id: http://skia.googlecode.com/svn/trunk@12387 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove SkFloatToScalar macroGravatar commit-bot@chromium.org2013-11-25
| | | | | | | | | | | BUG= R=reed@google.com, djsollen@google.com Author: caryclark@google.com Review URL: https://codereview.chromium.org/85463005 git-svn-id: http://skia.googlecode.com/svn/trunk@12385 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove kA1_Config, as it is no longer supportedGravatar reed@google.com2013-11-25
| | | | | | | | | BUG= R=djsollen@google.com Review URL: https://codereview.chromium.org/83093005 git-svn-id: http://skia.googlecode.com/svn/trunk@12384 2bbb7eff-a529-9590-31e7-b0007b416f81
* Adding SkDeferredCanvas::NoticifationClient to the exported API.Gravatar commit-bot@chromium.org2013-11-25
| | | | | | | | | | | R=reed@android.com, robertphillips@google.com, reed, robertphillips BUG=1861 Author: schenney@chromium.org Review URL: https://codereview.chromium.org/83383007 git-svn-id: http://skia.googlecode.com/svn/trunk@12380 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add SK_ALWAYS_INLINE.Gravatar mtklein@google.com2013-11-22
| | | | | | | | | | | | | | | I'm working on some code that's much faster when compiled by GCC than by Clang because GCC inlines more aggressively. Using SK_ATTRIBUTE(always_inline) on the appropriate methods narrows the performance gap considerably. This should work for MSVC, GCC, and Clang, otherwise falling back to "inline". BUG= R=reed@google.com Review URL: https://codereview.chromium.org/83333005 git-svn-id: http://skia.googlecode.com/svn/trunk@12364 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix VC++ ptr-to-... and va_list confusionGravatar commit-bot@chromium.org2013-11-21
| | | | | | | | | | R=bungeman@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/78903006 git-svn-id: http://skia.googlecode.com/svn/trunk@12346 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add SkImageGenerator InterfaceGravatar halcanary@google.com2013-11-21
| | | | | | | | | | | | | | | | | | - Add SkDiscardablePixelRef class that uses SkDiscardableMemory and a SkImageGenerator. - Add SkDecodingImageGenerator class as an example of a SkImageGenerator. - Add DecodingImageGenerator unit test. - Add SkBasicDiscardableMemory implmentation for unit tests only. R=reed@google.com, scroggo@google.com Review URL: https://codereview.chromium.org/74793011 git-svn-id: http://skia.googlecode.com/svn/trunk@12341 2bbb7eff-a529-9590-31e7-b0007b416f81
* More Windows 64b compilation warning fixesGravatar robertphillips@google.com2013-11-21
| | | | | | | | https://codereview.chromium.org/47513017/ git-svn-id: http://skia.googlecode.com/svn/trunk@12337 2bbb7eff-a529-9590-31e7-b0007b416f81
* Implement a benchmark for GrResourceCacheGravatar commit-bot@chromium.org2013-11-21
| | | | | | | | | | | | | | | | | | | | | | | Adds "grresourcecache_add" and "grresourcecache_find" bench tests to test GrResourceCache::add and GrResourceCache::find. The tests work only with GPU backends, since GrResourceCache needs an GrGpu. Modifies bench tests to override SkBenchmark::isSuitableFor(Backend) function that specifies what kind of backend the test is inteded for. This replaces the previous "fIsRendering" flag that would indicate test that did no rendering. Adds SkCanvas::getGrContext() call to get the GrContext that the canvas ends up drawing to. The member function solves a common use-case that is also used in the benchmark added here. R=mtklein@google.com, bsalomon@google.com Author: kkinnunen@nvidia.com Review URL: https://codereview.chromium.org/73643005 git-svn-id: http://skia.googlecode.com/svn/trunk@12334 2bbb7eff-a529-9590-31e7-b0007b416f81
* Reverting r12315 (More Windows 64b compilation warning fixes) due to ↵Gravatar robertphillips@google.com2013-11-20
| | | | | | compilation failures git-svn-id: http://skia.googlecode.com/svn/trunk@12316 2bbb7eff-a529-9590-31e7-b0007b416f81
* More Windows 64b compilation warning fixesGravatar robertphillips@google.com2013-11-20
| | | | | | | | https://codereview.chromium.org/47513017/ git-svn-id: http://skia.googlecode.com/svn/trunk@12315 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert SK_REQUIRE_LOCAL_VAR changes for DEPS roll.Gravatar mtklein@google.com2013-11-18
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/59703012 git-svn-id: http://skia.googlecode.com/svn/trunk@12306 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix DocumentTest/SkDocument memory leaksGravatar robertphillips@google.com2013-11-18
| | | | | | | | https://codereview.chromium.org/72833002/ git-svn-id: http://skia.googlecode.com/svn/trunk@12302 2bbb7eff-a529-9590-31e7-b0007b416f81
* Guard against most unintentionally ephemeral SkAutoFoo instantiations.Gravatar commit-bot@chromium.org2013-11-18
| | | | | | | | | | | | | | | | | | | I think I applied the trick everywhere possible. Limitations: - can't be used with templated classes - all constructors and destructors must be defined inline A couple of the SkAutoFoo were unused in Skia, Chromium, and Android, so I deleted them. This change caught the same bugs Cary found in SkPath, plus one more in SampleApp. BUG= R=reed@google.com, caryclark@google.com Author: mtklein@google.com Review URL: https://codereview.chromium.org/72603005 git-svn-id: http://skia.googlecode.com/svn/trunk@12301 2bbb7eff-a529-9590-31e7-b0007b416f81
* increase coverage of SkPath.cpp, remove unused codeGravatar commit-bot@chromium.org2013-11-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using Mike Klein's excellent coverage tool, increase the unit testing of SkPath.cpp from 70% to 95%. Along the way, determined that these functions were not maintained or used: SkPath::pathTo SkPath::contains as well as a large block of SkPath::cheapGetDirection(). Changed SkPath::validate() to permit infinities in the path data points. Fixed errors in preserving direction. Fixed error setting direction when convexity is unknown. Added missing conic to moveTo only detector. BUG= R=bsalomon@google.com, reed@google.com Author: caryclark@google.com Review URL: https://codereview.chromium.org/65493004 git-svn-id: http://skia.googlecode.com/svn/trunk@12291 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-11-14
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@12283 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove backward compatibility shims from SkStream.h.Gravatar bungeman@google.com2013-11-13
| | | | | | | | R=reed@google.com Review URL: https://codereview.chromium.org/68773009 git-svn-id: http://skia.googlecode.com/svn/trunk@12275 2bbb7eff-a529-9590-31e7-b0007b416f81
* move SkImageInfo into its own headerGravatar reed@google.com2013-11-13
| | | | | | | | | BUG= R=djsollen@google.com Review URL: https://codereview.chromium.org/71813002 git-svn-id: http://skia.googlecode.com/svn/trunk@12273 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "Revert "switch GatherPixelRefs to use SkBaseDevice instead of ↵Gravatar reed@google.com2013-11-13
| | | | | | | | | | | | SkBitmapDevice"" This reverts commit ff0152ec5e2a0faf38ae1a317c5d77df08139104. BUG= Review URL: https://codereview.chromium.org/68203018 git-svn-id: http://skia.googlecode.com/svn/trunk@12271 2bbb7eff-a529-9590-31e7-b0007b416f81
* drawPosTextOnPath is now deprecated, removing all overrides and implsGravatar reed@google.com2013-11-13
| | | | | | | | | BUG= R=djsollen@google.com Review URL: https://codereview.chromium.org/61743017 git-svn-id: http://skia.googlecode.com/svn/trunk@12270 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "switch GatherPixelRefs to use SkBaseDevice instead of SkBitmapDevice"Gravatar reed@google.com2013-11-12
| | | | | | | | | | This reverts commit 72958c374bdb9457419beeba7de1387da3293882. BUG= Review URL: https://codereview.chromium.org/58933007 git-svn-id: http://skia.googlecode.com/svn/trunk@12260 2bbb7eff-a529-9590-31e7-b0007b416f81
* switch GatherPixelRefs to use SkBaseDevice instead of SkBitmapDeviceGravatar reed@google.com2013-11-12
| | | | | | | | | BUG= R=robertphillips@google.com, scroggo@google.com Review URL: https://codereview.chromium.org/70473003 git-svn-id: http://skia.googlecode.com/svn/trunk@12259 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove deprecated setIsOpaque() API from SkBitmap.Gravatar commit-bot@chromium.org2013-11-12
| | | | | | | | | | | | | Clients we care (Blink, Chromium) were updated, so we can remove this now. BUG=None R=bsalomon@google.com, reed@google.com Author: tfarina@chromium.org Review URL: https://codereview.chromium.org/66723017 git-svn-id: http://skia.googlecode.com/svn/trunk@12251 2bbb7eff-a529-9590-31e7-b0007b416f81
* add colortable enum to SkImage to ease interop between it and SkBitmap::ConfigGravatar reed@google.com2013-11-12
| | | | | | | | | BUG= R=halcanary@google.com, scroggo@google.com Review URL: https://codereview.chromium.org/68853003 git-svn-id: http://skia.googlecode.com/svn/trunk@12245 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove SK_FONTHOST_USES_FONTMGR.Gravatar bungeman@google.com2013-11-11
| | | | | | Review URL: https://codereview.chromium.org/66783003 git-svn-id: http://skia.googlecode.com/svn/trunk@12217 2bbb7eff-a529-9590-31e7-b0007b416f81
* Re-enable SK_ATTR_DEPRECATED (i.e., revert r12067)Gravatar robertphillips@google.com2013-11-10
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@12209 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add sk_float_rsqrt with SSE + NEON fast paths.Gravatar commit-bot@chromium.org2013-11-08
| | | | | | | | | | | | | | | | | | | | | | | | | Current numbers: N4: running bench [640 480] math_fastIsqrt NONRENDERING: cmsecs = 3.12 running bench [640 480] math_slowIsqrt NONRENDERING: cmsecs = 4.82 running bench [640 480] math_sk_float_rsqrt NONRENDERING: cmsecs = 1.99 Desktop: running bench [640 480] math_fastIsqrt NONRENDERING: cmsecs = 0.89 running bench [640 480] math_slowIsqrt NONRENDERING: cmsecs = 0.94 running bench [640 480] math_sk_float_rsqrt NONRENDERING: cmsecs = 0.09 Haven't found any other benches where this is a significant effect yet. BUG= R=reed@google.com Author: mtklein@google.com Review URL: https://codereview.chromium.org/60083014 git-svn-id: http://skia.googlecode.com/svn/trunk@12203 2bbb7eff-a529-9590-31e7-b0007b416f81
* Adding error checks to SkRBufferGravatar commit-bot@chromium.org2013-11-08
| | | | | | | | | | | BUG= R=robertphillips@google.com, bsalomon@google.com, reed@google.com Author: sugoi@chromium.org Review URL: https://codereview.chromium.org/61913002 git-svn-id: http://skia.googlecode.com/svn/trunk@12202 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add ability to ninepatch blurred rounded rectangleGravatar scroggo@google.com2013-11-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Speed up drawing large blurry round rectangles by converting them to nine patches. SkDraw: Add drawRRect. SkBitmapDevice: Call SkDraw::drawRRect instead of converting SkRRect to an SkPath. SkMaskFilter/SkBlurMaskFilter: Create a nine patch of a blurred round rect and draw it instead of drawing the entire thing. SkPDFDevice: Override drawRRect to perform the old behavior in SkBitmapDevice::drawRect. Depends on https://codereview.chromium.org/52703003 Tests are in https://codereview.chromium.org/52793005 BUG=https://b.corp.google.com/issue?id=11174385 R=reed@google.com, robertphillips@google.com Review URL: https://codereview.chromium.org/48623006 git-svn-id: http://skia.googlecode.com/svn/trunk@12198 2bbb7eff-a529-9590-31e7-b0007b416f81
* Removed unnecessary defineGravatar commit-bot@chromium.org2013-11-08
| | | | | | | | | | | BUG= R=bsalomon@google.com, sugoi@google.com Author: sugoi@chromium.org Review URL: https://codereview.chromium.org/59033009 git-svn-id: http://skia.googlecode.com/svn/trunk@12189 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "Revert "speed up A8 by creating a new entry-point in SkDraw that ↵Gravatar reed@google.com2013-11-07
| | | | | | | | | | | | blits the path's coverage directly into an A8 target, regardless of the previous pixel values."" This reverts commit 3c77887b3eb2d32ab668ab4e5f2f9e79103956e8. BUG= Review URL: https://codereview.chromium.org/50673005 git-svn-id: http://skia.googlecode.com/svn/trunk@12167 2bbb7eff-a529-9590-31e7-b0007b416f81