aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkBitmapProcState.cpp
Commit message (Collapse)AuthorAge
* Refactor bitmap scaler to make it easier to migrate rest of chrome to use itGravatar humper2014-06-27
| | | | | | | | | | | | | | Previously, the set of platform-specific function pointers to do fast convolution (e.g., neon, SSE) were passed in a structure to the scaler. I refactored this so that the scaler fills in these function pointers after it's called, so the caller doesn't have to worry about it. R=mtklein@google.com TBR=mtklein NOTRY=True Author: humper@google.com Review URL: https://codereview.chromium.org/354193002
* Remove SK_IGNORE_CORRECT_HIGH_QUALITY_IMAGE_SCALEGravatar fmalita2014-06-10
| | | | | | | | | | Blink has been rebased. R=humper@google.com Author: fmalita@chromium.org Review URL: https://codereview.chromium.org/323093002
* replace config() with colorType()Gravatar commit-bot@chromium.org2014-05-29
| | | | | | | | | | | BUG=skia: R=robertphillips@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/303543009 git-svn-id: http://skia.googlecode.com/svn/trunk@14959 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make image scaling have floating point scales. Third attempt to land thisGravatar commit-bot@chromium.org2014-05-28
| | | | | | | | | | | | | | | | due to some struggles with the CQ. Original CL here: https://codereview.chromium.org/298243003/ BUG= R=bsalomon@google.com, epoger@google.com TBR=bsalomon, epoger Author: humper@google.com Review URL: https://codereview.chromium.org/300113008 git-svn-id: http://skia.googlecode.com/svn/trunk@14920 2bbb7eff-a529-9590-31e7-b0007b416f81
* Manual SVN revert of https://code.google.com/p/skia/source/detail?r=14905Gravatar epoger@google.com2014-05-27
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@14907 2bbb7eff-a529-9590-31e7-b0007b416f81
* floating point scale factors for imagesGravatar commit-bot@chromium.org2014-05-27
| | | | | | | | | | | | | | New version of https://codereview.chromium.org/298243003/ made to deal with binary file being lost. BUG= TBR=bsalomon NOTRY=true Author: humper@google.com Review URL: https://codereview.chromium.org/307553005 git-svn-id: http://skia.googlecode.com/svn/trunk@14905 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert of Revert of Extract most of the mutable state of SkShader into a ↵Gravatar commit-bot@chromium.org2014-04-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | separate Context object. (https://codereview.chromium.org/249643002/) Reason for revert: Chromium side change landed along side DEPS roll that includes r14323. Original issue's description: > Revert of Extract most of the mutable state of SkShader into a separate Context object. (https://codereview.chromium.org/207683004/) > > Reason for revert: > This is blocking the DEPS roll into Chromium. Failures can be seen here: > > http://build.chromium.org/p/tryserver.chromium/builders/android_dbg/builds/174333 > > Original issue's description: > > Extract most of the mutable state of SkShader into a separate Context object. > > > > SkShader currently stores some state during draw calls via setContext(...). > > Move that mutable state into a separate SkShader::Context class that is > > constructed on demand for the duration of the draw. > > > > Calls to setContext() are replaced with createContext() which returns a context > > corresponding to the shader object or NULL if the parameters to createContext > > are invalid. > > > > TEST=out/Debug/dm > > BUG=skia:1976 > > > > Committed: http://code.google.com/p/skia/source/detail?r=14216 > > > > Committed: http://code.google.com/p/skia/source/detail?r=14323 > > TBR=scroggo@google.com,skyostil@chromium.org,tomhudson@chromium.org,senorblanco@chromium.org,reed@google.com,bungeman@google.com,dominikg@chromium.org > NOTREECHECKS=true > NOTRY=true > BUG=skia:1976 > > Committed: http://code.google.com/p/skia/source/detail?r=14326 R=scroggo@google.com, skyostil@chromium.org, tomhudson@chromium.org, senorblanco@chromium.org, reed@google.com, bungeman@google.com, dominikg@chromium.org TBR=bungeman@google.com, dominikg@chromium.org, reed@google.com, scroggo@google.com, senorblanco@chromium.org, skyostil@chromium.org, tomhudson@chromium.org NOTREECHECKS=true NOTRY=true BUG=skia:1976 Author: bsalomon@google.com Review URL: https://codereview.chromium.org/246403013 git-svn-id: http://skia.googlecode.com/svn/trunk@14328 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert of Extract most of the mutable state of SkShader into a separate ↵Gravatar commit-bot@chromium.org2014-04-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Context object. (https://codereview.chromium.org/207683004/) Reason for revert: This is blocking the DEPS roll into Chromium. Failures can be seen here: http://build.chromium.org/p/tryserver.chromium/builders/android_dbg/builds/174333 Original issue's description: > Extract most of the mutable state of SkShader into a separate Context object. > > SkShader currently stores some state during draw calls via setContext(...). > Move that mutable state into a separate SkShader::Context class that is > constructed on demand for the duration of the draw. > > Calls to setContext() are replaced with createContext() which returns a context > corresponding to the shader object or NULL if the parameters to createContext > are invalid. > > TEST=out/Debug/dm > BUG=skia:1976 > > Committed: http://code.google.com/p/skia/source/detail?r=14216 > > Committed: http://code.google.com/p/skia/source/detail?r=14323 R=scroggo@google.com, skyostil@chromium.org, tomhudson@chromium.org, senorblanco@chromium.org, reed@google.com, bungeman@google.com, dominikg@chromium.org TBR=bungeman@google.com, dominikg@chromium.org, reed@google.com, scroggo@google.com, senorblanco@chromium.org, skyostil@chromium.org, tomhudson@chromium.org NOTREECHECKS=true NOTRY=true BUG=skia:1976 Author: bsalomon@google.com Review URL: https://codereview.chromium.org/249643002 git-svn-id: http://skia.googlecode.com/svn/trunk@14326 2bbb7eff-a529-9590-31e7-b0007b416f81
* Extract most of the mutable state of SkShader into a separate Context object.Gravatar commit-bot@chromium.org2014-04-23
| | | | | | | | | | | | | | | | | | | | | | | SkShader currently stores some state during draw calls via setContext(...). Move that mutable state into a separate SkShader::Context class that is constructed on demand for the duration of the draw. Calls to setContext() are replaced with createContext() which returns a context corresponding to the shader object or NULL if the parameters to createContext are invalid. TEST=out/Debug/dm BUG=skia:1976 Committed: http://code.google.com/p/skia/source/detail?r=14216 R=scroggo@google.com, skyostil@chromium.org, tomhudson@chromium.org, senorblanco@chromium.org, reed@google.com, bungeman@google.com Author: dominikg@chromium.org Review URL: https://codereview.chromium.org/207683004 git-svn-id: http://skia.googlecode.com/svn/trunk@14323 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert of Extract most of the mutable state of SkShader into a separate ↵Gravatar commit-bot@chromium.org2014-04-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Context object. (https://codereview.chromium.org/207683004/) Reason for revert: Causing memory leaks in Chromium. Original issue's description: > Extract most of the mutable state of SkShader into a separate Context object. > > SkShader currently stores some state during draw calls via setContext(...). > Move that mutable state into a separate SkShader::Context class that is > constructed on demand for the duration of the draw. > > Calls to setContext() are replaced with createContext() which returns a context > corresponding to the shader object or NULL if the parameters to createContext > are invalid. > > TEST=out/Debug/dm > BUG=skia:1976 > > Committed: http://code.google.com/p/skia/source/detail?r=14216 R=scroggo@google.com, skyostil@chromium.org, tomhudson@chromium.org, senorblanco@chromium.org, reed@google.com, dominikg@chromium.org TBR=dominikg@chromium.org, reed@google.com, scroggo@google.com, senorblanco@chromium.org, skyostil@chromium.org, tomhudson@chromium.org NOTREECHECKS=true NOTRY=true BUG=skia:1976 Author: bungeman@google.com Review URL: https://codereview.chromium.org/241283003 git-svn-id: http://skia.googlecode.com/svn/trunk@14247 2bbb7eff-a529-9590-31e7-b0007b416f81
* add some asserts for mipmaps, and cleanup fFilterLevel if mipping failedGravatar commit-bot@chromium.org2014-04-17
| | | | | | | | | | | BUG=skia: R=scroggo@google.com, humper@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/240633003 git-svn-id: http://skia.googlecode.com/svn/trunk@14241 2bbb7eff-a529-9590-31e7-b0007b416f81
* Extract most of the mutable state of SkShader into a separate Context object.Gravatar commit-bot@chromium.org2014-04-16
| | | | | | | | | | | | | | | | | | | | SkShader currently stores some state during draw calls via setContext(...). Move that mutable state into a separate SkShader::Context class that is constructed on demand for the duration of the draw. Calls to setContext() are replaced with createContext() which returns a context corresponding to the shader object or NULL if the parameters to createContext are invalid. TEST=out/Debug/dm BUG=skia:1976 R=scroggo@google.com, skyostil@chromium.org, tomhudson@chromium.org, senorblanco@chromium.org, reed@google.com, bungeman@google.com Author: dominikg@chromium.org Review URL: https://codereview.chromium.org/207683004 git-svn-id: http://skia.googlecode.com/svn/trunk@14216 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
* 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
* support scaledimagecache instantiable using discardablememoryGravatar reed@google.com2013-12-09
| | | | | | | | | | | | Add this to your build/gyp system to use discardable instead of malloc+budget #define SK_USE_DISCARDABLE_SCALEDIMAGECACHE R=halcanary@google.com Review URL: https://codereview.chromium.org/105933003 git-svn-id: http://skia.googlecode.com/svn/trunk@12588 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
* if fBitmap is still NULL, return falseGravatar reed@google.com2013-10-22
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@11908 2bbb7eff-a529-9590-31e7-b0007b416f81
* catch the other case where we need to see if fScaledBitmap.lockPixels() ↵Gravatar reed@google.com2013-10-16
| | | | | | | | | | | | might have failed 2nd-half clone of https://codereview.chromium.org/26273006/ BUG=chromium:295895 Review URL: https://codereview.chromium.org/26973006 git-svn-id: http://skia.googlecode.com/svn/trunk@11825 2bbb7eff-a529-9590-31e7-b0007b416f81
* check of fScaledBitmap failed to lockGravatar reed@google.com2013-10-16
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/27530003 git-svn-id: http://skia.googlecode.com/svn/trunk@11816 2bbb7eff-a529-9590-31e7-b0007b416f81
* return false if we can't scale, to force us to try to lock the original and ↵Gravatar reed@google.com2013-10-15
| | | | | | | | | | | then proceed BUG= R=wangxianzhu@chromium.org Review URL: https://codereview.chromium.org/27382002 git-svn-id: http://skia.googlecode.com/svn/trunk@11789 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-09-17
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@11309 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert 11247, 11250, 11251, 11257, and 11279 to unblock DEPS roll ↵Gravatar robertphillips@google.com2013-09-16
| | | | | | | | | | | | | | (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
* Revert the revert of 11247, 11250, 11251 and 11279 (Chrome already relies on ↵Gravatar robertphillips@google.com2013-09-16
| | | | | | changes in r11247) git-svn-id: http://skia.googlecode.com/svn/trunk@11287 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert 11247, 11250, 11251 and 11279 to unblock DEPS roll ↵Gravatar robertphillips@google.com2013-09-16
| | | | | | | | | | | | | (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
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-09-14
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@11279 2bbb7eff-a529-9590-31e7-b0007b416f81
* start to remove lockPixels from bitmapshaderGravatar reed@google.com2013-09-13
| | | | | | | | | 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
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-09-10
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@11176 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove SK_IGNORE_IMAGE_PRESCALE flag (no longer used)Gravatar reed@google.com2013-09-09
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@11153 2bbb7eff-a529-9590-31e7-b0007b416f81
* move decision to smash invmatrix into unit-space (for faster repeat/mirror ↵Gravatar reed@google.com2013-09-09
| | | | | | | | | | | to after the call to possiblyScaleImage(), so we don't confuse that code with a munged matrix. Fixes the scaled_tilemodes gm for HQ BUG= R=humper@google.com Review URL: https://codereview.chromium.org/23470005 git-svn-id: http://skia.googlecode.com/svn/trunk@11152 2bbb7eff-a529-9590-31e7-b0007b416f81
* move platformConvolutionProcs() call to right before we need itGravatar reed@google.com2013-09-06
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@11127 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove fConvolutionProcs from State, and just use it locallyGravatar reed@google.com2013-09-05
| | | | | | | | | BUG= R=humper@google.com Review URL: https://codereview.chromium.org/23796005 git-svn-id: http://skia.googlecode.com/svn/trunk@11118 2bbb7eff-a529-9590-31e7-b0007b416f81
* simplify making translate only invmatrixGravatar reed@google.com2013-09-05
| | | | | | | | | BUG= R=humper@google.com Review URL: https://codereview.chromium.org/23875010 git-svn-id: http://skia.googlecode.com/svn/trunk@11114 2bbb7eff-a529-9590-31e7-b0007b416f81
* Implement highQualityFilter16 so GM doesn't crash when you give it resources.Gravatar mtklein@google.com2013-08-26
| | | | | | | | | | | | | | Testing consisted of: 1) ninja -C out/Debug gm && gm -i resources --match mandrill_512 -w /tmp/gm 2) notice that gm didn't segfault 3) look in /tmp/gm and see a bunch of handsome monkeys BUG=skia:1517 R=humper@google.com Review URL: https://codereview.chromium.org/22801016 git-svn-id: http://skia.googlecode.com/svn/trunk@10917 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-07-25
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@10340 2bbb7eff-a529-9590-31e7-b0007b416f81
* free cache in destructor, in case endContext was not called. change Resize ↵Gravatar reed@google.com2013-07-24
| | | | | | | | | | | to return bool indicating success. BUG= R=humper@google.com Review URL: https://codereview.chromium.org/20102002 git-svn-id: http://skia.googlecode.com/svn/trunk@10335 2bbb7eff-a529-9590-31e7-b0007b416f81
* add mipmaps to scaledimagecacheGravatar reed@google.com2013-07-24
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/19789016 git-svn-id: http://skia.googlecode.com/svn/trunk@10305 2bbb7eff-a529-9590-31e7-b0007b416f81
* Reverting r10251 (Implement crop rect for SkImageFilter) due to ↵Gravatar robertphillips@google.com2013-07-24
| | | | | | Chromium-side unit test failures git-svn-id: http://skia.googlecode.com/svn/trunk@10304 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-07-24
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@10299 2bbb7eff-a529-9590-31e7-b0007b416f81
* add scaledimagecacheGravatar reed@google.com2013-07-23
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/20005003 git-svn-id: http://skia.googlecode.com/svn/trunk@10286 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-07-23
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@10254 2bbb7eff-a529-9590-31e7-b0007b416f81
* stop using bitmap-filter flags outside of paint itself, as a step towards ↵Gravatar reed@google.com2013-07-22
| | | | | | | | | | really changing them into an enum BUG= Review URL: https://codereview.chromium.org/19825002 git-svn-id: http://skia.googlecode.com/svn/trunk@10240 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-07-20
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@10223 2bbb7eff-a529-9590-31e7-b0007b416f81
* The image resampling code has been transplanted from Chrome; it's incredibly ↵Gravatar humper@google.com2013-07-19
| | | | | | | | | | | | | | | fast. We've tested this CL plumbed into Chrome and done benchmarking with excellent results. This CL can land independent of any Chrome changes; it's completely internal to skia. BUG= R=reed@google.com Review URL: https://codereview.chromium.org/19335002 git-svn-id: http://skia.googlecode.com/svn/trunk@10206 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix trivial matrix computationGravatar humper@google.com2013-07-14
| | | | | | | | | | | | | | Revert "Reverted 10056-10059" This reverts commit bab4ebcaa7270c3b866a8e10917c39b055ebd51a. Fix broken GM test, reintroduce image scaling. BUG= Review URL: https://codereview.chromium.org/18721006 git-svn-id: http://skia.googlecode.com/svn/trunk@10066 2bbb7eff-a529-9590-31e7-b0007b416f81
* Reverted 10056-10059Gravatar robertphillips@google.com2013-07-13
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@10060 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-07-13
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@10059 2bbb7eff-a529-9590-31e7-b0007b416f81
* Working plumb of image scaling:Gravatar humper@google.com2013-07-12
| | | | | | | | | | | | | | | | 1) always generate mipmaps if we detect that we are downsampling. 2) pre-scale the image if we detect that we are upsampling (currently valid for scale+translate only) 3) A few miscellaneous bug fixes related to image scaling. Still need SSE/Neon versions of these image scalers. BUG= R=bsalomon@google.com, robertphillips@google.com Review URL: https://codereview.chromium.org/18978014 git-svn-id: http://skia.googlecode.com/svn/trunk@10056 2bbb7eff-a529-9590-31e7-b0007b416f81
* New bitmap filter checkin; this time with less build breakageGravatar humper@google.com2013-07-09
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/18942002 git-svn-id: http://skia.googlecode.com/svn/trunk@9944 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "More general image filter interface; tested implementation of ↵Gravatar humper@google.com2013-07-09
| | | | | | | | standalone" This reverts commit 4df3e8b079e019af5f60c13e7e6ec6589663962a. git-svn-id: http://skia.googlecode.com/svn/trunk@9937 2bbb7eff-a529-9590-31e7-b0007b416f81
* More general image filter interface; tested implementation of standaloneGravatar humper@google.com2013-07-09
| | | | | | | | | | | | image scaler (not yet plumbed). High quality downsampler. Fast SSE resampler. BUG= R=reed@google.com Review URL: https://codereview.chromium.org/17381008 git-svn-id: http://skia.googlecode.com/svn/trunk@9936 2bbb7eff-a529-9590-31e7-b0007b416f81