aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/drawbitmaprect.cpp
Commit message (Collapse)AuthorAge
* Make GMs with persistent SkImages that may be texture backed recreateGravatar Brian Salomon2018-05-24
| | | | | | | | | their images if the underlying GrContext is abandoned. Change-Id: Ibcb6aa25c3bb5a2f705d56c86382295449fe2d7a Reviewed-on: https://skia-review.googlesource.com/129983 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* hide SkBlurMaskFilter and SkBlurQualityGravatar Mike Reed2018-03-14
| | | | | | | | | | SK_SUPPORT_LEGACY_BLURMASKFILTER Bug: skia: Change-Id: Ic3e27e08e6e3cd2ffc1cd13b044e197bebc96236 Reviewed-on: https://skia-review.googlesource.com/113940 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
* remove kRW_LegacyBitmapModeGravatar Cary Clark2018-02-08
| | | | | | | | | | | | | | experiment to see if there are any unknown dependencies on kRW_LegacyBitmapMode R=reed@google.com,fmalita@chromium.org,bungeman@google.com Bug: skia:5615 Change-Id: I2cc578570ac18cd31c3520e1bd801f4a7a669347 Reviewed-on: https://skia-review.googlesource.com/105283 Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Cary Clark <caryclark@google.com>
* use tool_utils to encapsulate checking for recording canvas and makeSurfaceGravatar Mike Reed2018-01-02
| | | | | | | | Bug: skia: Change-Id: Ia93ee09dd213b8d6ad5c18e887add5ff3448c824 Reviewed-on: https://skia-review.googlesource.com/90243 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* add drawString helper to canvasGravatar Cary Clark2017-04-28
| | | | | | | | | | | | | | | | | | Many tests and examples use drawText with a guess of how long the text is in bytes, or a call to strlen(). Add a helper to SkCanvas to simplify these examples. Add another helper for SkString. R=reed@google.com Change-Id: I0204a31e938f065606f08ee7cd9a6b36db791ee2 Reviewed-on: https://skia-review.googlesource.com/13642 Commit-Queue: Cary Clark <caryclark@google.com> Reviewed-by: Cary Clark <caryclark@google.com> Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Cary Clark <caryclark@skia.org>
* hide lockpixels api behind flagGravatar Mike Reed2017-04-17
| | | | | | | | | | | | | | guarded by SK_SUPPORT_OBSOLETE_LOCKPIXELS needs https://codereview.chromium.org/2820873002/# to land first Bug: skia:6481 Change-Id: I1c39902cbf6fe99f622adfa8192733b95f7fea09 Change-Id: I1c39902cbf6fe99f622adfa8192733b95f7fea09 Reviewed-on: https://skia-review.googlesource.com/13580 Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Mike Reed <reed@google.com>
* GM: some header cleanupGravatar Mike Klein2017-03-22
| | | | | | | | | | | | | | gm.h includes sk_tool_utils.h but does not use it. The bulk of this CL makes each gm that uses sk_tool_utils include it. sk_tool_utils.h also provided SkRandom and SkTDArray, so a couple GMs add those headers too. Change-Id: Ieb2a7c542f0ca89c3223f744fc11b0ff37af36c1 Reviewed-on: https://skia-review.googlesource.com/10014 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Herb Derby <herb@google.com>
* Replace a lot of 'static const' with 'constexpr' or 'const'.Gravatar mtklein2016-09-01
| | | | | | | | | | | | | | | | | | | | | | | 'static const' means, there must be at most one of these, and initialize it at compile time if possible or runtime if necessary. This leads to unexpected code execution, and TSAN* will complain about races on the guard variables. Generally 'constexpr' or 'const' are better choices. Neither can cause races: they're either intialized at compile time (constexpr) or intialized each time independently (const). This CL prefers constexpr where possible, and uses const where not. It even prefers constexpr over const where they don't make a difference... I want to have lots of examples of constexpr for people to see and mimic. The scoped-to-class static has nothing to do with any of this, and is not changed. * Not yet on the bots, which use an older TSAN. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2300623005 Review-Url: https://codereview.chromium.org/2300623005
* drawBitmapRect() should not touch the CTM when mask filters are presentGravatar fmalita2016-08-26
| | | | | | | | | | | Blur sigma calculations are CTM dependent, so we cannot take the drawBitmap() fast path in the presence of mask filters. BUG=skia:5682 R=reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2286873002 Review-Url: https://codereview.chromium.org/2286873002
* Stop testing texture-backed bitmaps in drawbitmaprect GMGravatar bsalomon2016-07-14
| | | | | | | BUG=skia:5531 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2148793003 Review-Url: https://codereview.chromium.org/2148793003
* Remove GrWrapTextureInBitmap from public APIGravatar bsalomon2016-07-13
| | | | | | | BUG=skia:5531 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2147053002 Review-Url: https://codereview.chromium.org/2147053002
* SkLeanWindows.h: #include "Windows.h" fewer placesGravatar halcanary2016-06-07
| | | | | | | | | | | | | | | | | | | | | | | | $ git grep -l '<windows.h>' include src include/private/SkLeanWindows.h $ git grep -l SkLeanWindows.h | grep '\.h$' include/ports/SkTypeface_win.h include/utils/win/SkHRESULT.h include/utils/win/SkTScopedComPtr.h include/views/SkEvent.h src/core/SkMathPriv.h src/ports/SkTypeface_win_dw.h src/utils/SkThreadUtils_win.h src/utils/win/SkWGL.h The same for `#include <intrin.h>` that was found in SkMath.h. Those functions that needed it are moved to SkMathPriv.h. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2041943002 CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_chromium_compile_dbg_ng,win_chromium_compile_rel_ng Review-Url: https://codereview.chromium.org/2041943002
* switch maskfilters to sk_spGravatar reed2016-04-04
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1852113003 Review URL: https://codereview.chromium.org/1852113003
* Style bikeshed - remove extraneous whitespaceGravatar halcanary2016-03-29
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1842753002 Review URL: https://codereview.chromium.org/1842753002
* switch surface to sk_spGravatar reed2016-03-23
| | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1817383002 CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot Review URL: https://codereview.chromium.org/1817383002
* update callsites for Make image factoriesGravatar reed2016-03-17
| | | | | | | | | | | not forced yet, as we still have the build-guard. waiting on chrome CL BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1810813003 TBR= Review URL: https://codereview.chromium.org/1810813003
* partial switch over to sp usage of shadersGravatar reed2016-03-09
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1776973003 Review URL: https://codereview.chromium.org/1776973003
* Remove internal calls to SkImage::getTextureGravatar bsalomon2016-02-29
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1744243002 Review URL: https://codereview.chromium.org/1744243002
* Make drawbitmaprect GM use Ganesh-backed bitmaps and imagesGravatar robertphillips2015-09-24
| | | | | | This is left over from trying to repro Android not serializing Ganesh-backed bitmaps Review URL: https://codereview.chromium.org/1353313002
* remove unused (by the outside) SkImage::newSurface, and simplify newImage -> ↵Gravatar reed2015-09-24
| | | | | | | | newSubset BUG=skia: Review URL: https://codereview.chromium.org/1364443002
* Style Change: NULL->nullptrGravatar halcanary2015-08-27
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1316233002 Review URL: https://codereview.chromium.org/1316233002
* flag to use const& instead of const* for src-rectGravatar reed2015-08-06
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1272713005
* rename portable_typeface_always to portable_typefaceGravatar caryclark2015-07-24
| | | | | | TBR=reed@google.com Review URL: https://codereview.chromium.org/1257773002
* make drawbitmaprect lighting lumafilter matrixconvolution srcmode gm portableGravatar caryclark2015-07-17
| | | | | | TBR=reed@google.com Review URL: https://codereview.chromium.org/1240843005
* Revert[2] of guard to remove DrawBitmapRectFlagsGravatar reed2015-07-17
| | | | | | | | | This reverts commit 91110195a2eee170c11885da9d16f94b00a39f87. BUG=skia: TBR= Review URL: https://codereview.chromium.org/1240753003
* Revert of guard to remove DrawBitmapRectFlags (patchset #1 id:1 of ↵Gravatar scroggo2015-07-17
| | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1235393003/) Reason for revert: breaking android framework build Original issue's description: > guard to remove DrawBitmapRectFlags > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/6fb0b6779e40ce05c20cf279f0ecff31fa3cd60d TBR=fmalita@chromium.org,djsollen@google.com,reed@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1230823007
* guard to remove DrawBitmapRectFlagsGravatar reed2015-07-16
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1235393003
* C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla}Gravatar mtklein2015-03-25
| | | | | | | | | NOPRESUBMIT=true BUG=skia: DOCS_PREVIEW= https://skia.org/?cl=1037793002 Review URL: https://codereview.chromium.org/1037793002
* SkPaint::FilterLevel -> SkFilterQualityGravatar reed2015-03-16
| | | | | | | | | clone (+rebase) of https://codereview.chromium.org/1009183002/ BUG=skia: TBR=scroggo@google.com Review URL: https://codereview.chromium.org/1014533004
* add newImage APIGravatar reed2015-01-23
| | | | | | | BUG=skia:3277 related bug: skbug.com/3276 Review URL: https://codereview.chromium.org/821083002
* Add standard fonts to all GMs.Gravatar Cary Clark2014-07-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow GM results to be compared across machines and platforms by standardizing the fonts used by all tests. This adds runtime flags to DM to use either the system font context (the default), the fonts in the resources directory ( --resourceFonts ) or a set of canonical paths generated from the fonts ( --portableFonts ). This CL should leave the current DM results unchanged by default. If the portable font data or resource font is missing when DM is run, it falls back to using the system font context. The create_test_font tool generates the paths and metrics read by DM with the --portableFonts flag set, and generates the font substitution tables read by DM with the --resourceFonts flag set. If DM is run in SkDebug mode with the --reportUsedChars flag set, it generates the corresponding data compiled into the create_test_font tool. All GM tests set their typeface information by calling either sk_tool_utils::set_portable_typeface or sk_tool_utils::portable_typeface . (The former takes the paint, the latter returns a SkTypeface.) These calls can be removed in the future when the Font Manager can be superceded. BUG=skia:2687 R=mtklein@google.com Review URL: https://codereview.chromium.org/407183003
* Cleanup: Get rid of make_isize() function from gm.h.Gravatar tfarina2014-06-09
| | | | | | | | | | | | | | | This helper function is not necessary. The same thing can be achieved by using SkISize::Make() provided by SkTSize API. BUG=skia:2645 TEST=make dm && out/Debug/dm R=robertphillips@google.com, reed@google.com Author: tfarina@chromium.org Review URL: https://codereview.chromium.org/326523002
* Remove unused (by clients) SkUnitMapperGravatar commit-bot@chromium.org2014-05-22
| | | | | | | | | | | | This reverts commit 874423a81b5bc2541c7397e6ab00d5e7c9fdaf98. TBR=scroggo Author: reed@google.com Review URL: https://codereview.chromium.org/288313009 git-svn-id: http://skia.googlecode.com/svn/trunk@14842 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert of Remove unused (by clients) SkUnitMapper ↵Gravatar commit-bot@chromium.org2014-05-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/283273002/) (https://codereview.chromium.org/288343009/) Reason for revert: required blink change failed to land Original issue's description: > Remove unused (by clients) SkUnitMapper (https://codereview.chromium.org/283273002/) > > This reverts commit dd50c83b5b34dab3a077741861b50ed1f2bc6b8f. > > BUG=skia: > > Committed: http://code.google.com/p/skia/source/detail?r=14830 R=scroggo@google.com, reed@google.com TBR=reed@google.com, scroggo@google.com NOTREECHECKS=true NOTRY=true BUG=skia: Author: reed@chromium.org Review URL: https://codereview.chromium.org/296823008 git-svn-id: http://skia.googlecode.com/svn/trunk@14838 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove unused (by clients) SkUnitMapper ↵Gravatar commit-bot@chromium.org2014-05-21
| | | | | | | | | | | | | | | (https://codereview.chromium.org/283273002/) This reverts commit dd50c83b5b34dab3a077741861b50ed1f2bc6b8f. BUG=skia: R=scroggo@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/288343009 git-svn-id: http://skia.googlecode.com/svn/trunk@14830 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert of remove unused (by clients) SkUnitMapper ↵Gravatar commit-bot@chromium.org2014-05-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/283273002/) Reason for revert: does not address all legacy callsites in chrome. e.g. [13:45:32.091872] ../../ui/native_theme/native_theme_base.cc:608:76: error: no matching function for call to ‘SkGradientShader::CreateLinear(SkPoint [3], SkColor [3], NULL, int, SkShader::TileMode, NULL)’ [13:45:32.091919] gradient_bounds, colors, NULL, 3, SkShader::kClamp_TileMode, NULL)); Original issue's description: > remove unused (by clients) SkUnitMapper > > BUG=skia: > > Committed: http://code.google.com/p/skia/source/detail?r=14761 R=robertphillips@google.com, scroggo@google.com, george@mozilla.com TBR=george@mozilla.com, robertphillips@google.com, scroggo@google.com NOTREECHECKS=true NOTRY=true BUG=skia: Author: reed@google.com Review URL: https://codereview.chromium.org/287063009 git-svn-id: http://skia.googlecode.com/svn/trunk@14763 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove unused (by clients) SkUnitMapperGravatar commit-bot@chromium.org2014-05-16
| | | | | | | | | | | BUG=skia: R=robertphillips@google.com, scroggo@google.com, george@mozilla.com Author: reed@google.com Review URL: https://codereview.chromium.org/283273002 git-svn-id: http://skia.googlecode.com/svn/trunk@14761 2bbb7eff-a529-9590-31e7-b0007b416f81
* Mark drawbitmaprect's large bitmaps as immutable.Gravatar commit-bot@chromium.org2014-05-02
| | | | | | | | | | | | | | | This reduces the peak memory usage of out/Debug/dm --skr --match drawbitmaprect from ~1.6G to ~200M. I'm not sure how the numbers got so huge to begin with from a 2K x 2K 8888 bitmap (16MB). BUG=skia:2378 R=reed@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/265813007 git-svn-id: http://skia.googlecode.com/svn/trunk@14529 2bbb7eff-a529-9590-31e7-b0007b416f81
* move common blur types into central headerGravatar commit-bot@chromium.org2014-04-28
| | | | | | | | | | | BUG=skia: R=scroggo@google.com, djsollen@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/253833002 git-svn-id: http://skia.googlecode.com/svn/trunk@14411 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
* gather GM tests which are disabled on AndroidGravatar commit-bot@chromium.org2014-03-24
| | | | | | | | | | | BUG=skia:2326 R=borenet@google.com, djsollen@google.com Author: epoger@google.com Review URL: https://codereview.chromium.org/208313014 git-svn-id: http://skia.googlecode.com/svn/trunk@13922 2bbb7eff-a529-9590-31e7-b0007b416f81
* replace SkBitmap::Config with SkColorType in gmsGravatar commit-bot@chromium.org2014-02-17
| | | | | | | | | | | | | add helper installMaskPixels() to SkBitmap BUG=skia: R=halcanary@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/169913003 git-svn-id: http://skia.googlecode.com/svn/trunk@13482 2bbb7eff-a529-9590-31e7-b0007b416f81
* add legacy/helper allocN32Pixels, and convert gm to use itGravatar reed@google.com2014-01-25
| | | | | | | | | | | | This is an intermediate api, but might help us quickly get to a point where no one is creating bitmaps in a 2-step process (setConfig + alloc). BUG=skia: R=halcanary@google.com Review URL: https://codereview.chromium.org/140593005 git-svn-id: http://skia.googlecode.com/svn/trunk@13182 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "Revert "add SK_ATTR_DEPRECATED -- will need to disable for chrome, ↵Gravatar reed@google.com2013-10-31
| | | | | | | | | | | | since it triggers a warning"" This reverts commit 1e787c38fa71f2a21fd728f1b1d620b9b09b0d3d. BUG= Review URL: https://codereview.chromium.org/54603004 git-svn-id: http://skia.googlecode.com/svn/trunk@12057 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "add SK_ATTR_DEPRECATED -- will need to disable for chrome, since it ↵Gravatar reed@google.com2013-10-31
| | | | | | | | triggers a warning" This reverts commit 1d22c4aaf9d8f053f25194a1ed74b137bfb19497. git-svn-id: http://skia.googlecode.com/svn/trunk@12056 2bbb7eff-a529-9590-31e7-b0007b416f81
* add SK_ATTR_DEPRECATED -- will need to disable for chrome, since it triggers ↵Gravatar reed@google.com2013-10-31
| | | | | | | | | | | a warning BUG= R=robertphillips@google.com, senorblanco@chromium.org, vandebo@chromium.org Review URL: https://codereview.chromium.org/51033004 git-svn-id: http://skia.googlecode.com/svn/trunk@12055 2bbb7eff-a529-9590-31e7-b0007b416f81
* Push sigma-based blur interface into our GMs/benches/tests/samplecodeGravatar robertphillips@google.com2013-09-06
| | | | | | | | https://codereview.chromium.org/23701006/ git-svn-id: http://skia.googlecode.com/svn/trunk@11129 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2013-01-26
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@7406 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 III of IV (I broke down the 1280 files into 4 CLs). Review URL: https://codereview.appspot.com/6475053 git-svn-id: http://skia.googlecode.com/svn/trunk@5264 2bbb7eff-a529-9590-31e7-b0007b416f81