aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
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
* remove last remnant of SK_SCALAR_IS_FIXED codeGravatar reed@google.com2013-12-18
| | | | | | | | | | move SkScalarMean into its only caller, reducing out public API exposure BUG= Review URL: https://codereview.chromium.org/117133004 git-svn-id: http://skia.googlecode.com/svn/trunk@12733 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
* [PDF] Fix clipping in xfermode improvement.Gravatar commit-bot@chromium.org2013-12-17
| | | | | | | | | | | | | | In some cases, the wrong clip (src clip instead of initial clip) was used. Switch almost exclusively to initial clip because it is safe and generates a smaller result. BUG=chromium:328009 R=reed@google.com, bungeman@google.com Author: vandebo@chromium.org Review URL: https://codereview.chromium.org/116423004 git-svn-id: http://skia.googlecode.com/svn/trunk@12729 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fixing valgrind errorGravatar commit-bot@chromium.org2013-12-17
| | | | | | | | | | | | | After an error in the stream prevented the deserialization of SkRect members, there was no check to see if there was an error state before testing the validity of these uninitialized SkRect members. Added the check to fix the valgrind error. BUG= R=robertphillips@google.com, sugoi@google.com Author: sugoi@chromium.org Review URL: https://codereview.chromium.org/114493005 git-svn-id: http://skia.googlecode.com/svn/trunk@12727 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
* Prevent crash in Lua bindings.Gravatar commit-bot@chromium.org2013-12-17
| | | | | | | | | | | | | | SkPaint::getTypeface() can return NULL; paint:getTypeface() would attempt to refcount that value before storing it on the Lua stack and crash. This is a minimal workaround that fixes the crash. R=reed@google.com, tomhudson@google.com, robertphillips@google.com Author: tomhudson@chromium.org Review URL: https://codereview.chromium.org/109793010 git-svn-id: http://skia.googlecode.com/svn/trunk@12706 2bbb7eff-a529-9590-31e7-b0007b416f81
* Tweaks in how to apply bitmap filter levels in GPU.Gravatar commit-bot@chromium.org2013-12-16
| | | | | | | | | | | | | | Fix fallback to MIP from bicubic for bitmap shaders Skip MIP level generation on GPU when not minifying Add medium quality and mixed up/down matrix test cases to filterbitmap tests R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/103913012 git-svn-id: http://skia.googlecode.com/svn/trunk@12697 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove an assert that assumes too much.Gravatar scroggo@google.com2013-12-16
| | | | | | | | | | | | | The resulting bitmap may look funny, but it may not be our bug, and the assert is making it difficult to use SKP files. TBR=robertphillips@google.com, rmistry@google.com, bensong@google.com BUG=skia:1905 Review URL: https://codereview.chromium.org/111463006 git-svn-id: http://skia.googlecode.com/svn/trunk@12696 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
* Use GrTextureDomain in GrBicubicEffect to perform non-bleeding HQ filter ↵Gravatar commit-bot@chromium.org2013-12-16
| | | | | | | | | | | | drawBitmap. R=senorblanco@chromium.org, robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/99203011 git-svn-id: http://skia.googlecode.com/svn/trunk@12687 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
* Fix some presubmit warnings.Gravatar tfarina@chromium.org2013-12-14
| | | | | | | | | | | | | | | | | | | | | | | | I found this while running a modified version of v8's tools/presubmit.py script. samplecode/SampleImage.cpp does not end with a single new line. samplecode/SampleImageDir.cpp does not end with a single new line. src/ports/SkFontHost_sandbox_none.cpp does not end with a single new line. tests/FlatDataTest.cpp does not end with a single new line. tests/ImageCacheTest.cpp has trailing whitespaces in line 31. * Removed three empty files. * Add single new line to FlatDataTest.cpp * Removed trailing whitespace in ImageCacheTest.cpp BUG=None TEST=None R=bsalomon@google.com TBR=bsalomon@google.com Review URL: https://codereview.chromium.org/111503008 git-svn-id: http://skia.googlecode.com/svn/trunk@12684 2bbb7eff-a529-9590-31e7-b0007b416f81
* Use SkScalar when aligning glyphs in user space.Gravatar bungeman@google.com2013-12-13
| | | | | | | | | | | | Drawing text from paths is done in user space and not in device space. All operations in user space should be performed with SkScalars. BUG=327031 R=reed@google.com Review URL: https://codereview.chromium.org/113123005 git-svn-id: http://skia.googlecode.com/svn/trunk@12682 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
* 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
* Allow 0-width SkBitmap in setConfig.Gravatar halcanary@google.com2013-12-13
| | | | | | | | | | | | | | Previously, SkBitmap::setConfig would allow zero height, but not zero width. This is changed for consistancy. A unit test was added. BUG= R=reed@google.com, scroggo@google.com Review URL: https://codereview.chromium.org/111953004 git-svn-id: http://skia.googlecode.com/svn/trunk@12673 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
* Mac 10.6 compiler fix for r12665 (Remove duplicate impl for SkImageInfo ↵Gravatar robertphillips@google.com2013-12-13
| | | | | | | | | | flattening) https://codereview.chromium.org/101913006/ git-svn-id: http://skia.googlecode.com/svn/trunk@12666 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
* be sure to unlock the discardablememory before deleting itGravatar reed@google.com2013-12-12
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/114673002 git-svn-id: http://skia.googlecode.com/svn/trunk@12658 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
* Fixed a displacement issueGravatar commit-bot@chromium.org2013-12-12
| | | | | | | | | | | | | The displacement filter was assuming that both inputs were of the same size, which is true in blink, but not necessarily in a compromised stream. BUG=327372 R=senorblanco@chromium.org, senorblanco@google.com, reed@google.com, fmalita@chromium.org, fmalita@google.com, sugoi@google.com Author: sugoi@chromium.org Review URL: https://codereview.chromium.org/101623007 git-svn-id: http://skia.googlecode.com/svn/trunk@12655 2bbb7eff-a529-9590-31e7-b0007b416f81
* detect if the scaledimagecache returns a purged bitmapGravatar reed@google.com2013-12-12
| | | | | | | | | BUG= R=scroggo@google.com Review URL: https://codereview.chromium.org/110383005 git-svn-id: http://skia.googlecode.com/svn/trunk@12654 2bbb7eff-a529-9590-31e7-b0007b416f81
* Bounds fixes for SkXfermodeImageFilter:Gravatar senorblanco@chromium.org2013-12-12
| | | | | | | | | | | | | | 1) Change the default bounds to the union of the foreground and background bounds. 2) Use a canvas translate instead of manually offsetting the foreground and background bounds by the union. 3) Apply the transfer mode to all pixels, including those outside the foreground rect by using a difference clip. Covered by the offset test cases in the xfermodeimagefilter GM (will need rebaselines). R=reed@google.com Review URL: https://codereview.chromium.org/112683004 git-svn-id: http://skia.googlecode.com/svn/trunk@12652 2bbb7eff-a529-9590-31e7-b0007b416f81
* Preventing division by 0Gravatar commit-bot@chromium.org2013-12-12
| | | | | | | | | | | | | | | I did bench tests and I can't compute the denom before the if condition without taking a hit. After a few quick tests on my linux desktop, computing the 1st denom costs 6ms, the 2nd one 5ms and both together cost 9ms. The reason for this is that both if conditions here are exceptions and are expected to be false, so the denom computation should be skipped, if possible. The bench test I ran was : out/Release/bench --match Xfermode_Hue --config 8888 --minMs 1000 BUG= R=senorblanco@chromium.org, senorblanco@google.com, reed@google.com, sugoi@google.com Author: sugoi@chromium.org Review URL: https://codereview.chromium.org/114173002 git-svn-id: http://skia.googlecode.com/svn/trunk@12649 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
* [PDF] Fix font width generation when glyph 0 is used.Gravatar commit-bot@chromium.org2013-12-11
| | | | | | | | | | | | | Using glyph 0 caused gid 0 to be in the subset list twice, which violated an assumption in the code. Added an assert for the assumption and updated the code to not insert gid 0 into the subset list twice. BUG=skia:1889 R=bungeman@google.com Author: vandebo@chromium.org Review URL: https://codereview.chromium.org/113093004 git-svn-id: http://skia.googlecode.com/svn/trunk@12632 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
* [PDF] Fix bug in ToUnicode table generation for Type 3 fonts.Gravatar commit-bot@chromium.org2013-12-11
| | | | | | | | | | | | | | True glyphIDs where being using in the Type3 ToUnicode table instead of IDs of 1-255. This causes poppler to complain about each entry. BUG:skia:1565 R=bungeman@google.com Author: vandebo@chromium.org Review URL: https://codereview.chromium.org/112053005 git-svn-id: http://skia.googlecode.com/svn/trunk@12625 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
* be more careful about OOB source pixels in the scanline rescaler, andGravatar commit-bot@chromium.org2013-12-11
| | | | | | | | | | | | | less certain about why the standalone scaler might have faileds BUG= R=reed@google.com Author: humper@google.com Review URL: https://codereview.chromium.org/100473011 git-svn-id: http://skia.googlecode.com/svn/trunk@12619 2bbb7eff-a529-9590-31e7-b0007b416f81
* add more tests for discardable cachesGravatar reed@google.com2013-12-11
| | | | | | | | | BUG= R=halcanary@google.com Review URL: https://codereview.chromium.org/112833003 git-svn-id: http://skia.googlecode.com/svn/trunk@12618 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-12-11
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@12617 2bbb7eff-a529-9590-31e7-b0007b416f81