aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkBlitter_RGB16.cpp
Commit message (Collapse)AuthorAge
* Fix up all the easy virtual ... SK_OVERRIDE cases.Gravatar mtklein2015-01-09
| | | | | | | | | | | | This fixes every case where virtual and SK_OVERRIDE were on the same line, which should be the bulk of cases. We'll have to manually clean up the rest over time unless I level up in regexes. for f in (find . -type f); perl -p -i -e 's/virtual (.*)SK_OVERRIDE/\1SK_OVERRIDE/g' $f; end BUG=skia: Review URL: https://codereview.chromium.org/806653007
* Add SK_OVERRIDE to a few places that are missing it.Gravatar mtklein2014-12-15
| | | | | | | | | | This was done automatically by running clang-modernize -add-override -override-macros. It's not clear to me whether include/ is already clean or I just can't get the tool to work for headers. BUG=skia: Review URL: https://codereview.chromium.org/808463002
* "NULL !=" = NULLGravatar bsalomon2014-09-05
| | | | | | | | R=reed@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/544233002
* MIPS: added optimization for SkRGB16_Opaque_Blitter::blitMaskGravatar djordje.pesut2014-07-14
| | | | | | | | | | gaint is ~30% R=djsollen@google.com Author: djordje.pesut@imgtec.com Review URL: https://codereview.chromium.org/357693002
* 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
* 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
* 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
* Fix broken Android builds due to missing includes for NEON definesGravatar djsollen@google.com2014-03-21
| | | | | | Review URL: https://codereview.chromium.org/208173002 git-svn-id: http://skia.googlecode.com/svn/trunk@13890 2bbb7eff-a529-9590-31e7-b0007b416f81
* Don't use __ARM_HAVE_NEON to detect NEON's presence in SkBlitter_RGB16Gravatar commit-bot@chromium.org2014-03-20
| | | | | | | | | | | | | | | | Replace __ARM_HAVE_NEON by SK_ARM_NEON_IS_ALWAYS. It was the only use of __ARM_HAVE_NEON apart from defining SK_ARM_NEON_IS_ALWAYS. Signed-off-by: Kévin PETIT <kevin.petit@arm.com> BUG=skia: R=djsollen@google.com, mtklein@google.com, halcanary@google.com, reed@google.com Author: kevin.petit@arm.com Review URL: https://codereview.chromium.org/206543002 git-svn-id: http://skia.googlecode.com/svn/trunk@13880 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add a class to allocate small objects w/o extra calls to new.Gravatar commit-bot@chromium.org2014-03-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add SkSmallAllocator, a template for allocating small (as defined by the instantiation) objects without extra calls to new. Add a helper macro to make using it simple. Remove SkTemplatesPriv.h, whose behavior is replaced by SkSmallAllocator. The old SK_PLACEMENT_NEW had the following drawbacks: - Easily confused with SkNEW_PLACEMENT. - Requires passing around lots of void*s along with the storageSize. - Requires using a separate class for deleting it. - We had multiple ways Auto objects for deleting in different places. - It always did a straight heap allocation on Windows, meaning Windows did not get any advantages from the confusing code. The new SkSmallAllocator simplifies things: - It is clear about what it does. - It takes care of the deletion in one place that is automatically handled. Further, the new class can be used to create more than one object. This is in preparation for BUG=skia:1976, for which we would like to create a new object without extra heap allocations. The plan is to create both the blitter and the new object on the stack using the SkSmallAllocator. Add a new test for SkSmallAllocator. SkShader.h: Move the private version of CreateBitmapShader to SkBitmapProcShader (which already has the implementation) and remove the friend class (which was only used to call this private function). This allows SkSmallAllocator to reside in the private src/ directory. SkBitmapProcShader: Move CreateBitmapShader and the macro for the storage size here. With the macro in a (private) header, the (private) headers with function declarations (which now depend on the storage size used) can see the macro. Use SkSmallAllocator in CreateBitmapShader. Change the macro to kBlitterStorageByteCount, since SkSmallAllocator takes a byte count as its template parameter. SkBlitter: Use the SkSmallAllocator. Remove Sk3DShader::fKillProc and SkAutoCallProc. Both of their behaviors have been moved into SkSmallAllocator (SkAutoCallProc was unnecessary anyway, because the only time we ever used it we also called detach(), so its auto behavior never happened). Create the Sk3DShader on the stack, if there's room. Remove the helper version of Choose, which was unused. SmallAllocatorTest: Test for the new class. The rest: Use SkSmallAllocator. BUG=skia:1976 R=reed@google.com, mtklein@google.com Author: scroggo@google.com Review URL: https://codereview.chromium.org/179343005 git-svn-id: http://skia.googlecode.com/svn/trunk@13696 2bbb7eff-a529-9590-31e7-b0007b416f81
* ARM Skia NEON patches - 11 - Blitter_RGB16Gravatar commit-bot@chromium.org2013-08-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Blitter_RGB16: fixes and improvements - fix alpha calculation: it was still using the old version of SkAlpha255To256. 11 more tests pass in gm. - clean a lot the code: the existing code was "a bit" messy with a lot of duplicated hardcoded constants, got rid of all this. - improve speed a little: part of it as a side-effect of the change in the way alpha is calculated but also by grouping loads and stores. One "issue" was present and still remains: the NEON code doesn't give the same result as the black blitter on black. It accounts for dozens of mismatches in gm. Is this considered "not too bad"? Would you be interested in a NEON version of the black blitter? The current comments seem to indicate that the black blitter is here only to give a performance boost when NEON is not presents so I didn't write a NEON version. BUG= R=djsollen@google.com, tomhudson@google.com, reed@google.com Author: kevin.petit.arm@gmail.com Review URL: https://chromiumcodereview.appspot.com/18666005 git-svn-id: http://skia.googlecode.com/svn/trunk@10635 2bbb7eff-a529-9590-31e7-b0007b416f81
* ARM Skia NEON patches - 01 - Simple fixesGravatar commit-bot@chromium.org2013-07-15
| | | | | | | | | | | | | | | | | | | | | | | | This series contains a few fairly non-controversial fixes. Misc: remove dead references to neon 4444 functions Misc: avoid the double _neon_neon suffix in the clamp matrix functions. MAKENAME already adds the _neon suffix Misc: a few stupid / obvious fixes BUG= R=djsollen@google.com Author: kevin.petit.arm@gmail.com Review URL: https://chromiumcodereview.appspot.com/18666004 git-svn-id: http://skia.googlecode.com/svn/trunk@10072 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix an unused variable warning.Gravatar scroggo@google.com2013-03-04
| | | | | | Review URL: https://codereview.chromium.org/12398026 git-svn-id: http://skia.googlecode.com/svn/trunk@7975 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix a bunch of warnings, mainly around rowBytes.Gravatar scroggo@google.com2013-02-25
| | | | | | | | | | | My recent change changed the way SkBitmap::fRowBytes is stored, and parameter/return values referring to rowBytes were changed to type size_t. Change the storage back, and eliminate warnings resulting from returning a size_t. Review URL: https://codereview.appspot.com/7396059 git-svn-id: http://skia.googlecode.com/svn/trunk@7855 2bbb7eff-a529-9590-31e7-b0007b416f81
* Result of running tools/sanitize_source_files.py (which was added in ↵Gravatar rmistry@google.com2012-08-23
| | | | | | | | | https://codereview.appspot.com/6465078/) This CL is part I of IV (I broke down the 1280 files into 4 CLs). Review URL: https://codereview.appspot.com/6485054 git-svn-id: http://skia.googlecode.com/svn/trunk@5262 2bbb7eff-a529-9590-31e7-b0007b416f81
* rename SkMask::getAddr to getAddr8, to match the specificity of the othersGravatar reed@google.com2011-10-18
| | | | | | | | | | e.g. getAddr1, getAddrLCD16, etc. This is to make way for a real getAddr that will compute its pixel-size at runtime git-svn-id: http://skia.googlecode.com/svn/trunk@2487 2bbb7eff-a529-9590-31e7-b0007b416f81
* Automatic update of all copyright notices to reflect new license terms.Gravatar epoger@google.com2011-07-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I have manually examined all of these diffs and restored a few files that seem to require manual adjustment. The following files still need to be modified manually, in a separate CL: android_sample/SampleApp/AndroidManifest.xml android_sample/SampleApp/res/layout/layout.xml android_sample/SampleApp/res/menu/sample.xml android_sample/SampleApp/res/values/strings.xml android_sample/SampleApp/src/com/skia/sampleapp/SampleApp.java android_sample/SampleApp/src/com/skia/sampleapp/SampleView.java experimental/CiCarbonSampleMain.c experimental/CocoaDebugger/main.m experimental/FileReaderApp/main.m experimental/SimpleCocoaApp/main.m experimental/iOSSampleApp/Shared/SkAlertPrompt.h experimental/iOSSampleApp/Shared/SkAlertPrompt.m experimental/iOSSampleApp/SkiOSSampleApp-Base.xcconfig experimental/iOSSampleApp/SkiOSSampleApp-Debug.xcconfig experimental/iOSSampleApp/SkiOSSampleApp-Release.xcconfig gpu/src/android/GrGLDefaultInterface_android.cpp gyp/common.gypi gyp_skia include/ports/SkHarfBuzzFont.h include/views/SkOSWindow_wxwidgets.h make.bat make.py src/opts/memset.arm.S src/opts/memset16_neon.S src/opts/memset32_neon.S src/opts/opts_check_arm.cpp src/ports/SkDebug_brew.cpp src/ports/SkMemory_brew.cpp src/ports/SkOSFile_brew.cpp src/ports/SkXMLParser_empty.cpp src/utils/ios/SkImageDecoder_iOS.mm src/utils/ios/SkOSFile_iOS.mm src/utils/ios/SkStream_NSData.mm tests/FillPathTest.cpp Review URL: http://codereview.appspot.com/4816058 git-svn-id: http://skia.googlecode.com/svn/trunk@1982 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove a few old uses of SK_RESTRICT on references.Gravatar tomhudson@google.com2011-07-12
| | | | | | | | | Conditionally #defines SK_RESTRICT to be __restrict on Win32; this successfully compiles in VS2008. git-svn-id: http://skia.googlecode.com/svn/trunk@1841 2bbb7eff-a529-9590-31e7-b0007b416f81
* Increase compatibility with clang, mostly around SK_RESTRICT.Gravatar tomhudson@google.com2011-06-15
| | | | | | | | Attempting to fix up our use of __restrict__ so Chrome can enable it. git-svn-id: http://skia.googlecode.com/svn/trunk@1597 2bbb7eff-a529-9590-31e7-b0007b416f81
* initial checkin for visualstudio build supportGravatar reed@android.com2009-12-16
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@460 2bbb7eff-a529-9590-31e7-b0007b416f81
* motorola neon patch for blitMask, used in text drawingGravatar reed@android.com2009-10-20
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@397 2bbb7eff-a529-9590-31e7-b0007b416f81
* cache expanded rawcolor16Gravatar reed@android.com2009-10-02
| | | | | | | | | add special blitv for opaque16, as this is called a lot on short segments so any startup overhead makes a difference git-svn-id: http://skia.googlecode.com/svn/trunk@376 2bbb7eff-a529-9590-31e7-b0007b416f81
* move factory for 565 into its own fileGravatar reed@android.com2009-10-02
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@374 2bbb7eff-a529-9590-31e7-b0007b416f81
* expand SkShader's flag kConstInY to 16 and 32 variants, allowing a shaderGravatar reed@android.com2009-08-27
| | | | | | | | | | | | (like gradients) to support predithering. If they do, then they would suppress kConstInY16, since they no longer are const. The blitters now check for each flag separately, so we don't have to give up const-in-Y in the 32bit case, since in that mode we don't care about dithering. git-svn-id: http://skia.googlecode.com/svn/trunk@339 2bbb7eff-a529-9590-31e7-b0007b416f81
* first cut at support for HW-specific blits/etc.Gravatar reed@android.com2009-07-16
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@270 2bbb7eff-a529-9590-31e7-b0007b416f81
* tweaks to 16bit shadersGravatar reed@android.com2009-07-10
| | | | | | | | fix typo-bug in 4444 blend case git-svn-id: http://skia.googlecode.com/svn/trunk@265 2bbb7eff-a529-9590-31e7-b0007b416f81
* speedup 16bit shaders in the blitRect caseGravatar reed@android.com2009-07-10
| | | | | | | | faster 32->16 blend by using the expand_16 intermediate format git-svn-id: http://skia.googlecode.com/svn/trunk@263 2bbb7eff-a529-9590-31e7-b0007b416f81
* ws fixesGravatar reed@android.com2009-06-15
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@217 2bbb7eff-a529-9590-31e7-b0007b416f81
* create separate opaque version of rgb16 blitterGravatar reed@android.com2009-06-15
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@216 2bbb7eff-a529-9590-31e7-b0007b416f81
* add shader flag kConstInY_FlagGravatar reed@android.com2009-06-12
| | | | | | | | | | | this signals blitters that the shader will return the same results for a given x value, independent of y. Useful inside blitRect(), where it can cache the first call to shadeSpan() and reuse it on all subsequent scans. Works with (non-rotated) linear-gradients, and Nx1 bitmaps. git-svn-id: http://skia.googlecode.com/svn/trunk@214 2bbb7eff-a529-9590-31e7-b0007b416f81
* grab from latest androidGravatar reed@android.com2008-12-17
git-svn-id: http://skia.googlecode.com/svn/trunk@27 2bbb7eff-a529-9590-31e7-b0007b416f81