aboutsummaryrefslogtreecommitdiffhomepage
path: root/samplecode
Commit message (Collapse)AuthorAge
* Revert "Revert "Revert "PixelRef now returns (nearly) everything that is ↵Gravatar reed@google.com2013-12-06
| | | | | | | | | | | | | | currently in 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 5f035e90d6dea0139a4f204b634e7b7b3b4976d7. Reverting because it breaks chrome/blink due to new SkPixelRef constructor arg. BUG= Review URL: https://codereview.chromium.org/108993002 git-svn-id: http://skia.googlecode.com/svn/trunk@12551 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "Revert "PixelRef now returns (nearly) everything that is currently ↵Gravatar reed@google.com2013-12-06
| | | | | | | | | | | | in 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 4174afb18a9746bbad2a06c0ec2d4ad35f72d790. BUG= Review URL: https://codereview.chromium.org/108723003 git-svn-id: http://skia.googlecode.com/svn/trunk@12547 2bbb7eff-a529-9590-31e7-b0007b416f81
* Additional SampleApp tiling options.Gravatar commit-bot@chromium.org2013-12-06
| | | | | | | | | | | | | | | | | | | Adding some more tiling options (both relative and fixed size): kNo_Tiling, kAbs_128x128_Tiling, kAbs_256x256_Tiling, kRel_4x4_Tiling, kRel_1x16_Tiling, kRel_16x1_Tiling, R=bungeman@google.com, reed@google.com, fmalita@google.com Author: fmalita@chromium.org Review URL: https://codereview.chromium.org/108213004 git-svn-id: http://skia.googlecode.com/svn/trunk@12545 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fixed a few places where uninitialized memory could have been readGravatar commit-bot@chromium.org2013-12-06
| | | | | | | | | | | | | Also added early exit in SkImageFilter's constructor to avoid attempting to deserialize all inputs once a bad input has been found. This avoids hanging if a filter pretends to have 1 billion inputs when that's just an error on the number of inputs read by the filter. BUG=326206,326197,326229 R=senorblanco@chromium.org, senorblanco@google.com, reed@google.com, sugoi@google.com Author: sugoi@chromium.org Review URL: https://codereview.chromium.org/106943002 git-svn-id: http://skia.googlecode.com/svn/trunk@12544 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
* Fix compilation with SK_ENABLE_INST_COUNT=1Gravatar commit-bot@chromium.org2013-12-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add INHERITED declarations to class declarations that prevent compilation with the flag. Remove SK_DEFINE_INST_COUNT from all class implementations. Instead, use function-local static variables in the reference count helper classes to create the global instances to store the needed info. The accessor functions are defined inline in the helper classes, so definitions are not needed. The initialization point of the variables should be as well defined as previously. Remove SK_DECLARE_INST_COUNT_TEMPLATE and use SK_DECLARE_INST_COUNT instead. This avoids possible future compilation errors further. For SK_ENABLE_INST_COUNT=0 compilation, add an empty static member function to all classes that use SK_DECLARE_INST_COUNT and SK_DECLARE_INST_COUNT_ROOT macros. The function ensures that classes contain public INHERITED typedef. This member function seems to be compiled away. This shouĺd ensure that part of the compilation errors are caught earlier. Also adds DSK_DECLARE_INST_COUNT to few SkPDFDict subclasses. R=robertphillips@google.com, richardlin@chromium.org, bsalomon@google.com Author: kkinnunen@nvidia.com Review URL: https://codereview.chromium.org/98703002 git-svn-id: http://skia.googlecode.com/svn/trunk@12501 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fixed bad bitmap size crashesGravatar commit-bot@chromium.org2013-12-04
| | | | | | | | | | | | | | | There were 2 issues : 1 ) If the size of an SkBitmap's underlying SkPixelRef's alocated memory is too small to fit the bitmap, then the deserialization will now check this and set an error appropriately. 2 ) If a device fails to allocate its pixels, the device will be deleted and NULL will be returned to avoid attempting to draw on a bad device. BUG= R=senorblanco@chromium.org, reed@google.com, sugoi@google.com, halcanary@google.com, mtklein@google.com Author: sugoi@chromium.org Review URL: https://codereview.chromium.org/92793002 git-svn-id: http://skia.googlecode.com/svn/trunk@12484 2bbb7eff-a529-9590-31e7-b0007b416f81
* Reverting r12427Gravatar rmistry@google.com2013-12-02
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@12428 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-12-02
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@12427 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "Revert "remove kA1_Config, as it is no longer supported""Gravatar commit-bot@chromium.org2013-11-26
| | | | | | | | | | | | | This reverts commit 36d712f2d4c5c79719280ad95523e6aaa88b068e. BUG= R=rmistry@google.com, mtklein@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/86483002 git-svn-id: http://skia.googlecode.com/svn/trunk@12392 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "remove kA1_Config, as it is no longer supported"Gravatar reed@google.com2013-11-25
| | | | | | This reverts commit 2d72d8b242eac6e9d30228f5b0a407236491c369. git-svn-id: http://skia.googlecode.com/svn/trunk@12387 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
* remove kA1_Config, as it is no longer supportedGravatar reed@google.com2013-11-25
| | | | | | | | | BUG= R=djsollen@google.com Review URL: https://codereview.chromium.org/83093005 git-svn-id: http://skia.googlecode.com/svn/trunk@12384 2bbb7eff-a529-9590-31e7-b0007b416f81
* Guard against most unintentionally ephemeral SkAutoFoo instantiations.Gravatar commit-bot@chromium.org2013-11-18
| | | | | | | | | | | | | | | | | | | I think I applied the trick everywhere possible. Limitations: - can't be used with templated classes - all constructors and destructors must be defined inline A couple of the SkAutoFoo were unused in Skia, Chromium, and Android, so I deleted them. This change caught the same bugs Cary found in SkPath, plus one more in SampleApp. BUG= R=reed@google.com, caryclark@google.com Author: mtklein@google.com Review URL: https://codereview.chromium.org/72603005 git-svn-id: http://skia.googlecode.com/svn/trunk@12301 2bbb7eff-a529-9590-31e7-b0007b416f81
* Pdfviewer refactoring.Gravatar scroggo@google.com2013-11-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mostly superficial changes, to help me make sure I understand the code while making modifications. SkPdfRenderer: First class I'm modifying. Move it into include/ and src/ directories. Inherit from SkNoncopyable. Replace load() with factory function which returns NULL if the load fails. Remove unload() and loaded(), which no longer make sense, since the factory will return NULL on a failure to load, and unload() happens on destruction. Use a const char* for loading a PDF, following the convention of SkStream::NewFromFile. Remove unnecessary call to sqrt in SkPDFNativeRenderToBitmap. Also in SkPDFNativeRenderToBitmap, use an appropriate SkScalar macro to convert to an integer. Use this-> when calling member functions. pdf_viewer_main.cpp: Call the new interface for SkPdfRenderer. gyp files: Refer to the new location of SkPdfRenderer. R=edisonn@google.com Review URL: https://codereview.chromium.org/59493011 git-svn-id: http://skia.googlecode.com/svn/trunk@12296 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove deprecated setIsOpaque() API from SkBitmap.Gravatar commit-bot@chromium.org2013-11-12
| | | | | | | | | | | | | Clients we care (Blink, Chromium) were updated, so we can remove this now. BUG=None R=bsalomon@google.com, reed@google.com Author: tfarina@chromium.org Review URL: https://codereview.chromium.org/66723017 git-svn-id: http://skia.googlecode.com/svn/trunk@12251 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
* 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
* 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
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-10-31
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@12043 2bbb7eff-a529-9590-31e7-b0007b416f81
* add triangles to fatbits sample ('t')Gravatar reed@google.com2013-10-30
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@12015 2bbb7eff-a529-9590-31e7-b0007b416f81
* Enabling validation code in serialization and adding serialization to fuzzerGravatar commit-bot@chromium.org2013-10-28
| | | | | | | | | | | | | | BUG= Committed: http://code.google.com/p/skia/source/detail?r=11968 R=reed@google.com, mtklein@google.com, senorblanco@chromium.org, bsalomon@google.com, robertphillips@google.com Author: sugoi@chromium.org Review URL: https://codereview.chromium.org/44573002 git-svn-id: http://skia.googlecode.com/svn/trunk@11981 2bbb7eff-a529-9590-31e7-b0007b416f81
* Reverting r11968 (Enabling validation code in serialization and adding ↵Gravatar robertphillips@google.com2013-10-28
| | | | | | serialization to fuzzer - https://codereview.chromium.org/44573002) due to failure on Chromium AllQuads test. git-svn-id: http://skia.googlecode.com/svn/trunk@11974 2bbb7eff-a529-9590-31e7-b0007b416f81
* Enabling validation code in serialization and adding serialization to fuzzerGravatar commit-bot@chromium.org2013-10-25
| | | | | | | | | | | BUG= R=reed@google.com, mtklein@google.com, senorblanco@chromium.org, bsalomon@google.com Author: sugoi@chromium.org Review URL: https://codereview.chromium.org/44573002 git-svn-id: http://skia.googlecode.com/svn/trunk@11968 2bbb7eff-a529-9590-31e7-b0007b416f81
* store SkAlphaType inside SkBitmap, on road to support unpremulGravatar reed@google.com2013-10-21
| | | | | | | | | BUG= R=bsalomon@google.com, scroggo@google.com Review URL: https://codereview.chromium.org/25275004 git-svn-id: http://skia.googlecode.com/svn/trunk@11877 2bbb7eff-a529-9590-31e7-b0007b416f81
* SampleApp - reduce unnecessary verbosity [with --picture $path]Gravatar halcanary@google.com2013-10-14
| | | | | | | | | | | | | Before this change, `SampleApp --picture $path` prints out usage (as well as --pictureDir) as if there was a syntax error in the command line arguments. BUG=skia:1677 R=reed@google.com Review URL: https://codereview.chromium.org/24503003 git-svn-id: http://skia.googlecode.com/svn/trunk@11748 2bbb7eff-a529-9590-31e7-b0007b416f81
* Clean up SkTypes.h.Gravatar bungeman@google.com2013-10-11
| | | | | | | | | | | | | | | | | | | This change removes sk_stdint.h since it is only needed for vs2008 and earlier. This change removes SK_MMAP_SUPPORT define since it is no longer used. This change removes the stdio.h include from SkTypes.h since on many systems this is a very large header, few Skia files actually use it, it is available everywhere standard, and SkDebugf should be used instead. After this change there is no need for external users to put Skia's include/config into their own list of includes, saving the headache of having two header files of the same name and sometimes getting the wrong one depending on include order. R=bsalomon@google.com, djsollen@google.com Review URL: https://codereview.chromium.org/27044002 git-svn-id: http://skia.googlecode.com/svn/trunk@11738 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "Revert "change SkColorTable to be immutable""Gravatar reed@google.com2013-10-10
| | | | | | | | | | | | This reverts commit b8162cb840f4cb6002ef68d5ac775c6a122c52a9. Fixed was call-sites in benches that used the (now gone) setIsOpaque api. R=scroggo@google.com Review URL: https://codereview.chromium.org/26572006 git-svn-id: http://skia.googlecode.com/svn/trunk@11695 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "change SkColorTable to be immutable"Gravatar reed@google.com2013-10-09
| | | | | | | | | | This reverts commit 1c0ff422868b3badf5ffe0790a5d051d1896e2f7. BUG= Review URL: https://codereview.chromium.org/26709002 git-svn-id: http://skia.googlecode.com/svn/trunk@11677 2bbb7eff-a529-9590-31e7-b0007b416f81
* change SkColorTable to be immutableGravatar reed@google.com2013-10-09
| | | | | | | | | BUG= R=scroggo@google.com Review URL: https://codereview.chromium.org/25353002 git-svn-id: http://skia.googlecode.com/svn/trunk@11676 2bbb7eff-a529-9590-31e7-b0007b416f81
* Change SkImageDecoders to take an SkStreamRewindable.Gravatar scroggo@google.com2013-09-25
| | | | | | | | | | | | | | | | | | | | Only affects factories, static functions that will use the factories, and subset decoding, which all require rewinding. The decoders themselves continue to take an SkStream. This is merely documentation stating which functions will possibly rewind the passed in SkStream. This is part of the general change to coordinate SkStreams with Android's streams, which don't necessarily support rewinding in all cases. Update callers to use SkStreamRewindable. BUG=skia:1572 R=bungeman@google.com, reed@google.com Review URL: https://codereview.chromium.org/23477009 git-svn-id: http://skia.googlecode.com/svn/trunk@11460 2bbb7eff-a529-9590-31e7-b0007b416f81
* promote SkImage::AlphaType to SkAlphaTypeGravatar reed@google.com2013-09-20
| | | | | | | | | BUG= R=bsalomon@google.com Review URL: https://codereview.chromium.org/24130009 git-svn-id: http://skia.googlecode.com/svn/trunk@11421 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-09-20
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@11411 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix for SampleFilterFuzz compiler warning/errorGravatar robertphillips@google.com2013-09-19
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@11408 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fixed warnings as errorGravatar sugoi@google.com2013-09-19
| | | | | | | | | BUG= R=edisonn@google.com, rmistry@google.com Review URL: https://codereview.chromium.org/24246006 git-svn-id: http://skia.googlecode.com/svn/trunk@11398 2bbb7eff-a529-9590-31e7-b0007b416f81
* I'm investigating how to make the IPC transfer a bit more secure on theGravatar commit-bot@chromium.org2013-09-19
| | | | | | | | | | | | | | skia side by adding some safety checks. This cl is about brainstorming and proposing possible solutions for type checking at different stages. BUG= R=senorblanco@google.com, sugoi@google.com, scroggo@google.com, reed@android.com, senorblanco@chromium.org, mtklein@google.com, reed@google.com Author: sugoi@chromium.org Review URL: https://chromiumcodereview.appspot.com/22799007 git-svn-id: http://skia.googlecode.com/svn/trunk@11395 2bbb7eff-a529-9590-31e7-b0007b416f81
* Type warning fix for: Add string art GM and sample.Gravatar jvanverth@google.com2013-09-19
| | | | | | | | R=robertphillips@google.com Review URL: https://codereview.chromium.org/24258003 git-svn-id: http://skia.googlecode.com/svn/trunk@11384 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add string art GM and sample.Gravatar jvanverth@google.com2013-09-19
| | | | | | | | | BUG=279014 R=robertphillips@google.com Review URL: https://codereview.chromium.org/23609037 git-svn-id: http://skia.googlecode.com/svn/trunk@11383 2bbb7eff-a529-9590-31e7-b0007b416f81
* update devicelooper to skip internal tiles that are empty, and unittestsGravatar reed@google.com2013-09-17
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/23463040 git-svn-id: http://skia.googlecode.com/svn/trunk@11331 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add Clock Sample.Gravatar jvanverth@google.com2013-09-17
| | | | | | | | | | | | There are two possible rendering methods: paths (default) or primitives. At the moment the rrect primitive only supports axis-aligned rrects for GPU acceleration, so that will not be a win on GPU. R=reed@google.com Review URL: https://codereview.chromium.org/23876008 git-svn-id: http://skia.googlecode.com/svn/trunk@11330 2bbb7eff-a529-9590-31e7-b0007b416f81
* Removes uses of unnamed namespace from samplecode.Gravatar commit-bot@chromium.org2013-09-13
| | | | | | | | | | | | Skia code prefers static over unnamed namespace. R=bsalomon@google.com, robertphillips@google.com Author: tfarina@chromium.org Review URL: https://chromiumcodereview.appspot.com/23498028 git-svn-id: http://skia.googlecode.com/svn/trunk@11248 2bbb7eff-a529-9590-31e7-b0007b416f81
* check for --resourcePath in addition to -i to match the --help stringGravatar reed@google.com2013-09-10
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@11186 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