aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
Commit message (Collapse)AuthorAge
* Split atomic and mutex implementations and make inlinable.Gravatar bungeman@google.com2013-12-18
| | | | | | | | | | | | | | | | | | | | | | | Skia cannot use Chromium's implementation of mutex (Lock) due to static initializers. However, we would like to be able to use Chromium's implementation of atomics. This motivates the split of implementation. Skia's atomic and mutex calls should be inlinable, especially the atomics. These calls often compile down to very few instructions, and we currently have the overhead of a function call. This motivates the header implementation. There is still a desire for the build system to select the implementation, so the SK_XXX_PLATFORM_H pattern for header files is introduced. This allows the build system to control which platform specific header files are chosen. The Chromium side changes (most of which will need to go in before this change can be found at https://codereview.chromium.org/19477005/ . The Chromium side changes after this lands can be seen at https://codereview.chromium.org/98073013 . Review URL: https://codereview.chromium.org/19808007 git-svn-id: http://skia.googlecode.com/svn/trunk@12738 2bbb7eff-a529-9590-31e7-b0007b416f81
* move SkScalarMean into its only caller, reducing out public API exposureGravatar reed@google.com2013-12-18
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/117973002 git-svn-id: http://skia.googlecode.com/svn/trunk@12732 2bbb7eff-a529-9590-31e7-b0007b416f81
* move SkScalarLog2 into its only client, in a move to reduce our public API ↵Gravatar reed@google.com2013-12-18
| | | | | | | | | | surface area BUG= Review URL: https://codereview.chromium.org/93643004 git-svn-id: http://skia.googlecode.com/svn/trunk@12731 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fixed more fuzzer issuesGravatar commit-bot@chromium.org2013-12-17
| | | | | | | | | | | | | | | | - Added the "isAvailable" function to check how much bytes are remaining in the stream before doing potentially large mallocs. That way, we can signal a bad stream instead of crashing. - Added data validation in SkImageInfo.cpp - Added NULL pointer check in displacement - Modified the fuzzer for randomized bitmap types BUG=328934,329254 R=senorblanco@google.com, senorblanco@chromium.org, reed@google.com, sugoi@google.com Author: sugoi@chromium.org Review URL: https://codereview.chromium.org/116773002 git-svn-id: http://skia.googlecode.com/svn/trunk@12723 2bbb7eff-a529-9590-31e7-b0007b416f81
* deprecate SkScalarRound (and its ilk), use SkScalarRound[ToInt,ToScalar]. ↵Gravatar reed@google.com2013-12-17
| | | | | | | | | | | #define SK_SUPPORT_DEPRECATED_SCALARROUND for legacy clients BUG= R=robertphillips@google.com Review URL: https://codereview.chromium.org/111353003 git-svn-id: http://skia.googlecode.com/svn/trunk@12719 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove SK_SCALAR_IS_[FLOAT,FIXED] and assume floatsGravatar reed@google.com2013-12-17
| | | | | | | | | | | | | To keep the CL (slightly) managable, this does not make any changes to existing macros (e.g. SkScalarMul). Just tackling #ifdef constructs this time around. BUG= R=bsalomon@google.com, caryclark@google.com Review URL: https://codereview.chromium.org/117053002 git-svn-id: http://skia.googlecode.com/svn/trunk@12712 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert r12694 (Updated GLintptr and GLsizeiptr to be the appropriate types ↵Gravatar robertphillips@google.com2013-12-17
| | | | | | on 64 bit Windows - https://codereview.chromium.org/111403003) due to Chromium-side compilation errors git-svn-id: http://skia.googlecode.com/svn/trunk@12707 2bbb7eff-a529-9590-31e7-b0007b416f81
* The register keyword is deprecated in C++, even at -O0, registers are used ↵Gravatar commit-bot@chromium.org2013-12-16
| | | | | | | | | | | | | | | | | automatically. Having the register keyword there causes a warning about deprecated keywords when using clang (and possibly future gcc versions), and isn't needed. Patch originally submitted to AOSP https://android-review.googlesource.com/#/c/72501 R=mtklein@google.com, scroggo@google.com, reed@google.com Author: djsollen@google.com Review URL: https://codereview.chromium.org/93703005 git-svn-id: http://skia.googlecode.com/svn/trunk@12702 2bbb7eff-a529-9590-31e7-b0007b416f81
* Updated GLintptr and GLsizeiptr to be the appropriate types on 64 bit WindowsGravatar commit-bot@chromium.org2013-12-16
| | | | | | | | | | | BUG=326382 R=reed@google.com, bsalomon@google.com Author: bajones@chromium.org Review URL: https://codereview.chromium.org/111403003 git-svn-id: http://skia.googlecode.com/svn/trunk@12694 2bbb7eff-a529-9590-31e7-b0007b416f81
* Supports the cap height for FreeType even when TT OS2 version is 1.Gravatar bungeman@google.com2013-12-16
| | | | | | | | | BUG=http://crbug.com/318645 R=bungeman@google.com, reed@google.com Review URL: https://codereview.chromium.org/101333004 git-svn-id: http://skia.googlecode.com/svn/trunk@12689 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove SkFP.h and replace SkFP with SkScalar stop respecting ↵Gravatar reed@google.com2013-12-16
| | | | | | | | | | | SK_SOFTWARE_FLOAT, assume its always false stop respecting SK_SCALAR_SLOW_COMPARES, assume its always false BUG= R=caryclark@google.com Review URL: https://codereview.chromium.org/116183002 git-svn-id: http://skia.googlecode.com/svn/trunk@12686 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-12-16
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@12685 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove SkScalarCompare type and headerGravatar reed@google.com2013-12-13
| | | | | | | | | BUG= R=fmalita@chromium.org Review URL: https://codereview.chromium.org/113193004 git-svn-id: http://skia.googlecode.com/svn/trunk@12681 2bbb7eff-a529-9590-31e7-b0007b416f81
* bump picture format to 17 to go with PixelRef Info CLGravatar reed@google.com2013-12-13
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/106763004 git-svn-id: http://skia.googlecode.com/svn/trunk@12678 2bbb7eff-a529-9590-31e7-b0007b416f81
* Update all callsites to use info for pixelrefsGravatar reed@google.com2013-12-13
| | | | | | | | | | | #define SK_SUPPORT_LEGACY_PIXELREF_CONSTRUCTOR in chrome to keep old API signature (for now) BUG= R=scroggo@google.com Review URL: https://codereview.chromium.org/100723005 git-svn-id: http://skia.googlecode.com/svn/trunk@12677 2bbb7eff-a529-9590-31e7-b0007b416f81
* Improved SkPathRef interface securityGravatar robertphillips@google.com2013-12-13
| | | | | | | | https://codereview.chromium.org/115323004/ git-svn-id: http://skia.googlecode.com/svn/trunk@12676 2bbb7eff-a529-9590-31e7-b0007b416f81
* Reverting r12665 & r12666 (Remove duplicate impl for SkImageInfo flattening) ↵Gravatar robertphillips@google.com2013-12-13
| | | | | | | | | | due to Chromium/Blink compilation errors https://codereview.chromium.org/112603003/ git-svn-id: http://skia.googlecode.com/svn/trunk@12667 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remvoe duplicate impl for SkImageInfo flatteningGravatar reed@google.com2013-12-13
| | | | | | | | | | | | Add onNewLockPixels This reverts commit bb8eff6a70c52b7644391cfd4f4d21bf7294a6bf. BUG= Review URL: https://codereview.chromium.org/111323005 git-svn-id: http://skia.googlecode.com/svn/trunk@12665 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "Revert of https://codereview.chromium.org/112783004/"Gravatar reed@google.com2013-12-13
| | | | | | | | | | | | | This reverts commit 3293fe57a7507541e9040eab880dcd82c43881f4. Conflicts: src/core/SkScaledImageCache.cpp BUG= Review URL: https://codereview.chromium.org/108613005 git-svn-id: http://skia.googlecode.com/svn/trunk@12663 2bbb7eff-a529-9590-31e7-b0007b416f81
* Implement an SkPicture image filter source. This is required for the ↵Gravatar senorblanco@chromium.org2013-12-12
| | | | | | | | | | external-SVG reference feature of feImage. It simply plays back an SkPicture to a given destination rect. R=reed@google.com Review URL: https://codereview.chromium.org/114263002 git-svn-id: http://skia.googlecode.com/svn/trunk@12661 2bbb7eff-a529-9590-31e7-b0007b416f81
* Move segment mask from SkPath to SkPathRefGravatar robertphillips@google.com2013-12-12
| | | | | | | | https://codereview.chromium.org/105083003/ git-svn-id: http://skia.googlecode.com/svn/trunk@12660 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "Implement an SkPicture image filter source. This is required for the ↵Gravatar senorblanco@chromium.org2013-12-12
| | | | | | | | external-SVG reference feature of feImage. It simply plays back an SkPicture to a given destination rect." This reverts commit a620349a24471546ad2e8f0679774c1f5b4de0a4 (r12656). git-svn-id: http://skia.googlecode.com/svn/trunk@12657 2bbb7eff-a529-9590-31e7-b0007b416f81
* Implement an SkPicture image filter source. This is required for the ↵Gravatar senorblanco@chromium.org2013-12-12
| | | | | | | | | | external-SVG reference feature of feImage. It simply plays back an SkPicture to a given destination rect. R=reed@google.com Review URL: https://codereview.chromium.org/114263002 git-svn-id: http://skia.googlecode.com/svn/trunk@12656 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert of https://codereview.chromium.org/112783004/Gravatar commit-bot@chromium.org2013-12-12
| | | | | | | | | | | | | | | Reason for revert: Failing assert on Android R=scroggo@google.com, halcanary@google.com, reed@google.com, rmistry@google.com TBR=halcanary@google.com, reed@google.com, scroggo@google.com NOTREECHECKS=true NOTRY=true Author: robertphillips@google.com Review URL: https://codereview.chromium.org/93673005 git-svn-id: http://skia.googlecode.com/svn/trunk@12646 2bbb7eff-a529-9590-31e7-b0007b416f81
* ensure that we call onUnlock only when we onLock succeededGravatar reed@google.com2013-12-12
| | | | | | | | | BUG= R=halcanary@google.com, scroggo@google.com Review URL: https://codereview.chromium.org/112783004 git-svn-id: http://skia.googlecode.com/svn/trunk@12642 2bbb7eff-a529-9590-31e7-b0007b416f81
* Initialize SkPixelRef::fInfo.Gravatar scroggo@google.com2013-12-12
| | | | | | | | | | | Still will need to make subclasses call the version of the constructor that initializes fInfo properly. R=reed@google.com Review URL: https://codereview.chromium.org/110843006 git-svn-id: http://skia.googlecode.com/svn/trunk@12639 2bbb7eff-a529-9590-31e7-b0007b416f81
* Reverting r12635 (Make leak counters thread-safe - ↵Gravatar robertphillips@google.com2013-12-12
| | | | | | https://codereview.chromium.org/99483003) due to compile errors on Mac 10.6 & in Chrome git-svn-id: http://skia.googlecode.com/svn/trunk@12637 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make leak counters thread-safe and turn them on by default for DebugGravatar commit-bot@chromium.org2013-12-12
| | | | | | | | | | | | | | | | | | | | | | | | Make leak counters implemented with SK_DECLARE_INST_COUNT thread-safe. Enable the leak counting for Debug builds. Protect the instance counter initialization step (initStep) by using SkOnce. Makes SkOnce.h part of the public API, since SkInstCnt is public. Protect the per-class child list shared variable with a per-class mutex. Changes the behavior in the way that if the child list has been "cleaned up", it will still try to create subsequent child lists. BUG=skia:1219 R=robertphillips@google.com, mtklein@google.com, bungeman@gmail.com, bsalomon@google.com, bungeman@google.com Author: kkinnunen@nvidia.com Review URL: https://codereview.chromium.org/99483003 git-svn-id: http://skia.googlecode.com/svn/trunk@12635 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "remvoe duplicate impl for SkImageInfo flattening"Gravatar reed@google.com2013-12-11
| | | | | | | | | | | | Reason: breaks chrome_mac_tests which still have non-imageinfo constructors This reverts commit a06b8cf60b39bda93e9ef1a73579007b2b930d29. BUG= Review URL: https://codereview.chromium.org/103033005 git-svn-id: http://skia.googlecode.com/svn/trunk@12631 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "Revert of https://codereview.chromium.org/108773003/"Gravatar reed@google.com2013-12-11
| | | | | | | | | | This reverts commit 947e6a3142af66b750f1247ef933b11ed8455dd4. BUG= Review URL: https://codereview.chromium.org/112963003 git-svn-id: http://skia.googlecode.com/svn/trunk@12630 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert of https://codereview.chromium.org/108773003/Gravatar commit-bot@chromium.org2013-12-11
| | | | | | | | | | | | | | Reason for revert: breaks chrome-mac-tests TBR= NOTREECHECKS=true NOTRY=true Author: reed@google.com Review URL: https://codereview.chromium.org/113193003 git-svn-id: http://skia.googlecode.com/svn/trunk@12629 2bbb7eff-a529-9590-31e7-b0007b416f81
* remvoe duplicate impl for SkImageInfo flatteningGravatar reed@google.com2013-12-11
| | | | | | | | | | | | Revert "Revert "PixelRef now returns (nearly) everything that is currently in SkBitmap. The goal is to refactor bitmap later to remove redundancy, and more interestingly, remove the chance for a disconnect between the actual (pixelref) rowbytes and config, and the one claimed by the bitmap."""""" This reverts commit eabd6b2ed4e494b323c08f32358f45950a0368c3. BUG= Review URL: https://codereview.chromium.org/108773003 git-svn-id: http://skia.googlecode.com/svn/trunk@12624 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "PixelRef now returns (nearly) everything that is currently in ↵Gravatar reed@google.com2013-12-11
| | | | | | | | | | | | SkBitmap. The goal is to refactor bitmap later to remove redundancy, and more interestingly, remove the chance for a disconnect between the actual (pixelref) rowbytes and config, and the one claimed by the bitmap.""""" This reverts commit d08eca87a0bef10112a211de540f89656a80b86a. BUG= Review URL: https://codereview.chromium.org/108303003 git-svn-id: http://skia.googlecode.com/svn/trunk@12623 2bbb7eff-a529-9590-31e7-b0007b416f81
* PixelRef now returns (nearly) everything that is currently in SkBitmap. The ↵Gravatar reed@google.com2013-12-11
| | | | | | | | | | goal is to refactor bitmap later to remove redundancy, and more interestingly, remove the chance for a disconnect between the actual (pixelref) rowbytes and config, and the one claimed by the bitmap."""" BUG= Review URL: https://codereview.chromium.org/110503003 git-svn-id: http://skia.googlecode.com/svn/trunk@12622 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sk_API for SkImageGenerator and SkInstallDiscardablePixelRefGravatar halcanary@google.com2013-12-10
| | | | | | | | | | | | | | | | | | | | Added SK_API to SkImageGenerator (already in include/). Moved SkDiscardablePixelRef::Install to SkInstallDiscardablePixelRef, added SK_API to that function, and moved declaration to SkImageGenerator.h This keeps the SkDiscardablePixelRef internal to Skia, but exposes a method to install it into a bitmap. Modifed tests that rely on this functio to use new version. BUG= R=mtklein@google.com, reed@google.com Review URL: https://codereview.chromium.org/111713002 git-svn-id: http://skia.googlecode.com/svn/trunk@12612 2bbb7eff-a529-9590-31e7-b0007b416f81
* Support MSAA4 and (non-ES) OpenGL in Android SampleAppGravatar commit-bot@chromium.org2013-12-10
| | | | | | | | | | | | | | Add a menu item to set the OpenGL context type that SampleApp uses on Android. The submenu of the new item will present options to create OpenGL ES or OpenGL, aliased or multisampled. R=djsollen@google.com, bsalomon@google.com Author: kkinnunen@nvidia.com Review URL: https://codereview.chromium.org/60273006 git-svn-id: http://skia.googlecode.com/svn/trunk@12610 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "[PDF] Fix font embedding restrictions."Gravatar vandebo@chromium.org2013-12-10
| | | | | | | | This reverts r12600 and r12601, likely causing crash on Mac. Review URL: https://codereview.chromium.org/111893002 git-svn-id: http://skia.googlecode.com/svn/trunk@12604 2bbb7eff-a529-9590-31e7-b0007b416f81
* [PDF] Fix font embedding restrictions.Gravatar commit-bot@chromium.org2013-12-10
| | | | | | | | | | | | Stop using restricted font outlines and honor don't subset restriction. R=reed@google.com, bungeman@google.com Author: vandebo@chromium.org Review URL: https://codereview.chromium.org/107863002 git-svn-id: http://skia.googlecode.com/svn/trunk@12600 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make GrBicubicEffect take tile modes rather than GrTextureParams.Gravatar commit-bot@chromium.org2013-12-10
| | | | | | | | | | | | | | GrTextureParams allows the caller to override the filter mode. But no filtering other than nearest neighbor makes sense. Also removes coord set from creation signature since it is unused. R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/99523008 git-svn-id: http://skia.googlecode.com/svn/trunk@12591 2bbb7eff-a529-9590-31e7-b0007b416f81
* make info real in SkPixelRef, and add bitmap::asImageInfoGravatar reed@google.com2013-12-09
| | | | | | | | | BUG= R=scroggo@google.com Review URL: https://codereview.chromium.org/108663004 git-svn-id: http://skia.googlecode.com/svn/trunk@12586 2bbb7eff-a529-9590-31e7-b0007b416f81
* Do not use GrBicubic effect when downscaling. Also, don't use glTexStorage ↵Gravatar commit-bot@chromium.org2013-12-09
| | | | | | | | | | | | as it interferes with deleyed mipmap generation. R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/105353002 git-svn-id: http://skia.googlecode.com/svn/trunk@12576 2bbb7eff-a529-9590-31e7-b0007b416f81
* Implement srcRect and dstRect functionality in SkBitmapSource. This is ↵Gravatar senorblanco@chromium.org2013-12-09
| | | | | | | | | | | | | | required for the "preserveAspectRatio" options of SVG's feImage. Covered by new GM "bitmapsource". This also includes some changes to the xfermodeimagefilter and tileimagefilter GMs to properly handle the CTM. This worked before only because SkBitmapSource was ignoring the CTM. Now that it respects it, we need to give the correct transform. This also means the GMs now work while zoomed. It also implements CTM support for SkTileImageFilter. NOTE: this will require rebaselining a number of imagefilter GMs on Nexus4, since they render in perspective (using the CTM). The changes to the results should all be improvements. R=reed@google.com, robertphillips@google.com Review URL: https://codereview.chromium.org/106933002 git-svn-id: http://skia.googlecode.com/svn/trunk@12571 2bbb7eff-a529-9590-31e7-b0007b416f81
* SkDecodingImageGenerator now uses SkStreamRewindableGravatar halcanary@google.com2013-12-09
| | | | | | | | | | | | | | | | | | This makes sense since Android will be giving us a stream and the decoders expect a stream. This also removes some glue code, DecodeMemoryToTarget, that works better using a SkImageGenerator. Motivation: This is a necessary step to move from SkImageRef to SkDiscardablePixelRef. SkImageDecoder::DecodeMemoryToTarget function removed. BUG= R=reed@google.com, scroggo@google.com Review URL: https://codereview.chromium.org/101973005 git-svn-id: http://skia.googlecode.com/svn/trunk@12560 2bbb7eff-a529-9590-31e7-b0007b416f81
* add SkImageInfo to SkGrPixelRef constructor, to prep for larger CLGravatar reed@google.com2013-12-09
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/104923011 git-svn-id: http://skia.googlecode.com/svn/trunk@12559 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove explicit when we have 2 argsGravatar reed@google.com2013-12-06
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@12553 2bbb7eff-a529-9590-31e7-b0007b416f81
* add SK_SUPPORT_LEGACY_PIXELREF_CONSTRUCTOR, initially always onGravatar reed@google.com2013-12-06
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/106183007 git-svn-id: http://skia.googlecode.com/svn/trunk@12552 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "Revert "Revert "PixelRef now returns (nearly) everything that is ↵Gravatar reed@google.com2013-12-06
| | | | | | | | | | | | | | currently in SkBitmap. The goal is to refactor bitmap later to remove redundancy, and more interestingly, remove the chance for a disconnect between the actual (pixelref) rowbytes and config, and the one claimed by the bitmap.""" This reverts commit 5f035e90d6dea0139a4f204b634e7b7b3b4976d7. Reverting because it breaks chrome/blink due to new SkPixelRef constructor arg. BUG= Review URL: https://codereview.chromium.org/108993002 git-svn-id: http://skia.googlecode.com/svn/trunk@12551 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "Revert "PixelRef now returns (nearly) everything that is currently ↵Gravatar reed@google.com2013-12-06
| | | | | | | | | | | | in SkBitmap. The goal is to refactor bitmap later to remove redundancy, and more interestingly, remove the chance for a disconnect between the actual (pixelref) rowbytes and config, and the one claimed by the bitmap."" This reverts commit 4174afb18a9746bbad2a06c0ec2d4ad35f72d790. BUG= Review URL: https://codereview.chromium.org/108723003 git-svn-id: http://skia.googlecode.com/svn/trunk@12547 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fixed a few places where uninitialized memory could have been readGravatar commit-bot@chromium.org2013-12-06
| | | | | | | | | | | | | Also added early exit in SkImageFilter's constructor to avoid attempting to deserialize all inputs once a bad input has been found. This avoids hanging if a filter pretends to have 1 billion inputs when that's just an error on the number of inputs read by the filter. BUG=326206,326197,326229 R=senorblanco@chromium.org, senorblanco@google.com, reed@google.com, sugoi@google.com Author: sugoi@chromium.org Review URL: https://codereview.chromium.org/106943002 git-svn-id: http://skia.googlecode.com/svn/trunk@12544 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "PixelRef now returns (nearly) everything that is currently in ↵Gravatar reed@google.com2013-12-06
| | | | | | | | | | | | SkBitmap. The goal is to refactor bitmap later to remove redundancy, and more interestingly, remove the chance for a disconnect between the actual (pixelref) rowbytes and config, and the one claimed by the bitmap." This reverts commit 154e08b2f5904ef533da694e3510befcb9a3f3e2. revert due to warnings Review URL: https://codereview.chromium.org/108513003 git-svn-id: http://skia.googlecode.com/svn/trunk@12538 2bbb7eff-a529-9590-31e7-b0007b416f81