aboutsummaryrefslogtreecommitdiffhomepage
path: root/samplecode/SampleRegion.cpp
Commit message (Collapse)AuthorAge
* IWYU -- SkShader.hGravatar Mike Reed2018-01-23
| | | | | | | | Bug: skia: Change-Id: I57bffc14c4888627a22158e35f3ac3b762138f02 Reviewed-on: https://skia-review.googlesource.com/98520 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Delete even more unused views codeGravatar Brian Osman2017-11-29
| | | | | | | | Bug: skia: Change-Id: I41480aa89dfcd8cb7e016e477cbabe354f35ce8a Reviewed-on: https://skia-review.googlesource.com/75480 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Brian Osman <brianosman@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>
* Revert[8] "replace SkXfermode obj with SkBlendMode enum in paints"Gravatar reed2016-10-05
| | | | | | | | | | | This reverts commit c245574ba3d0e2ade6c94b2812de3baa383bf4c4. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2396953002 TBR= Review-Url: https://codereview.chromium.org/2396953002
* Revert[7] "replace SkXfermode obj with SkBlendMode enum in paints"Gravatar Mike Reed2016-10-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit Ib4a154cdd5f5d1dcac921ef50d53b79a2d6a1be8. Reason for revert: new assert from 100K bot Original change's description: > Revert[6] "replace SkXfermode obj with SkBlendMode enum in paints" > > - perform version check in CreateProc for XfermodeImageFilter and ArithmeticImageFilter > This reverts commit 3ed485f4249e17abb4b11f5018d03175fd1afb44. > > BUG=skia: > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2992 > > Change-Id: Ib4a154cdd5f5d1dcac921ef50d53b79a2d6a1be8 > Reviewed-on: https://skia-review.googlesource.com/2992 > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Mike Reed <reed@google.com> > TBR=reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I848e5a69c5cd67f2c14889f4f0a346652578c4ff Reviewed-on: https://skia-review.googlesource.com/3023 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Revert[6] "replace SkXfermode obj with SkBlendMode enum in paints"Gravatar Mike Reed2016-10-05
| | | | | | | | | | | | | | - perform version check in CreateProc for XfermodeImageFilter and ArithmeticImageFilter This reverts commit 3ed485f4249e17abb4b11f5018d03175fd1afb44. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2992 Change-Id: Ib4a154cdd5f5d1dcac921ef50d53b79a2d6a1be8 Reviewed-on: https://skia-review.googlesource.com/2992 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert[5] "replace SkXfermode obj with SkBlendMode enum in paints"Gravatar Mike Reed2016-10-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit I0fa5c58af428f3da8565465d1219a34ef8417d9a. Reason for revert: failing to deserialize some of the 100K Original change's description: > Revert[4] "replace SkXfermode obj with SkBlendMode enum in paints" > > This reverts commit 2cbcd12281ee807214df094964c584c78932e10b. > > BUG=skia: > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2924 > > Change-Id: I0fa5c58af428f3da8565465d1219a34ef8417d9a > Reviewed-on: https://skia-review.googlesource.com/2924 > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Mike Reed <reed@google.com> > TBR=reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I1805a57eef5ebcac203da5989c8539345ecf806f Reviewed-on: https://skia-review.googlesource.com/2962 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert[4] "replace SkXfermode obj with SkBlendMode enum in paints"Gravatar Mike Reed2016-10-04
| | | | | | | | | | | | | This reverts commit 2cbcd12281ee807214df094964c584c78932e10b. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2924 Change-Id: I0fa5c58af428f3da8565465d1219a34ef8417d9a Reviewed-on: https://skia-review.googlesource.com/2924 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "Revert "Revert "replace SkXfermode obj with SkBlendMode enum in ↵Gravatar Mike Reed2016-10-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | paints""" This reverts commit I86875511a13497112827cbaed1dbd7639e9e3d10. legacy (100K) skp failure Original change's description: > Revert "Revert "replace SkXfermode obj with SkBlendMode enum in paints"" > > This reverts commit ce02e7175872abde3721df9e5d3ec0ab8384cd8e. > > BUG=skia: > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2878 > > Change-Id: I86875511a13497112827cbaed1dbd7639e9e3d10 > Reviewed-on: https://skia-review.googlesource.com/2878 > Reviewed-by: Matt Sarett <msarett@google.com> > Commit-Queue: Mike Reed <reed@google.com> > TBR=msarett@google.com,reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: Ife6f0cf3a22b3e8cf885a188f7f44e1ff62e06a5 Reviewed-on: https://skia-review.googlesource.com/2881 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "Revert "replace SkXfermode obj with SkBlendMode enum in paints""Gravatar Mike Reed2016-10-03
| | | | | | | | | | | | | This reverts commit ce02e7175872abde3721df9e5d3ec0ab8384cd8e. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2878 Change-Id: I86875511a13497112827cbaed1dbd7639e9e3d10 Reviewed-on: https://skia-review.googlesource.com/2878 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "replace SkXfermode obj with SkBlendMode enum in paints"Gravatar Mike Reed2016-10-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit I4fb489ba6b3f77b458f7e4a99f79c7ad10859135. Reason for revert: <INSERT REASONING HERE> Original change's description: > replace SkXfermode obj with SkBlendMode enum in paints > > BUG=skia:5814 > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2714 > > Change-Id: I4fb489ba6b3f77b458f7e4a99f79c7ad10859135 > Reviewed-on: https://skia-review.googlesource.com/2714 > Reviewed-by: Florin Malita <fmalita@chromium.org> > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Mike Reed <reed@google.com> > TBR=bsalomon@google.com,fmalita@chromium.org,fmalita@google.com,reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I3e43f79ef5c1709929663fe63cc1f67cd78270b7 Reviewed-on: https://skia-review.googlesource.com/2871 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* replace SkXfermode obj with SkBlendMode enum in paintsGravatar Mike Reed2016-10-03
| | | | | | | | | | | | BUG=skia:5814 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2714 Change-Id: I4fb489ba6b3f77b458f7e4a99f79c7ad10859135 Reviewed-on: https://skia-review.googlesource.com/2714 Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Remove uses of SkImageDecoder from samplecodeGravatar msarett2016-03-18
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1812323003 Review URL: https://codereview.chromium.org/1812323003
* use Make instead of Create to return a shared shaderGravatar reed2016-03-08
| | | | | | | | | Partially updated call sites. Undefine the flag in SkSHader.h to convert the remaining sites. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1772463002 Review URL: https://codereview.chromium.org/1772463002
* Style Change: NULL->nullptrGravatar halcanary2015-08-27
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1316233002 Review URL: https://codereview.chromium.org/1316233002
* Compile with VS2015.Gravatar bungeman2015-07-21
| | | | | | | | | | | | | | | | Visual Studio 2015 has additional warnings around noexcept and disabling exceptions, which can be worked around with the (undocumented) _HAS_EXCEPTIONS macro. Visual Studio 2013 and 2015 have roundf in math.h, so use it to avoid extra work and casts. We avoid using cmath, as it undefs isfinite on gcc, but Visual Studio 2015 no longer provides overloads of copysign from math.h (which is actually correct). As a result, use copysignf (which is available in math.h in 2013 and 2015) directly. Review URL: https://codereview.chromium.org/1244173005
* 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
* 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
* Cleanup: More override fixes - another round.Gravatar tfarina2015-01-05
| | | | | | | | BUG=skia:3075 TEST=ninja -C out/Debug TBR=reed@google.com Review URL: https://codereview.chromium.org/831113002
* use SkColorType instead of SkBitmap::Config in samplecodeGravatar commit-bot@chromium.org2014-02-17
| | | | | | | | | | | BUG=skia: R=reed@google.com Author: reed@chromium.org Review URL: https://codereview.chromium.org/169063002 git-svn-id: http://skia.googlecode.com/svn/trunk@13473 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix more 64bit warningsGravatar reed@google.com2014-01-27
| | | | | | | | BUG=skia: Review URL: https://codereview.chromium.org/147683003 git-svn-id: http://skia.googlecode.com/svn/trunk@13190 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 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
* Checking structure sizes before reading them from memory to avoid ↵Gravatar commit-bot@chromium.org2013-11-05
| | | | | | | | | | | | | | | | | overflowing the buffer's stream. BUG= R=reed@google.com, mtklein@google.com, senorblanco@chromium.org Committed: https://code.google.com/p/skia/source/detail?r=12114 Committed: https://code.google.com/p/skia/source/detail?r=12119 Author: sugoi@chromium.org Review URL: https://codereview.chromium.org/41253002 git-svn-id: http://skia.googlecode.com/svn/trunk@12130 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "Checking structure sizes before reading them from memory to avoid ↵Gravatar reed@google.com2013-11-04
| | | | | | | | overflowing the buffer's stream." This reverts commit 6bc22e8ef1ea70a1b58409aa21254358c50f149a. git-svn-id: http://skia.googlecode.com/svn/trunk@12124 2bbb7eff-a529-9590-31e7-b0007b416f81
* Checking structure sizes before reading them from memory to avoid ↵Gravatar sugoi@google.com2013-11-04
| | | | | | | | | | | | | overflowing the buffer's stream. BUG= R=reed@google.com Committed: https://code.google.com/p/skia/source/detail?r=12114 Review URL: https://codereview.chromium.org/41253002 git-svn-id: http://skia.googlecode.com/svn/trunk@12119 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert r12114 due to https://code.google.com/p/skia/issues/detail?id=1794 ↵Gravatar epoger@google.com2013-11-04
| | | | | | ('Assertion failures on various buildbots as of r12114') git-svn-id: http://skia.googlecode.com/svn/trunk@12115 2bbb7eff-a529-9590-31e7-b0007b416f81
* Checking structure sizes before reading them from memory to avoid ↵Gravatar sugoi@google.com2013-11-04
| | | | | | | | | | | overflowing the buffer's stream. BUG= R=reed@google.com Review URL: https://codereview.chromium.org/41253002 git-svn-id: http://skia.googlecode.com/svn/trunk@12114 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix signature for onFindClickHandlerGravatar mike@reedtribe.org2013-02-18
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@7764 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
* fix warning from scalar --> int32 conversionGravatar humper@google.com2013-01-07
| | | | | | | | BUG= Review URL: https://codereview.appspot.com/7065050 git-svn-id: http://skia.googlecode.com/svn/trunk@7061 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
* Rename the existing flatten(void*) methods.Gravatar djsollen@google.com2012-06-08
| | | | | | | | This change avoids naminc confusion with the SkFlattenable flatten methods and also changes SkPath to use the void* model instead of taking a SkReader32. Review URL: https://codereview.appspot.com/6299062 git-svn-id: http://skia.googlecode.com/svn/trunk@4215 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix warnings on Mac in ssamplecodeGravatar caryclark@google.com2012-06-06
| | | | | | | | | | | | | | | | | | Fix these class of warnings: - unused functions - unused locals - sign mismatch - missing function prototypes - missing newline at end of file - 64 to 32 bit truncation The changes prefer to link in dead code in the debug build with 'if (false)' than to comment it out, but trivial cases are commented out or sometimes deleted if it appears to be a copy/paste error. Review URL: https://codereview.appspot.com/6301044 git-svn-id: http://skia.googlecode.com/svn/trunk@4183 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
* show contains and intersects predicates in sampleGravatar reed@google.com2012-05-02
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3824 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
* The plain Makefile was using -Wall, but the gyp build wasn't. This CL turns onGravatar senorblanco@chromium.org2011-05-19
| | | | | | | | | | | | | | | | | | | -Wall -Wextra and -Wno-unused in common.gypi. This revealed a lot of warnings (and some actual bugs), all of which I fixed here. This is pretty mindless stuff for the most part (order of intialization, missing initializers, && within ||, etc), but will allow us to build cleanly with -Wall and -Wextra (and -Werror, if we so choose). I put defaults into switches that were missing cases. I could put in the actual missing enums instead if that's desired. I could also assert on missing enums instead of break, if that's desired. I wasn't sure how to test the stuff in "animator", so that should be looked at a bit more closely. Review URL: http://codereview.appspot.com/4547055/ git-svn-id: http://skia.googlecode.com/svn/trunk@1386 2bbb7eff-a529-9590-31e7-b0007b416f81
* switch to inheriting from SampleViewGravatar mike@reedtribe.org2011-05-05
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@1249 2bbb7eff-a529-9590-31e7-b0007b416f81
* merge with changes for GPU backendGravatar reed@android.com2010-12-20
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@637 2bbb7eff-a529-9590-31e7-b0007b416f81
* add SDL supportGravatar reed@android.com2009-05-22
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@182 2bbb7eff-a529-9590-31e7-b0007b416f81
* add SkSize for dimensionsGravatar reed@android.com2009-05-13
| | | | | | | | | add SkShape baseclass, in the hopes of having SkPicture inherit from that, and also using shapes as the extension mechanism for things like animated-gif git-svn-id: http://skia.googlecode.com/svn/trunk@174 2bbb7eff-a529-9590-31e7-b0007b416f81
* Handle kA8 bitmaps drawing through a matrix (was infinitely recursive)Gravatar reed@android.com2009-02-24
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@95 2bbb7eff-a529-9590-31e7-b0007b416f81
* separate image encode and decodeGravatar reed@android.com2009-01-06
| | | | | | | | remove obsolete build-flag for encode git-svn-id: http://skia.googlecode.com/svn/trunk@56 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