aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/DrawBitmapRectTest.cpp
Commit message (Collapse)AuthorAge
...
* hide discardable factory from public imagegenerator apiGravatar commit-bot@chromium.org2014-05-27
| | | | | | | | | | | BUG=skia: R=halcanary@google.com, scroggo@google.com, djsollen@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/295243006 git-svn-id: http://skia.googlecode.com/svn/trunk@14889 2bbb7eff-a529-9590-31e7-b0007b416f81
* Move SkShader::fLocalMatrix into SkShader constructor.Gravatar commit-bot@chromium.org2014-04-28
| | | | | | | | | | | | | | | | As a first step towards removing SkShader::setLocalMatrix, which will make SkShader thread-safe, remove calls to setLocalMatrix that happen immediately after the shader is being created. Instead, pass the matrix into the constructor or factory method. BUG=skia:1976 R=scroggo@google.com, reed@google.com, skyostil@google.com, mtklein@google.com Author: dominikg@chromium.org Review URL: https://codereview.chromium.org/245963010 git-svn-id: http://skia.googlecode.com/svn/trunk@14401 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert of Revert of Rename kPMColor_SkColorType to kN32_SkColorType. ↵Gravatar commit-bot@chromium.org2014-04-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/234243002/) Reason for revert: Want to reland the original CL. Original issue's description: > Revert of Rename kPMColor_SkColorType to kN32_SkColorType. (https://codereview.chromium.org/227433009/) > > Reason for revert: > breaking the Chrome deps roll. > http://build.chromium.org/p/chromium.linux/builders/Linux%20GN%20%28dbg%29/builds/839/steps/compile/logs/stdio > > Original issue's description: > > Rename kPMColor_SkColorType to kN32_SkColorType. > > > > The new name better represents what this flag means. > > > > BUG=skia:2384 > > > > Committed: http://code.google.com/p/skia/source/detail?r=14117 > > TBR=reed@google.com,scroggo@google.com > NOTREECHECKS=true > NOTRY=true > BUG=skia:2384 > > Committed: http://code.google.com/p/skia/source/detail?r=14144 R=reed@google.com, bensong@google.com TBR=bensong@google.com, reed@google.com NOTREECHECKS=true NOTRY=true BUG=skia:2384 Author: scroggo@google.com Review URL: https://codereview.chromium.org/235523003 git-svn-id: http://skia.googlecode.com/svn/trunk@14156 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert of Rename kPMColor_SkColorType to kN32_SkColorType. ↵Gravatar commit-bot@chromium.org2014-04-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/227433009/) Reason for revert: Chrome's side of define changes not easy to figure out quickly. Reverting this for DEPS roll for now. Original issue's description: > Rename kPMColor_SkColorType to kN32_SkColorType. > > The new name better represents what this flag means. > > BUG=skia:2384 > > Committed: http://code.google.com/p/skia/source/detail?r=14117 R=reed@google.com, scroggo@google.com TBR=reed@google.com, scroggo@google.com NOTREECHECKS=true NOTRY=true BUG=skia:2384 Author: bensong@google.com Review URL: https://codereview.chromium.org/234833003 git-svn-id: http://skia.googlecode.com/svn/trunk@14149 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert of Revert of Rename kPMColor_SkColorType to kN32_SkColorType. ↵Gravatar commit-bot@chromium.org2014-04-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/234243002/) Reason for revert: fixes on the chrome side are landing (brettw), keep fingers crossed. Original issue's description: > Revert of Rename kPMColor_SkColorType to kN32_SkColorType. (https://codereview.chromium.org/227433009/) > > Reason for revert: > breaking the Chrome deps roll. > http://build.chromium.org/p/chromium.linux/builders/Linux%20GN%20%28dbg%29/builds/839/steps/compile/logs/stdio > > Original issue's description: > > Rename kPMColor_SkColorType to kN32_SkColorType. > > > > The new name better represents what this flag means. > > > > BUG=skia:2384 > > > > Committed: http://code.google.com/p/skia/source/detail?r=14117 > > TBR=reed@google.com,scroggo@google.com > NOTREECHECKS=true > NOTRY=true > BUG=skia:2384 > > Committed: http://code.google.com/p/skia/source/detail?r=14144 R=reed@google.com, scroggo@google.com TBR=reed@google.com, scroggo@google.com NOTREECHECKS=true NOTRY=true BUG=skia:2384 Author: bensong@google.com Review URL: https://codereview.chromium.org/233813004 git-svn-id: http://skia.googlecode.com/svn/trunk@14145 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert of Rename kPMColor_SkColorType to kN32_SkColorType. ↵Gravatar commit-bot@chromium.org2014-04-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/227433009/) Reason for revert: breaking the Chrome deps roll. http://build.chromium.org/p/chromium.linux/builders/Linux%20GN%20%28dbg%29/builds/839/steps/compile/logs/stdio Original issue's description: > Rename kPMColor_SkColorType to kN32_SkColorType. > > The new name better represents what this flag means. > > BUG=skia:2384 > > Committed: http://code.google.com/p/skia/source/detail?r=14117 R=reed@google.com, scroggo@google.com TBR=reed@google.com, scroggo@google.com NOTREECHECKS=true NOTRY=true BUG=skia:2384 Author: bensong@google.com Review URL: https://codereview.chromium.org/234243002 git-svn-id: http://skia.googlecode.com/svn/trunk@14144 2bbb7eff-a529-9590-31e7-b0007b416f81
* Rename kPMColor_SkColorType to kN32_SkColorType.Gravatar commit-bot@chromium.org2014-04-09
| | | | | | | | | | | | | The new name better represents what this flag means. BUG=skia:2384 R=reed@google.com Author: scroggo@google.com Review URL: https://codereview.chromium.org/227433009 git-svn-id: http://skia.googlecode.com/svn/trunk@14117 2bbb7eff-a529-9590-31e7-b0007b416f81
* SkDiscardableMemoryPool to abstract classGravatar commit-bot@chromium.org2014-04-04
| | | | | | | | | | | | Motivation - we want to keep our public headers small. R=scroggo@google.com, reed@google.com Author: halcanary@google.com Review URL: https://codereview.chromium.org/223403012 git-svn-id: http://skia.googlecode.com/svn/trunk@14063 2bbb7eff-a529-9590-31e7-b0007b416f81
* replace setConfig+allocPixels with alloc-or-install-pixelsGravatar commit-bot@chromium.org2014-02-13
| | | | | | | | | | | BUG=skia: R=scroggo@google.com, halcanary@google.com, reed@google.com Author: reed@chromium.org Review URL: https://codereview.chromium.org/164203003 git-svn-id: http://skia.googlecode.com/svn/trunk@13442 2bbb7eff-a529-9590-31e7-b0007b416f81
* Cleanup: Sanitize the order of includes under tests/Gravatar tfarina@chromium.org2014-01-24
| | | | | | | | | | | | | | | | Initially this was to make sure Test.h appeared after the Sk*.h includes. Patch generated by the following command line: $ ~/chromium/src/tools/sort-headers.py tests/*.cpp BUG=None TEST=tests R=robertphillips@google.com Review URL: https://codereview.chromium.org/145313004 git-svn-id: http://skia.googlecode.com/svn/trunk@13177 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove unnamed namespace usage from tests/Gravatar tfarina@chromium.org2014-01-21
| | | | | | | | | | | | | Skia preference is to use 'static' keyword rather than use unnamed namespace. BUG=None TEST=tests R=robertphillips@google.com, bsalomon@google.com Review URL: https://codereview.chromium.org/132403008 git-svn-id: http://skia.googlecode.com/svn/trunk@13138 2bbb7eff-a529-9590-31e7-b0007b416f81
* Move macros from TestClassDef.h to Test.hGravatar commit-bot@chromium.org2014-01-14
| | | | | | | | | | | | | | Motivation: those macros don't make any sense without the definitions in Test.h. BUG= R=mtklein@google.com Author: halcanary@google.com Review URL: https://codereview.chromium.org/138563004 git-svn-id: http://skia.googlecode.com/svn/trunk@13074 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
* Use DEFINE_TESTCLASS_SHORT macro in tests.Gravatar tfarina@chromium.org2013-12-12
| | | | | | | | | | | | | The three version of DEFINE_TESTCLASS macro is deprecated and thus just use the simple, short one. BUG=None TEST=out/Debug/tests R=mtklein@google.com, bsalomon@google.com, robertphillips@google.com Review URL: https://codereview.chromium.org/100113004 git-svn-id: http://skia.googlecode.com/svn/trunk@12653 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
* 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
* PixelRef now returns (nearly) everything that is currently in SkBitmap. The ↵Gravatar reed@google.com2013-12-06
| | | | | | | | | | 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. R=mtklein@google.com, scroggo@google.com Review URL: https://codereview.chromium.org/68973005 git-svn-id: http://skia.googlecode.com/svn/trunk@12537 2bbb7eff-a529-9590-31e7-b0007b416f81
* Big Cleanup: SkBitmapFactory, SkLazyPixelRef, SkImageCacheGravatar halcanary@google.com2013-12-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removed SkBitmapFactory since no clients were using it. New cache selection mechanism can simply pass a SkDiscardableMemory::Factory into the SkDiscardablePixelRef if non-default SkDiscardableMemory should be used. Removed BitmapFactoryTest. SkDiscardableMemory::Factory interface. Android will need this functionality in the future inside their BitmapFactory. Removed SkLazyPixelRef, since it's functionality is now subsumed into SkDiscardablePixelRef. Removed LazyPixelRef test. Modified SkDiscardablePixelRef to optionally allow it to use a SkDiscardableMemory::Factory. This tiny change makes it a replacement for SkLazyPixelRef. This functioanlity is also necessary for moving Android over to SkDiscardablePixelRef from SkImageRef in a later CL. Added a test for this. SkDecodingImageGenerator::Install can optionally pass a factory in to SkDiscardablePixelRef. Removed SkImageCache, SkLruImageCache, and SkPurgeableImageCache. This functionality can be handled much more cleanly by SkDiscardableMemory. New SkDiscardableMemoryPool class to replace SkLruImageCache. In a later CL, we will replace SkImageRef_GlobalPool (used by android) as well. This is a concrete implementation of SkDiscardableMemory::Factory. Added a test for this. modified gm/factory.cpp to remove dependnce on SkBitmapFactory + SkLruImageCache. Now uses SkDecodingImageGenerator + SkDiscardablePixelRef + SkDiscardableMemoryPool. SkImageDecoder::Target replaces SkBitmapFactory::Target. The DecodeMemoryToTarget function may disappear in the future. Moved SkLazyCachingPixelRef::DecodeProc replaces SkBitmapFactory::DecodeProc. This is a short term change, since another CL changes SkLazyCachingPixelRef to use SkImageGenerator instead of DecodeProc. Modified DrawBitmapRectTest to use SkDiscardablePixelRef instead of SkLazyPixelRef. tools/LazyDecodeBitmap.cpp now uses SkDecodingImageGenerator + SkDiscardablePixelRef instead of a SkBitmapFactory. bench_pictures uses the Global SkDiscardableMemoryPool instead of a global gLruImageCache. R=reed@google.com, scroggo@google.com Review URL: https://codereview.chromium.org/103033002 git-svn-id: http://skia.googlecode.com/svn/trunk@12515 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
* move SkImage::ColorType into SkColorTypeGravatar reed@google.com2013-11-01
| | | | | | | | | | | | | | | | | | objective -- move clients over to SkImage tasks - use SkImageInfo instead of SkBitmap::Config - add support for colortables to SkImage - add drawImage to SkCanvas - return SkImage from readPixels This CL works towards the first task R=robertphillips@google.com Review URL: https://codereview.chromium.org/54363008 git-svn-id: http://skia.googlecode.com/svn/trunk@12077 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-10-16
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@11800 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
* test for failing pixelref (crashes, so disable for now)Gravatar reed@google.com2013-10-15
| | | | | | | | | | test for a pixelref that fails to lock BUG= Review URL: https://codereview.chromium.org/26539012 git-svn-id: http://skia.googlecode.com/svn/trunk@11787 2bbb7eff-a529-9590-31e7-b0007b416f81
* Change old PRG to be SkLCGRandom; change new one to SkRandomGravatar commit-bot@chromium.org2013-09-09
| | | | | | | | | | | | | | The goal here is to get people to start using the new random number generator, while leaving the old one in place so we don't have to rebaseline GMs. R=reed@google.com, bsalomon@google.com Author: jvanverth@google.com Review URL: https://chromiumcodereview.appspot.com/23576015 git-svn-id: http://skia.googlecode.com/svn/trunk@11169 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
* Change random number generator for 'tests' to SkMWCRandom. Also removes some Gravatar jvanverth@google.com2013-03-04
| | | | | | | | | | | | | | | | | | | | unused headers and fixes a couple of bugs exposed by changing the random number generator: First, the function SkMatrix::getMaxStretch() had an error where it was testing the square of a number against near-zero. This led to it occasionally taking a cheaper but imprecise path for computing the eigenvalues of the matrix. It's been replaced with a check against the square of SK_ScalarNearlyZero. The second case was a failure in ClipStackTest, where it hit the rare case of a practically empty clip stack (it has a single Union) and we set a tight bounds. The bounds rect doesn't get set by GrReducedClip::ReduceClipStack() in this case, so when it clips the reduced stack it's clipping against garbage, and the resulting regions don't match. The solution is to initialize the tightBounds rect. git-svn-id: http://skia.googlecode.com/svn/trunk@7952 2bbb7eff-a529-9590-31e7-b0007b416f81
* Tests : Unused parameters cleanupGravatar sugoi@google.com2013-02-27
| | | | | | | I removed unused parameters in the tests wherever it was trivial to do so. I'm trying to get the easy ones out of the way before we get into more involved discussions around this. Review URL: https://codereview.appspot.com/7394055 git-svn-id: http://skia.googlecode.com/svn/trunk@7891 2bbb7eff-a529-9590-31e7-b0007b416f81
* use SkTreatAsSprite in SkDraw (with guard for chrome if needed)Gravatar reed@google.com2013-01-03
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@6994 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2013-01-03
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@6982 2bbb7eff-a529-9590-31e7-b0007b416f81
* add unittest for SkTreatAsSpriteGravatar reed@google.com2013-01-02
| | | | | | Review URL: https://codereview.appspot.com/7042044 git-svn-id: http://skia.googlecode.com/svn/trunk@6974 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove #ifdef for scalar==float, since it always isGravatar reed@google.com2013-01-02
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@6964 2bbb7eff-a529-9590-31e7-b0007b416f81
* Defining new color constat for transparent colorGravatar junov@google.com2012-12-06
| | | | | | Review URL: https://codereview.appspot.com/6901044 git-svn-id: http://skia.googlecode.com/svn/trunk@6696 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 II of IV (I broke down the 1280 files into 4 CLs). Review URL: https://codereview.appspot.com/6474054 git-svn-id: http://skia.googlecode.com/svn/trunk@5263 2bbb7eff-a529-9590-31e7-b0007b416f81
* Debug Windows compiler complaint fixesGravatar robertphillips@google.com2012-05-14
| | | | | | | | http://codereview.appspot.com/6208055/ git-svn-id: http://skia.googlecode.com/svn/trunk@3924 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix fixed-point buildGravatar reed@google.com2012-05-03
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3837 2bbb7eff-a529-9590-31e7-b0007b416f81
* We were numerically overflowing our 16bit coordinates that we communicateGravatar reed@google.com2012-05-03
| | | | | | | | | | | | | between these two procs. The fixes was in two parts: 1. Just don't draw bitmaps larger than 64K-1 in width or height, since we can't represent those coordinates in our transport format (yet). 2. Perform an unsigned shift during the calculation, so we don't get sign-extension bleed when packing the two values (X,Y) into our 32bit slot. Review URL: https://codereview.appspot.com/6173046 git-svn-id: http://skia.googlecode.com/svn/trunk@3836 2bbb7eff-a529-9590-31e7-b0007b416f81
* regression unittest for the fix in rev. 3558 (handling nan in antihairpaths)Gravatar reed@google.com2012-03-30
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3562 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
* abort drawing if srcRect is outside of the bitmap boundsGravatar reed@google.com2011-03-17
git-svn-id: http://skia.googlecode.com/svn/trunk@951 2bbb7eff-a529-9590-31e7-b0007b416f81