aboutsummaryrefslogtreecommitdiffhomepage
path: root/samplecode
Commit message (Collapse)AuthorAge
* 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
* SkPerlinNoiseShader::CreateTubulenceNoise() is misspelledGravatar commit-bot@chromium.org2014-04-01
| | | | | | | | | | | | | Add missing 'r'. BUG=skia:2329 R=bsalomon@google.com, hcm@google.com, sugoi@chromium.org Author: siglesias@igalia.com Review URL: https://codereview.chromium.org/207543008 git-svn-id: http://skia.googlecode.com/svn/trunk@14008 2bbb7eff-a529-9590-31e7-b0007b416f81
* Allow toString capability to be toggled independent of developer mode.Gravatar commit-bot@chromium.org2014-03-13
| | | | | | | | | | | | This change is motivated by the desire to see the text information in the debugger when not in developer mode. It is structured so user's can disable it if the capability is not wanted. R=bsalomon@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/197763008 git-svn-id: http://skia.googlecode.com/svn/trunk@13795 2bbb7eff-a529-9590-31e7-b0007b416f81
* Factory methods for heap-allocated SkImageFilter objects.Gravatar commit-bot@chromium.org2014-03-10
| | | | | | | | | | | | | | | | | | This is part of an effort to ensure that all SkPaint effects can only be allocated on the heap. This patch makes the constructors of SkImageFilter and its subclasses non-public and instead provides factory methods for creating these objects on the heap. We temporarily keep constructor of publicly visible classes public behind a flag. BUG=skia:2187 R=scroggo@google.com, mtklein@chromium.org, reed@google.com, senorblanco@google.com, senorblanco@chromium.org, bsalomon@google.com, sugoi@chromium.org, zork@chromium.org Author: dominikg@chromium.org Review URL: https://codereview.chromium.org/182983003 git-svn-id: http://skia.googlecode.com/svn/trunk@13718 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove dead codeGravatar reed@google.com2014-03-07
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@13711 2bbb7eff-a529-9590-31e7-b0007b416f81
* DM: also run benches once.Gravatar commit-bot@chromium.org2014-02-26
| | | | | | | | | | | | | | | | | | Also: - make GrMemoryPoolBenches threadsafe - some tweaks to various DM code - rename GM::shortName() to getName() to match benches and tests On my desktop, (289 GMs, 617 benches) x 4 configs, 227 tests takes 46s in Debug, 14s in Release. (Still minutes faster than running tests && bench && gm.) GPU singlethreading is definitely the limiting factor again; going to reexamine whether that's helpful to thread it again. BUG=skia: R=reed@google.com, bsalomon@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/178473006 git-svn-id: http://skia.googlecode.com/svn/trunk@13603 2bbb7eff-a529-9590-31e7-b0007b416f81
* Builder class for SkLayerRasterizer.Gravatar commit-bot@chromium.org2014-02-26
| | | | | | | | | | | | | | | | Provide builder class to make SkLayerRasterizer immutable. We have to keep the addLayer() methods for now because they are used in Chrome. They will be removed once this changed has been rolled into Chrome. An added benefit of this is that this class can only be allocated on the heap. BUG=skia:2187 R=reed@google.com, scroggo@google.com, mtklein@google.com Author: dominikg@chromium.org Review URL: https://codereview.chromium.org/176873004 git-svn-id: http://skia.googlecode.com/svn/trunk@13590 2bbb7eff-a529-9590-31e7-b0007b416f81
* add new copyTo version to SkBitmap, which takes SkColorTypeGravatar commit-bot@chromium.org2014-02-23
| | | | | | | | | | | BUG=skia: R=scroggo@google.com, halcanary@google.com, bsalomon@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/171723007 git-svn-id: http://skia.googlecode.com/svn/trunk@13553 2bbb7eff-a529-9590-31e7-b0007b416f81
* Factory methods for heap-allocated SkMaskFilter objects.Gravatar commit-bot@chromium.org2014-02-21
| | | | | | | | | | | | | | | | | | This is part of an effort to ensure that all SkPaint effects can only be allocated on the heap. This patch makes the constructors of SkMaskFilter and its subclasses non-public and instead provides factory methods for creating these objects on the heap. We temporarily keep constructor of publicly visible classes public behind a flag. BUG=skia:2187 R=scroggo@google.com, mtklein@google.com, reed@google.com Author: dominikg@chromium.org Review URL: https://codereview.chromium.org/173633003 git-svn-id: http://skia.googlecode.com/svn/trunk@13527 2bbb7eff-a529-9590-31e7-b0007b416f81
* Factory methods for heap-allocated SkPathEffect and SkXfermode objects.Gravatar commit-bot@chromium.org2014-02-20
| | | | | | | | | | | | | | | | | | | | | | | This is part of an effort to ensure that all SkPaint effects can only be allocated on the heap. This patch makes the constructors of SkPathEffect, SkXfermode and their subclasses non-public and instead provides factory methods for creating these objects on the heap. We temporarily keep the constructors of the following classes public to not break Chrome/Blink: SkXfermode SkCornerPathEffect SkDashPathEffect BUG=skia:2187 R=scroggo@google.com, reed@google.com, mtklein@google.com, bungeman@google.com Author: dominikg@chromium.org Review URL: https://codereview.chromium.org/166583002 git-svn-id: http://skia.googlecode.com/svn/trunk@13519 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
* 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
* use SkColorType instead of SkBitmap::Config in views/effectsGravatar commit-bot@chromium.org2014-02-16
| | | | | | | | | | | R=scroggo@google.com, reed@google.com TBR=scroggo Author: reed@chromium.org Review URL: https://codereview.chromium.org/168843002 git-svn-id: http://skia.googlecode.com/svn/trunk@13469 2bbb7eff-a529-9590-31e7-b0007b416f81
* add peekPixels to SkCanvas and SkSurfaceGravatar commit-bot@chromium.org2014-02-13
| | | | | | | | | | | | | | fix reference to SkBaseDevice, which was only a problem in no-gpu build This reverts commit 4fa44a6bf73891b21917fb90d02beef9143bffa3. R=reed@google.com Author: reed@chromium.org Review URL: https://codereview.chromium.org/163603003 git-svn-id: http://skia.googlecode.com/svn/trunk@13432 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert of add peekPixels to SkCanvas and SkSurface ↵Gravatar commit-bot@chromium.org2014-02-13
| | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/161733002/) Reason for revert: compile issues with gm/xfermodes3 Original issue's description: > add peekPixels to SkCanvas and SkSurface > > clone of https://codereview.chromium.org/159723006/ > > Committed: https://code.google.com/p/skia/source/detail?r=13427 R=jvanverth@google.com NOTREECHECKS=true NOTRY=true Author: reed@chromium.org Review URL: https://codereview.chromium.org/163823002 git-svn-id: http://skia.googlecode.com/svn/trunk@13428 2bbb7eff-a529-9590-31e7-b0007b416f81
* add peekPixels to SkCanvas and SkSurfaceGravatar mike@reedtribe.org2014-02-13
| | | | | | | | clone of https://codereview.chromium.org/159723006/ Review URL: https://codereview.chromium.org/161733002 git-svn-id: http://skia.googlecode.com/svn/trunk@13427 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make GMs aware of what tool they're being run in.Gravatar commit-bot@chromium.org2014-02-07
| | | | | | | | | | | | | Add a saveLayer set of draws to convex_poly_clip and fix GPU bug where polygon clips don't account for the translation between clip and device space. BUG=skia:2051 R=robertphillips@google.com, reed@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/148283017 git-svn-id: http://skia.googlecode.com/svn/trunk@13371 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert of Revert "Serialization of SkPictureImageFilter" ↵Gravatar commit-bot@chromium.org2014-02-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/153583007/) Reason for revert: New SKPs with version20 are in Google Storage due to http://108.170.219.160:10117/builders/Housekeeper-Nightly-RecreateSKPs/builds/22 Original issue's description: > Revert "Serialization of SkPictureImageFilter" > > This reverts commit 227321b30106e57942929eb96fa5bc22544f6c9e. > > Revert "Sanitizing source files in Housekeeper-Nightly" > > This reverts commit baf28584b7636c01355f8d8d972e06aa7fb66d77. > > TBR=robertphillips@google.com,sugoi@google.com > > Committed: https://code.google.com/p/skia/source/detail?r=13356 R=robertphillips@google.com, sugoi@google.com, fmalita@google.com, fmalita@chromium.org TBR=fmalita@chromium.org, fmalita@google.com, robertphillips@google.com, sugoi@google.com NOTREECHECKS=true NOTRY=true Author: rmistry@google.com Review URL: https://codereview.chromium.org/143163005 git-svn-id: http://skia.googlecode.com/svn/trunk@13357 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "Serialization of SkPictureImageFilter"Gravatar fmalita@google.com2014-02-07
| | | | | | | | | | | | | | This reverts commit 227321b30106e57942929eb96fa5bc22544f6c9e. Revert "Sanitizing source files in Housekeeper-Nightly" This reverts commit baf28584b7636c01355f8d8d972e06aa7fb66d77. TBR=robertphillips@google.com,sugoi@google.com Review URL: https://codereview.chromium.org/153583007 git-svn-id: http://skia.googlecode.com/svn/trunk@13356 2bbb7eff-a529-9590-31e7-b0007b416f81
* Serialization of SkPictureImageFilterGravatar commit-bot@chromium.org2014-02-07
| | | | | | | | | | | | | | BUG=skia: Committed: http://code.google.com/p/skia/source/detail?r=13347 R=senorblanco@google.com, reed@google.com, mtklein@google.com, sugoi@google.com, senorblanco@chromium.org, robertphillips@google.com, scroggo@google.com Author: sugoi@chromium.org Review URL: https://codereview.chromium.org/138063005 git-svn-id: http://skia.googlecode.com/svn/trunk@13354 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert of r13347 (Serialization of SkPictureImageFilter - ↵Gravatar robertphillips@google.com2014-02-06
| | | | | | https://codereview.chromium.org/138063005) due to bump in skp file format git-svn-id: http://skia.googlecode.com/svn/trunk@13348 2bbb7eff-a529-9590-31e7-b0007b416f81
* Serialization of SkPictureImageFilterGravatar commit-bot@chromium.org2014-02-06
| | | | | | | | | | | BUG=skia: R=senorblanco@google.com, reed@google.com, mtklein@google.com, sugoi@google.com, senorblanco@chromium.org, robertphillips@google.com, scroggo@google.com Author: sugoi@chromium.org Review URL: https://codereview.chromium.org/138063005 git-svn-id: http://skia.googlecode.com/svn/trunk@13347 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove SkCanvas::createCompatibleDevice, and add SkCanvas::newSurfaceGravatar reed@google.com2014-02-05
| | | | | | | | | BUG=skia: R=bsalomon@google.com Review URL: https://codereview.chromium.org/154163002 git-svn-id: http://skia.googlecode.com/svn/trunk@13319 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix samplefuzz, fix some 32/64bit warningsGravatar reed@google.com2014-02-04
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@13303 2bbb7eff-a529-9590-31e7-b0007b416f81
* Adding int cast to prevent warningGravatar commit-bot@chromium.org2014-02-03
| | | | | | | | | | | BUG=skia: R=fmalita@google.com, fmalita@chromium.org, bsalomon@google.com, bsalomon@chromium.org Author: sugoi@chromium.org Review URL: https://codereview.chromium.org/149463009 git-svn-id: http://skia.googlecode.com/svn/trunk@13285 2bbb7eff-a529-9590-31e7-b0007b416f81
* Initial QuadTree implementationGravatar commit-bot@chromium.org2014-02-03
| | | | | | | | | | | | | | | | | | In an effort to find a faster bounding box hierarchy than the R-Tree, a QuadTree has been implemented here. For now, the QuadTree construction is generally faster than the R-Tree and the queries are a bit slower, so overall, SKP local tests showed QuadTree performance similar to the R-Tree performance. Tests and bench are included in this cl. At this point, I'd like to be able to commit this in order to more easily use the bots to test multiple configurations and a larger number of SKPs. The R-Tree BBH is still used by default so this change shouldn't affect chromium. BUG=skia: R=junov@chromium.org, junov@google.com, senorblanco@google.com, senorblanco@chromium.org, reed@google.com, sugoi@google.com, fmalita@google.com Author: sugoi@chromium.org Review URL: https://codereview.chromium.org/131343011 git-svn-id: http://skia.googlecode.com/svn/trunk@13282 2bbb7eff-a529-9590-31e7-b0007b416f81
* Refactor read and write buffers.Gravatar commit-bot@chromium.org2014-01-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Eliminates SkFlattenable{Read,Write}Buffer, promoting SkOrdered{Read,Write}Buffer a step each in the hierarchy. What used to be this: SkFlattenableWriteBuffer -> SkOrderedWriteBuffer SkFlattenableReadBuffer -> SkOrderedReadBuffer SkFlattenableReadBuffer -> SkValidatingReadBuffer is now SkWriteBuffer SkReadBuffer -> SkValidatingReadBuffer Benefits: - code is simpler, names are less wordy - the generic SkFlattenableFooBuffer code in SkPaint was incorrect; removed - write buffers are completely devirtualized, important for record speed This refactoring was mostly mechanical. You aren't going to find anything interesting in files with less than 10 lines changed. BUG=skia: R=reed@google.com, scroggo@google.com, djsollen@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/134163010 git-svn-id: http://skia.googlecode.com/svn/trunk@13245 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
* Turn NVPR on by default (but off in tools).Gravatar commit-bot@chromium.org2014-01-24
| | | | | | | | | | | | | | BUG=skia:2042 Committed: http://code.google.com/p/skia/source/detail?r=13164 R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/144003006 git-svn-id: http://skia.googlecode.com/svn/trunk@13176 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "Turn NVPR on by default (but off in tools)."Gravatar halcanary@google.com2014-01-24
| | | | | | | | | | | | | | | | This reverts commit 83d81c96de34950bdd84dc575997a250b685a3d6. Broke Windows build. Autorevert didn't work. TBR=bsalomon@google.com,robertphillips@google.com NOTREECHECKS=true NOTRY=true NOPRESUBMIT=true BUG=skia:2042 Review URL: https://codereview.chromium.org/146863003 git-svn-id: http://skia.googlecode.com/svn/trunk@13169 2bbb7eff-a529-9590-31e7-b0007b416f81
* Turn NVPR on by default (but off in tools).Gravatar commit-bot@chromium.org2014-01-24
| | | | | | | | | | | BUG=skia:2042 R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/144003006 git-svn-id: http://skia.googlecode.com/svn/trunk@13164 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove unused SampleTests.cpp source file.Gravatar tfarina@chromium.org2014-01-23
| | | | | | | | | | | | We never compile this file. BUG=None TEST=tests R=reed@google.com, robertphillips@google.com Review URL: https://codereview.chromium.org/143823016 git-svn-id: http://skia.googlecode.com/svn/trunk@13157 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove SkScalarMul macroGravatar mike@reedtribe.org2014-01-23
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@13145 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove GetGr() hack.Gravatar commit-bot@chromium.org2014-01-22
| | | | | | | | | | | | | | It seems no GM are using this. BUG=None TEST=SampleApp R=bsalomon@google.com, caryclark@google.com Author: tfarina@chromium.org Review URL: https://codereview.chromium.org/144543003 git-svn-id: http://skia.googlecode.com/svn/trunk@13141 2bbb7eff-a529-9590-31e7-b0007b416f81
* Adding SkPictureImageFilter to the fuzzerGravatar commit-bot@chromium.org2014-01-16
| | | | | | | | | | | BUG=skia: R=senorblanco@google.com, senorblanco@chromium.org, sugoi@google.com Author: sugoi@chromium.org Review URL: https://codereview.chromium.org/140993004 git-svn-id: http://skia.googlecode.com/svn/trunk@13116 2bbb7eff-a529-9590-31e7-b0007b416f81
* Change to fuzzer for new constructorGravatar commit-bot@chromium.org2014-01-15
| | | | | | | | | | | BUG=skia: R=senorblanco@google.com, sugoi@google.com, senorblanco@chromium.org Author: sugoi@chromium.org Review URL: https://codereview.chromium.org/139613002 git-svn-id: http://skia.googlecode.com/svn/trunk@13099 2bbb7eff-a529-9590-31e7-b0007b416f81
* use some helper Make functions to initialize SkImageInfoGravatar commit-bot@chromium.org2014-01-15
| | | | | | | | | | | BUG= R=halcanary@google.com, scroggo@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/137993012 git-svn-id: http://skia.googlecode.com/svn/trunk@13081 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove remaining references to Sk64 (obsolete)Gravatar reed@google.com2014-01-13
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/136673002 git-svn-id: http://skia.googlecode.com/svn/trunk@13042 2bbb7eff-a529-9590-31e7-b0007b416f81
* SampleApp Cleanup:Gravatar halcanary@google.com2014-01-10
| | | | | | | | | | | | | | | - Set resoursePath to sensible default. - Remove verbosity of DitherBitmap. - SampleEncode no longer tries to mkdir('/encoded'), now stores encoded data in memory and uses the SkDecodingImageGenerator to decode. BUG= R=reed@google.com Review URL: https://codereview.chromium.org/132513003 git-svn-id: http://skia.googlecode.com/svn/trunk@13015 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add Options to SkDecodingImageGenerator, simplify API.Gravatar halcanary@google.com2014-01-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Motivation: We want to remove redundant classes from Skia. To that end we want to remove SkImageRef and its subclasses and replace their uses with SkDiscardablePixelRef + SkDecodingImageGenerator. Since Android uses SkImageRef, we need to make sure that SkDecodingImageGenerator allows all of the settings that Android exposes in BitmapFactory.Options. To that end, we have created an Options struct for the SkDecodingImageGenerator which lets the client of the generator set sample size, dithering, and bitmap config. We have made the SkDecodingImageGenerator constructor private and replaced the SkDecodingImageGenerator::Install functions with a SkDecodingImageGenerator::Create functions (one for SkData and one for SkStream) which now take a SkDecodingImageGenerator::Options struct. Also added a ImageDecoderOptions test which loops through a list of sets of options and tries them on a set of 5 small encoded images. Also updated several users of SkDecodingImageGenerator::Install to follow new call signature - gm/factory.cpp, LazyDecodeBitmap.cpp, and PictureTest.cpp, CachedDecodingPixelRefTest.cpp. We also added a new ImprovedBitmapFactory Test which simulates the exact function that Android will need to modify to use this, installPixelRef() in BitmapFactory. R=reed@google.com, scroggo@google.com Committed: https://code.google.com/p/skia/source/detail?r=12744 Review URL: https://codereview.chromium.org/93703004 git-svn-id: http://skia.googlecode.com/svn/trunk@12855 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert of https://codereview.chromium.org/93703004/Gravatar commit-bot@chromium.org2013-12-18
| | | | | | | | | | | | | | | Reason for revert: Test failures R=scroggo@google.com, djsollen@google.com, reed@google.com, halcanary@google.com TBR=djsollen@google.com, halcanary@google.com, reed@google.com, scroggo@google.com NOTREECHECKS=true NOTRY=true Author: robertphillips@google.com Review URL: https://codereview.chromium.org/103753007 git-svn-id: http://skia.googlecode.com/svn/trunk@12747 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add Options to SkDecodingImageGenerator, simplify API.Gravatar halcanary@google.com2013-12-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Motivation: We want to remove redundant classes from Skia. To that end we want to remove SkImageRef and its subclasses and replace their uses with SkDiscardablePixelRef + SkDecodingImageGenerator. Since Android uses SkImageRef, we need to make sure that SkDecodingImageGenerator allows all of the settings that Android exposes in BitmapFactory.Options. To that end, we have created an Options struct for the SkDecodingImageGenerator which lets the client of the generator set sample size, dithering, and bitmap config. We have made the SkDecodingImageGenerator constructor private and replaced the SkDecodingImageGenerator::Install functions with a SkDecodingImageGenerator::Create functions (one for SkData and one for SkStream) which now take a SkDecodingImageGenerator::Options struct. Also added a ImageDecoderOptions test which loops through a list of sets of options and tries them on a set of 5 small encoded images. Also updated several users of SkDecodingImageGenerator::Install to follow new call signature - gm/factory.cpp, LazyDecodeBitmap.cpp, and PictureTest.cpp, CachedDecodingPixelRefTest.cpp. We also added a new ImprovedBitmapFactory Test which simulates the exact function that Android will need to modify to use this, installPixelRef() in BitmapFactory. R=reed@google.com, scroggo@google.com Review URL: https://codereview.chromium.org/93703004 git-svn-id: http://skia.googlecode.com/svn/trunk@12744 2bbb7eff-a529-9590-31e7-b0007b416f81
* SamplePicture no longer uses SkImageRefGravatar halcanary@google.com2013-12-18
| | | | | | | | | | | | | | | Motivation: in an attempt to simplify life, we are depricating SkImageRef and its subclasses. To that end, SamplePicture will now use SkDiscardablePixelRef. Also, fixed missing resource. BUG= R=scroggo@google.com Review URL: https://codereview.chromium.org/116423006 git-svn-id: http://skia.googlecode.com/svn/trunk@12737 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fixed more fuzzer issuesGravatar commit-bot@chromium.org2013-12-17
| | | | | | | | | | | | | | | | - Added the "isAvailable" function to check how much bytes are remaining in the stream before doing potentially large mallocs. That way, we can signal a bad stream instead of crashing. - Added data validation in SkImageInfo.cpp - Added NULL pointer check in displacement - Modified the fuzzer for randomized bitmap types BUG=328934,329254 R=senorblanco@google.com, senorblanco@chromium.org, reed@google.com, sugoi@google.com Author: sugoi@chromium.org Review URL: https://codereview.chromium.org/116773002 git-svn-id: http://skia.googlecode.com/svn/trunk@12723 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 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
* Fix some presubmit warnings.Gravatar tfarina@chromium.org2013-12-14
| | | | | | | | | | | | | | | | | | | | | | | | I found this while running a modified version of v8's tools/presubmit.py script. samplecode/SampleImage.cpp does not end with a single new line. samplecode/SampleImageDir.cpp does not end with a single new line. src/ports/SkFontHost_sandbox_none.cpp does not end with a single new line. tests/FlatDataTest.cpp does not end with a single new line. tests/ImageCacheTest.cpp has trailing whitespaces in line 31. * Removed three empty files. * Add single new line to FlatDataTest.cpp * Removed trailing whitespace in ImageCacheTest.cpp BUG=None TEST=None R=bsalomon@google.com TBR=bsalomon@google.com Review URL: https://codereview.chromium.org/111503008 git-svn-id: http://skia.googlecode.com/svn/trunk@12684 2bbb7eff-a529-9590-31e7-b0007b416f81