aboutsummaryrefslogtreecommitdiffhomepage
path: root/gyp/tests.gypi
Commit message (Collapse)AuthorAge
* Finish removing GrTHashTableGravatar robertphillips2014-07-29
| | | | | | | | | | This class is no longer used in Ganesh (in favor of SkTDynamicHash) R=jvanverth@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/421253003
* fix android_framework build do to missing library at link timeGravatar djsollen2014-07-22
| | | | | | | | R=scroggo@google.com Author: djsollen@google.com Review URL: https://codereview.chromium.org/407073006
* Run CanvasState test across a library boundary.Gravatar scroggo2014-07-22
| | | | | | | | | | | | | | | | | | | | | | | | Refactor CanvasStateTest to pull out functions which can either be called directly or from a shared library. Add a command line flag to pass in the path to a library to open to call those functions from. Separate different CanvasTest tests into separate DEF_TEST tests. This allows them to be run in parallel. Move the ifdefs outside of function declarations to skip running CanvasTest tests which do nothing. Add the canvas_state_lib target. It is a shared library that exports some functions to be called by another version of Skia. BUG=b/15693384 R=djsollen@google.com, reed@google.com Author: scroggo@google.com Review URL: https://codereview.chromium.org/400043003
* share dm and command flagsGravatar caryclark2014-07-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Share command flags between dm and unit tests. Also, allow dm's core to be included by itself and iOSShell. Command line flags that are the same (or nearly the same) in DM and in skia_tests have been moved to common_flags. Authors, please check to see that the shared common flag is correct for the tool. For iOS, the 'tool_main' entry point has a wrapper to allow multiple tools to be statically linked in the iOSShell. Since SkCommandLineFlags::Parse can only be called once, these calls are disabled in the IOS build. Since the iOS app directory is dynamically assigned a name, use '@' to select it. (This is the same convention chosen by the Mobile Harness iOS file system utilities.) Move the heart of dm.gyp into dm.gypi so that it can be included by itself and iOSShell.gyp. Add tools/flags/SkCommonFlags.* to define and declare common command line flags. Add support for dm to iOSShell. BUG=skia: R=scroggo@google.com, mtklein@google.com, jvanverth@google.com, bsalomon@google.com Author: caryclark@google.com Review URL: https://codereview.chromium.org/389653004
* Skia side RGB to YUV gpu conversionGravatar sugoi2014-07-21
| | | | | | | | | | | This code is the one that's currently working in my local chromium build. A few things still need to be addressed and I'll highlight these directly in the code. BUG=skia: R=reed@google.com, bsalomon@google.com, senorblanco@google.com, senorblanco@chromium.org, robertphillips@google.com, scroggo@google.com, halcanary@google.com Author: sugoi@chromium.org Review URL: https://codereview.chromium.org/374743003
* Set maximum output size for scaled-image-cache imagesGravatar halcanary2014-07-17
| | | | | | | | | | | | | | Accessable via: SkScaledImageCache::{G,S}etMaximumOutputSizeForHighQualityFilter Also, a unit test. BUG=389439 R=humper@google.com, tomhudson@google.com, reveman@chromium.org, vangelis@chromium.org, reed@google.com Author: halcanary@google.com Review URL: https://codereview.chromium.org/394003003
* 32 bpp floating point texturesGravatar joshualitt2014-07-16
| | | | | | | | | | | This is VERY preliminary, but it was sufficient for me to get 32 bit floating point textures in a sample app BUG=skia: R=bsalomon@chromium.org, bsalomon@google.com Author: joshualitt@chromium.org Review URL: https://codereview.chromium.org/359803003
* Revert of Reopened: Caching the result of readPixelsSupported ↵Gravatar bungeman2014-07-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/364193004/) Reason for revert: This appears to be causing failures on Android when running tests. Original issue's description: > Caching the result of readPixelsSupported > > The call was calling GR_GL_GetIntegerv 2 times for each readPixels > and thus was causing a loss of performance > > (resubmit of issue 344793008) > > Benchmark url: http://packages.gkny.fr/tst/index.html > > BUG=skia:2681 > > Committed: https://skia.googlesource.com/skia/+/753a2964afe5661ce9b2a8ca77ca9d0aabd3173c > > Committed: https://skia.googlesource.com/skia/+/8339371f1ec3c57a0741932fd96bff32c53d4e54 R=junov@chromium.org, reed@chromium.org, bsalomon@chromium.org, mtklein@google.com, bsalomon@google.com, piotaixr@chromium.org TBR=bsalomon@chromium.org, bsalomon@google.com, junov@chromium.org, mtklein@google.com, piotaixr@chromium.org, reed@chromium.org NOTREECHECKS=true NOTRY=true BUG=skia:2681 Author: bungeman@google.com Review URL: https://codereview.chromium.org/395203002
* Caching the result of readPixelsSupportedGravatar piotaixr2014-07-15
| | | | | | | | | | | | | | | | | | | The call was calling GR_GL_GetIntegerv 2 times for each readPixels and thus was causing a loss of performance (resubmit of issue 344793008) Benchmark url: http://packages.gkny.fr/tst/index.html BUG=skia:2681 Committed: https://skia.googlesource.com/skia/+/753a2964afe5661ce9b2a8ca77ca9d0aabd3173c R=junov@chromium.org, reed@chromium.org, bsalomon@chromium.org, mtklein@google.com, bsalomon@google.com Author: piotaixr@chromium.org Review URL: https://codereview.chromium.org/364193004
* Deleted SkImage::newShaderClamp: not used, not implemented.Gravatar piotaixr2014-07-14
| | | | | | | | | | | Implemented SkImage::newShader. BUG=skia:2701, 344804 R=junov@chromium.org, reed@chromium.org, bsalomon@chromium.org, reed@google.com Author: piotaixr@chromium.org Review URL: https://codereview.chromium.org/345463009
* Revert "Remove ability for Release code to call getRefCnt() or getWeakRefCnt()."Gravatar Mike Klein2014-07-09
| | | | | | | | This reverts commit 4ae94ffce5ecf1b71cb5e295b68bf4ec9e697443. BUG=skia: Review URL: https://codereview.chromium.org/382523002
* Cleanup: Rename UnitTestTest.cpp to RTConfRegistryTest.cppGravatar tfarina2014-07-08
| | | | | | | | | | BUG=None TEST=make tests R=mtklein@google.com Author: tfarina@chromium.org Review URL: https://codereview.chromium.org/374443002
* Remove ability for Release code to call getRefCnt() or getWeakRefCnt().Gravatar mtklein2014-07-08
| | | | | | | | | | | | | | | | | These getRefCnt() methods are not thread safe, so Skia code should not be calling them. unique() is fine. SkDEBUG code (SkASSERTs) can still call getRefCnt() / getWeakRefCnt(). This adds tools/RefCntIs.{h,cpp}, which lets tests make their assertions in both debug and release modes. BUG=skia:2726 R=senorblanco@chromium.org, mtklein@google.com, reed@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/378643003
* Begin atlasingGravatar robertphillips2014-06-30
| | | | | | | | | | | | | | | | | | | This CL makes it possible for pulled-forward-layers to be atlased. It currently has a couple glaring limitations (which is why it is disabled): 1) the atlased layers cannot be purged nor aged out 2) the texture backing the atlas is not pulled from (or returned to) the resource cache #1 is on hold until we have a recycling rectanizer A separate major limitation (the non-atlased layers aren't cached) is blocked until we can transmute entries in the resource cache from scratch to non-scratch while potentially preserving their contents. Committed: https://skia.googlesource.com/skia/+/55e61f0ef4e5c8c34ac107deaadc9b4ffef3111b R=bsalomon@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/354533004
* Revert of Begin atlasing (https://codereview.chromium.org/354533004/)Gravatar robertphillips2014-06-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Reason for revert: Sigh Original issue's description: > Begin atlasing > > This CL makes it possible for pulled-forward-layers to be atlased. It currently has a couple glaring limitations (which is why it is disabled): > > 1) the atlased layers cannot be purged nor aged out > 2) the texture backing the atlas is not pulled from (or returned to) the resource cache > > #1 is on hold until we have a recycling rectanizer > > A separate major limitation (the non-atlased layers aren't cached) is blocked until we can transmute entries in the resource cache from scratch to non-scratch while potentially preserving their contents. > > Committed: https://skia.googlesource.com/skia/+/55e61f0ef4e5c8c34ac107deaadc9b4ffef3111b R=bsalomon@google.com TBR=bsalomon@google.com NOTREECHECKS=true NOTRY=true Author: robertphillips@google.com Review URL: https://codereview.chromium.org/359953002
* Begin atlasingGravatar robertphillips2014-06-29
| | | | | | | | | | | | | | | | | This CL makes it possible for pulled-forward-layers to be atlased. It currently has a couple glaring limitations (which is why it is disabled): 1) the atlased layers cannot be purged nor aged out 2) the texture backing the atlas is not pulled from (or returned to) the resource cache #1 is on hold until we have a recycling rectanizer A separate major limitation (the non-atlased layers aren't cached) is blocked until we can transmute entries in the resource cache from scratch to non-scratch while potentially preserving their contents. R=bsalomon@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/354533004
* Promote SkInterpolator unit test to our tests driver.Gravatar tfarina2014-06-26
| | | | | | | | | | BUG=None TEST=make tests && out/Debug/tests -m Interpolator R=mtklein@google.com, bsalomon@google.com Author: tfarina@chromium.org Review URL: https://codereview.chromium.org/351713005
* Rename TestSize.cpp to SizeTest.cppGravatar tfarina2014-06-25
| | | | | | | | | | | | | | | | It is the only file where Test is the prefix rather than the sufix. This patch fixes that so it matches with the rest of the files under tests/ directory. And separate SkISize test into its own DEF_TEST(). BUG=None TEST=make tests && out/Debug/tests R=mtklein@google.com Author: tfarina@chromium.org Review URL: https://codereview.chromium.org/337783007
* Add GYP target for sk_tool_utils.* component.Gravatar tfarina2014-06-21
| | | | | | | | | | | | | | This declares a static library target in gyp/sk_tool_utils.gyp, so other targets can depend directly on it instead of including the source file in their source lists. BUG=None TEST=make all R=mtklein@google.com Author: tfarina@chromium.org Review URL: https://codereview.chromium.org/348623006
* Move BenchTimer to tools as TimerGravatar mtklein2014-06-20
| | | | | | | | | | | | | | | This breaks a bunch of circular dependencies between tools and gm and bench. BUG=skia: Committed: https://skia.googlesource.com/skia/+/4ed75287aed6371c6e4a41ffcc78c8a49c9810ed CQ_EXTRA_TRYBOTS=tryserver.skia:Build-Mac10.7-Clang-Arm7-Debug-iOS-Trybot,Test-Ubuntu12-ShuttleA-GTX660-x86-Debug-Trybot R=tfarina@chromium.org, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/344213003
* Revert of Move BenchTimer to tools as Timer ↵Gravatar mtklein2014-06-20
| | | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/344213003/) Reason for revert: GpuTimer broken Original issue's description: > Move BenchTimer to tools as Timer > > This breaks a bunch of circular dependencies between tools and gm and bench. > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/4ed75287aed6371c6e4a41ffcc78c8a49c9810ed R=tfarina@chromium.org, mtklein@chromium.org TBR=mtklein@chromium.org, tfarina@chromium.org NOTREECHECKS=true NOTRY=true BUG=skia: Author: mtklein@google.com Review URL: https://codereview.chromium.org/346753003
* Move BenchTimer to tools as TimerGravatar mtklein2014-06-20
| | | | | | | | | | | This breaks a bunch of circular dependencies between tools and gm and bench. BUG=skia: R=tfarina@chromium.org, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/344213003
* Refactor how we handle resources path in Tests.Gravatar tfarina2014-06-18
| | | | | | | | | | | | | This idea emerged while doing https://codereview.chromium.org/321723002/ (commit 880914c35c8f7fc2e9c57134134c883baf66e538). BUG=None TEST=make tests && out/Debug/tests R=mtklein@google.com Author: tfarina@chromium.org Review URL: https://codereview.chromium.org/346453002
* Add EXPERIMENTAL_beginRecording() for SkRecord-based recording.Gravatar mtklein2014-06-17
| | | | | | | | | | | | | The interesting stuff is in SkPictureRecorder.{h,cpp}. The rest is mostly moving SkRecord from its own directories into core to avoid circular dependencies in GYP. After plumbing SkRecord all the way through in Picture, I'll delete its old entry point include/record/SkRecording.h. For now it and record.gypi need to stay where they are to keep Chrome building. BUG=skia: R=reed@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/331573004
* Cleanup: Delete sk_tools::make_filepath() in favor of SkOSPath::SkPathJoin().Gravatar tfarina2014-06-12
| | | | | | | | | | BUG=None TEST=make tools tests && out/Debug/tests R=epoger@google.com Author: tfarina@chromium.org Review URL: https://codereview.chromium.org/327403002
* Texture compression unit tests along with a couple of bug fixesGravatar krajcevski2014-06-11
| | | | | | | | R=robertphillips@google.com Author: krajcevski@google.com Review URL: https://codereview.chromium.org/330453005
* Generate path names on the client sideGravatar cdalton2014-06-09
| | | | | | | | | | | | | | Pre-allocates a range of path names and manages allocations within that range on the client side. This allows us to generate new path objects in a feed-forward manner that doesn't require round trips to the GL server. BUG=skia: R=bsalomon@google.com, markkilgard@gmail.com Author: cdalton@nvidia.com Review URL: https://codereview.chromium.org/304403003
* Initial KTX encoderGravatar krajcevski2014-06-06
| | | | | | | | | | | The encoder comes with tests to check that the encoding/decoding operations between ETC encoded bitmaps and ARGB bitmaps are sane. R=bsalomon@google.com, robertphillips@google.com Author: krajcevski@google.com Review URL: https://codereview.chromium.org/312353003
* Test font created from paintGravatar commit-bot@chromium.org2014-05-30
| | | | | | | | | | | | This is meant to allow clients to migrate over to a SkFont api on canvas (e.g. drawText(text, font, paint)) while still permitting the current setters in paint (e.g. setTextSize, setFlags). R=bungeman@google.com, eae@chromium.org, fmalita@google.com, fmalita@chromium.org Author: reed@google.com Review URL: https://codereview.chromium.org/245953003 git-svn-id: http://skia.googlecode.com/svn/trunk@14997 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add testing for Rectanizer-derived classesGravatar commit-bot@chromium.org2014-05-29
| | | | | | | | | | | | This in preparation for expanding the Rectanizer API for removing rects and adding a new derived class R=jvanverth@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/304313002 git-svn-id: http://skia.googlecode.com/svn/trunk@14972 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add pattern matchers for SkRecordGravatar commit-bot@chromium.org2014-05-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a mid-level library for finding patterns of commands in an SkRecord. At the API level, it's a bit regex inspired. Some examples: - Pattern1<Is<DrawRect>> matches a single DrawRect - Pattern1<Star<Is<DrawRect>>> matches 0 or more DrawRects - Pattern2<Is<ClipRect>, Is<DrawRect>> matches a single clip rect followed by a single draw rect - Pattern3<Is<Save>, Star<IsDraw>, Is<Restore>> matches a single Save, followed by any number of Draws, followed by Restore - Pattern1<Or<Is<DrawRect>, Is<ClipRect>>> matches a DrawRect or a ClipRect - Pattern1<Not<Is<ClipRect>>> matches a command that's notClipRect. Once you have a pattern, you can call .search() on it to step through ranges of matching commands. This means patterns can replace most of the custom iteration logic for optimization passes: the generic pattern searching steps through all the optimization candidates, which optimization-specific code further inspects and mutates. SkRecordTraits is now unused. Bye bye! Generated code and performance of SkRecordOpts is very similar to what it was before. (I had to use SK_ALWAYS_INLINE in a few places to make this so.) BUG=skia:2378 R=fmalita@chromium.org, bungeman@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/263063002 git-svn-id: http://skia.googlecode.com/svn/trunk@14582 2bbb7eff-a529-9590-31e7-b0007b416f81
* Backfill unit tests for SkRecordGravatar commit-bot@chromium.org2014-04-30
| | | | | | | | | | | BUG=skia:2378 R=fmalita@chromium.org, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/251133008 git-svn-id: http://skia.googlecode.com/svn/trunk@14455 2bbb7eff-a529-9590-31e7-b0007b416f81
* Refactor SkPictureStateTree::Iterator to avoid use of kClip_SaveFlag.Gravatar commit-bot@chromium.org2014-04-28
| | | | | | | | | | | | | | | | | The current implementation relies on soon-to-be-deprecated kClip_SaveFlag behavior. Updated to use default save flags (kMatrixClip_SaveFlag) and stop assuming that the matrix survives restore() calls. R=junov@chromium.org, reed@google.com, robertphillips@chromium.org, robertphillips@google.com Committed: http://code.google.com/p/skia/source/detail?r=14319 Author: fmalita@chromium.org Review URL: https://codereview.chromium.org/246893005 git-svn-id: http://skia.googlecode.com/svn/trunk@14421 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add asADash entry point into SkPathEffect to allow extracting Dash info from ↵Gravatar commit-bot@chromium.org2014-04-22
| | | | | | | | | | | | | PathEffects BUG=skia: R=bsalomon@google.com, reed@google.com Author: egdaniel@google.com Review URL: https://codereview.chromium.org/212103010 git-svn-id: http://skia.googlecode.com/svn/trunk@14297 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fixes for SkPictureShader.Gravatar commit-bot@chromium.org2014-04-21
| | | | | | | | | | | | | | | | | | | | | Update comment in header to make it more clear that the picture should be unaltered after creating the shader. We want our shaders to be immutable, and this supports that. Make the factory return NULL if the shader would have never drawn anyway i.e. for a null picture or picture with no width/height. Addresses comments I brought up in https://codereview.chromium.org/221923007/#msg16. BUG=skia:1976 R=reed@google.com, fmalita@chromium.org, robertphillips@google.com Author: scroggo@google.com Review URL: https://codereview.chromium.org/238253005 git-svn-id: http://skia.googlecode.com/svn/trunk@14288 2bbb7eff-a529-9590-31e7-b0007b416f81
* SkRecord: turn on cull annotation pass in public API.Gravatar commit-bot@chromium.org2014-04-14
| | | | | | | | | | | | | | | Also, switch Skia internal tools over to use the public headers where possible. Where it's not, the tools -Isrc/record explicitly now, and if it's not obvious, note why they don't use SkRecording.h. BUG=skia:2378 R=reed@google.com, mtklein@google.com, fmalita@chromium.org Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/231853006 git-svn-id: http://skia.googlecode.com/svn/trunk@14191 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add a focused public API for src/record.Gravatar commit-bot@chromium.org2014-04-10
| | | | | | | | | | | BUG=skia:2378 R=reed@google.com, robertphillips@google.com, mtklein@google.com, fmalita@chromium.org Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/233053005 git-svn-id: http://skia.googlecode.com/svn/trunk@14146 2bbb7eff-a529-9590-31e7-b0007b416f81
* Create SkLayerRasterizer w/o destroying Builder.Gravatar commit-bot@chromium.org2014-04-10
| | | | | | | | | | | | | | | | | | | | | Add a new method to SkLayerRasterizer::Builder that creates a new SkLayerRasterizer without destroying the Builder. Necessary to continue to support Android's API. Also fix a bug where creating a Builder and never calling detachRasterizer results in not calling the destructor for any SkPaints in the Builder. Add tests. BUG=b/13729784 R=reed@google.com, dominikg@chromium.org Author: scroggo@google.com Review URL: https://codereview.chromium.org/233673002 git-svn-id: http://skia.googlecode.com/svn/trunk@14139 2bbb7eff-a529-9590-31e7-b0007b416f81
* SkRecordDraw: skip draw ops when the clip is emptyGravatar commit-bot@chromium.org2014-04-09
| | | | | | | | | | | | | | - Adds tests for SkRecordDraw's two main features: cull- and clip- based skipping. - Adds full SkCanvas semantic mode to SkRecorder, so it can be used as a target for SkRecordDraw. BUG=skia:2378 R=fmalita@chromium.org, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/231653002 git-svn-id: http://skia.googlecode.com/svn/trunk@14124 2bbb7eff-a529-9590-31e7-b0007b416f81
* SkRecord: make culling work if SkRecordAnnotateCullingPairs is called.Gravatar commit-bot@chromium.org2014-04-08
| | | | | | | | | | | | | | | | - Allow stateful functors; allow visit()/mutate() at a given index; add count(). - Annotate cull push/pop pairs on the PushCull records. (tested) - Use those annotations to skip ahead in SkRecordDraw. (not yet tested beyond dm --skr) - Make SkRecordDraw a function, move its implementation to a .cpp. BUG=skia:2378 R=fmalita@chromium.org, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/229523002 git-svn-id: http://skia.googlecode.com/svn/trunk@14101 2bbb7eff-a529-9590-31e7-b0007b416f81
* More SkRecord TODOs:Gravatar commit-bot@chromium.org2014-04-08
| | | | | | | | | | | | | | - add basic test for SkRecorder - rejigger GYPs so that the include dir comes along with the dependency BUG=skia:2378 R=fmalita@chromium.org, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/227673011 git-svn-id: http://skia.googlecode.com/svn/trunk@14099 2bbb7eff-a529-9590-31e7-b0007b416f81
* Start on some unwritten SkRecord TODOs:Gravatar commit-bot@chromium.org2014-04-08
| | | | | | | | | | | | | | - add SK_OVERRIDE for SkCanvas methods in SkRecorder - start on unit tests, here just for SkRecord itself BUG=skia:2378 R=fmalita@google.com, mtklein@google.com, fmalita@chromium.org Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/228723003 git-svn-id: http://skia.googlecode.com/svn/trunk@14097 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add removeShuffle to SkTArray and add SkTArray tests.Gravatar bungeman@google.com2014-03-21
| | | | | | | | R=reed@google.com Review URL: https://codereview.chromium.org/208153008 git-svn-id: http://skia.googlecode.com/svn/trunk@13895 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add reg test for http://crbug.com/348821Gravatar commit-bot@chromium.org2014-03-18
| | | | | | | | | | | BUG=348821 R=reed@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/189373008 git-svn-id: http://skia.googlecode.com/svn/trunk@13852 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fast implementation of QuadTreeGravatar commit-bot@chromium.org2014-03-17
| | | | | | | | | | | | | Rewritten to avoid memory allocations. BUG=skia:2242 R=tomhudson@google.com, mtklein@google.com, reed@google.com, robertphillips@google.com Author: iancottrell@google.com Review URL: https://codereview.chromium.org/187233002 git-svn-id: http://skia.googlecode.com/svn/trunk@13826 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add SkCanvas::writePixels that takes info+pixels directlyGravatar commit-bot@chromium.org2014-03-07
| | | | | | | | | | | | | add corresponding methods to device (w/ diff name to avoid colliding with exising virtuals) BUG=skia: R=bsalomon@google.com, robertphillips@google.com, junov@google.com, junov@chromium.org Author: reed@google.com Review URL: https://codereview.chromium.org/180113010 git-svn-id: http://skia.googlecode.com/svn/trunk@13697 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add a class to allocate small objects w/o extra calls to new.Gravatar commit-bot@chromium.org2014-03-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add SkSmallAllocator, a template for allocating small (as defined by the instantiation) objects without extra calls to new. Add a helper macro to make using it simple. Remove SkTemplatesPriv.h, whose behavior is replaced by SkSmallAllocator. The old SK_PLACEMENT_NEW had the following drawbacks: - Easily confused with SkNEW_PLACEMENT. - Requires passing around lots of void*s along with the storageSize. - Requires using a separate class for deleting it. - We had multiple ways Auto objects for deleting in different places. - It always did a straight heap allocation on Windows, meaning Windows did not get any advantages from the confusing code. The new SkSmallAllocator simplifies things: - It is clear about what it does. - It takes care of the deletion in one place that is automatically handled. Further, the new class can be used to create more than one object. This is in preparation for BUG=skia:1976, for which we would like to create a new object without extra heap allocations. The plan is to create both the blitter and the new object on the stack using the SkSmallAllocator. Add a new test for SkSmallAllocator. SkShader.h: Move the private version of CreateBitmapShader to SkBitmapProcShader (which already has the implementation) and remove the friend class (which was only used to call this private function). This allows SkSmallAllocator to reside in the private src/ directory. SkBitmapProcShader: Move CreateBitmapShader and the macro for the storage size here. With the macro in a (private) header, the (private) headers with function declarations (which now depend on the storage size used) can see the macro. Use SkSmallAllocator in CreateBitmapShader. Change the macro to kBlitterStorageByteCount, since SkSmallAllocator takes a byte count as its template parameter. SkBlitter: Use the SkSmallAllocator. Remove Sk3DShader::fKillProc and SkAutoCallProc. Both of their behaviors have been moved into SkSmallAllocator (SkAutoCallProc was unnecessary anyway, because the only time we ever used it we also called detach(), so its auto behavior never happened). Create the Sk3DShader on the stack, if there's room. Remove the helper version of Choose, which was unused. SmallAllocatorTest: Test for the new class. The rest: Use SkSmallAllocator. BUG=skia:1976 R=reed@google.com, mtklein@google.com Author: scroggo@google.com Review URL: https://codereview.chromium.org/179343005 git-svn-id: http://skia.googlecode.com/svn/trunk@13696 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove SK_SUPPORT_DEEPCOPYTO_CONFIG code -- no longer usedGravatar commit-bot@chromium.org2014-03-05
| | | | | | | | | | | R=reed@google.com TBR=bsalomon@google.com Author: reed@chromium.org Review URL: https://codereview.chromium.org/183763035 git-svn-id: http://skia.googlecode.com/svn/trunk@13664 2bbb7eff-a529-9590-31e7-b0007b416f81
* Rename test files to end with Test.cpp.Gravatar commit-bot@chromium.org2014-03-03
| | | | | | | | | | | | | | | | DM builds all of {bench,gm,test}/*.cpp. A Windows build warned us that we were trying to link typeface.obj twice. This must have something to do with there existing gm/typeface.cpp and tests/Typeface.cpp. To be safe, make sure tests have a Test.cpp suffix to disambiguate. BUG=skia: R=rmistry@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/185923002 git-svn-id: http://skia.googlecode.com/svn/trunk@13644 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add GrSet class built on top of RedBlackTreeGravatar commit-bot@chromium.org2014-02-27
| | | | | | | | | | | BUG=skia: R=bsalomon@google.com Author: egdaniel@google.com Review URL: https://codereview.chromium.org/176903003 git-svn-id: http://skia.googlecode.com/svn/trunk@13616 2bbb7eff-a529-9590-31e7-b0007b416f81