aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
Commit message (Collapse)AuthorAge
* Remove unused SaveLayerInfo::fValid fieldGravatar robertphillips2014-10-09
| | | | | | Minor code cleanup Review URL: https://codereview.chromium.org/643713002
* FPs now use the correct builder types(just a rename)Gravatar joshualitt2014-10-09
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/648463003
* Force linking of static member variables for GLProgramsGravatar joshualitt2014-10-09
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/614163002
* gl programs rewriteGravatar joshualitt2014-10-09
| | | | | | | | BUG=skia: Committed: https://skia.googlesource.com/skia/+/07a255310aca9f3e83bf741dc663a58818ad681c Review URL: https://codereview.chromium.org/628633003
* rename command line flag to avoid conflict, use very verboseGravatar caryclark2014-10-09
| | | | | | | | TBR= NOTRY=true NOTREECHECKS=true Review URL: https://codereview.chromium.org/645573003
* Add SkBBoxHierarchy::reserve() as an optional size hint.Gravatar mtklein2014-10-09
| | | | | | | | | | | | I want to play around with how SkTileGrid stores its tiles. Having a cap on the number of insert() calls can be pretty handy. While I'm at it, I gave flush() a default empty impl. Like reserve(), it's really an optional hook for subclasses. BUG=skia: Review URL: https://codereview.chromium.org/639933003
* try again to fix ios buildGravatar caryclark2014-10-09
| | | | | | | | TBR= NOTRY=true NOTREECHECKS=true Review URL: https://codereview.chromium.org/638403002
* fix ios buildGravatar caryclark2014-10-09
| | | | | | | | NOTREECHECKS=true NOTRY=true TBR= Review URL: https://codereview.chromium.org/641063002
* Draw more accurate thick-stroked Beziers (disabled)Gravatar caryclark2014-10-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Draw thick-stroked Beziers by computing the outset quadratic, measuring the error, and subdividing until the error is within a predetermined limit. To try this CL out, change src/core/SkStroke.h:18 to #define QUAD_STROKE_APPROXIMATION 1 or from the command line: CPPFLAGS="-D QUAD_STROKE_APPROXIMATION=1" ./gyp_skia Here's what's in this CL: bench/BezierBench.cpp : a microbench for examining where the time is going gm/beziers.cpp : random Beziers with various thicknesses gm/smallarc.cpp : a distillation of bug skia:2769 samplecode/SampleRotateCircles.cpp : controls added for error, limit, width src/core/SkStroke.cpp : the new stroke implementation (disabled) tests/StrokerTest.cpp : a stroke torture test that checks normal and extreme values The new stroke algorithm has a tweakable parameter: stroker.setError(1); (SkStrokeRec.cpp:112) The stroke error is the allowable gap between the midpoint of the stroke quadratic and the center Bezier. As the projection from the quadratic approaches the endpoints, the error is decreased proportionally so that it is always inside the quadratic curve. An overview of how this works: - For a given T range of a Bezier, compute the perpendiculars and find the points outset and inset for some radius. - Construct tangents for the quadratic stroke. - If the tangent don't intersect between them (may happen with cubics), subdivide. - If the quadratic stroke end points are close (again, may happen with cubics), draw a line between them. - Compute the quadratic formed by the intersecting tangents. - If the midpoint of the quadratic is close to the midpoint of the Bezier perpendicular, return the quadratic. - If the end of the stroke at the Bezier midpoint doesn't intersect the quad's bounds, subdivide. - Find where the Bezier midpoint ray intersects the quadratic. - If the intersection is too close to the quad's endpoints, subdivide. - If the error is large proportional to the intersection's distance to the quad's endpoints, subdivide. BUG=skia:723,skia:2769 Review URL: https://codereview.chromium.org/558163005
* Make the Sk GL context class an abstract base classGravatar kkinnunen2014-10-09
| | | | | | | | | | | | | | | | | | | | | | | Make the Sk GL context class, SkGLNativeContext, an abstract base class. Before, it depended on ifdefs to implement the platform dependent polymorphism. Move the logic to subclasses of the various platform implementations. This a step to enable Skia embedders to compile dm and bench_pictures. The concrete goal is to support running these test apps with Chromium command buffer. With this change, Chromium can implement its own version of SkGLNativeContext that uses command buffer, and host the implementation in its own repository. Implements the above by renaming the SkGLContextHelper to SkGLContext and removing the unneeded SkGLNativeContext. Also removes SkGLNativeContext::AutoRestoreContext functionality, it appeared to be unused: no use in Skia code, and no tests. BUG=skia:2992 Committed: https://skia.googlesource.com/skia/+/a90ed4e83897b45d6331ee4c54e1edd4054de9a8 Review URL: https://codereview.chromium.org/630843002
* GrResourceCache2 manages scratch texture.Gravatar bsalomon2014-10-08
| | | | | | BUG=skia:2889 Review URL: https://codereview.chromium.org/608883003
* Add SkCachedData and use it for SkMipMapGravatar reed2014-10-08
| | | | | | | | This reverts commit 37c5a815d8ea33247968212ef4cc83394ceee1bc. TBR=mtklein Review URL: https://codereview.chromium.org/635333002
* Revert of Make the Sk GL context class an abstract base class (patchset #4 ↵Gravatar bsalomon2014-10-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | id:60001 of https://codereview.chromium.org/630843002/) Reason for revert: nanobech failing on Android Original issue's description: > Make the Sk GL context class an abstract base class > > Make the Sk GL context class, SkGLNativeContext, an abstract base class. Before, > it depended on ifdefs to implement the platform dependent polymorphism. Move > the logic to subclasses of the various platform implementations. > > This a step to enable Skia embedders to compile dm and bench_pictures. The > concrete goal is to support running these test apps with Chromium command buffer. > > With this change, Chromium can implement its own version of SkGLNativeContext > that uses command buffer, and host the implementation in its own repository. > > Implements the above by renaming the SkGLContextHelper to SkGLContext and > removing the unneeded SkGLNativeContext. Also removes > SkGLNativeContext::AutoRestoreContext functionality, it appeared to be unused: > no use in Skia code, and no tests. > > BUG=skia:2992 > > Committed: https://skia.googlesource.com/skia/+/a90ed4e83897b45d6331ee4c54e1edd4054de9a8 TBR=kkinnunen@nvidia.com NOTREECHECKS=true NOTRY=true BUG=skia:2992 Review URL: https://codereview.chromium.org/639793002
* Make the Sk GL context class an abstract base classGravatar kkinnunen2014-10-08
| | | | | | | | | | | | | | | | | | | | | Make the Sk GL context class, SkGLNativeContext, an abstract base class. Before, it depended on ifdefs to implement the platform dependent polymorphism. Move the logic to subclasses of the various platform implementations. This a step to enable Skia embedders to compile dm and bench_pictures. The concrete goal is to support running these test apps with Chromium command buffer. With this change, Chromium can implement its own version of SkGLNativeContext that uses command buffer, and host the implementation in its own repository. Implements the above by renaming the SkGLContextHelper to SkGLContext and removing the unneeded SkGLNativeContext. Also removes SkGLNativeContext::AutoRestoreContext functionality, it appeared to be unused: no use in Skia code, and no tests. BUG=skia:2992 Review URL: https://codereview.chromium.org/630843002
* Cleanup of shader building systemGravatar joshualitt2014-10-07
| | | | | | | | | | | | | | | | | this is a huge refactor and cleanup of the gl shader building system in Skia. The entire shader building pipeline is now part of GrGLProgramCreator, which takes a gp, and some fps, and creates a program. I added some subclasses of GrGLProgram to handle the eccentricities of Nvpr/Nvpres. Outside of the builders folder and GrGLPrograms, this change is basically just a rename solo gp BUG=skia: Committed: https://skia.googlesource.com/skia/+/fe1233c3f12f81bb675718516bbb32f72af726ec Review URL: https://codereview.chromium.org/611653002
* Revert of Cleanup of shader building system (patchset #25 id:470001 of ↵Gravatar joshualitt2014-10-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/611653002/) Reason for revert: Seems to have messed up windows 7 gms Original issue's description: > Cleanup of shader building system > > this is a huge refactor and cleanup of the gl shader building system in > Skia. The entire shader building pipeline is now part of > GrGLProgramCreator, which takes a gp, and some fps, and creates a > program. I added some subclasses of GrGLProgram to handle the > eccentricities of Nvpr/Nvpres. Outside of the builders folder > and GrGLPrograms, this change is basically just a rename > > > solo gp > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/fe1233c3f12f81bb675718516bbb32f72af726ec TBR=bsalomon@google.com NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/635533005
* Cleanup of shader building systemGravatar joshualitt2014-10-07
| | | | | | | | | | | | | | | this is a huge refactor and cleanup of the gl shader building system in Skia. The entire shader building pipeline is now part of GrGLProgramCreator, which takes a gp, and some fps, and creates a program. I added some subclasses of GrGLProgram to handle the eccentricities of Nvpr/Nvpres. Outside of the builders folder and GrGLPrograms, this change is basically just a rename solo gp BUG=skia: Review URL: https://codereview.chromium.org/611653002
* Revert "GrResourceCache2 manages scratch texture."Gravatar Brian Salomon2014-10-07
| | | | This reverts commit d14e1a27643125bfef37fa0ed314b64c1fae22b7.
* Add SkPaint::getHash().Gravatar mtklein2014-10-07
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/637583002
* Revert of gl programs rewrite (patchset #10 id:180001 of ↵Gravatar joshualitt2014-10-07
| | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/628633003/) Reason for revert: breaks angle bot Original issue's description: > gl programs rewrite > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/07a255310aca9f3e83bf741dc663a58818ad681c TBR=bsalomon@google.com,egdaniel@google.com NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/631183003
* gl programs rewriteGravatar joshualitt2014-10-07
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/628633003
* GrResourceCache2 manages scratch texture.Gravatar bsalomon2014-10-07
| | | | | | BUG=skia:2889 Review URL: https://codereview.chromium.org/608883003
* Make createOptDrawState return NULL if we would end up not drawingGravatar egdaniel2014-10-07
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/630063002
* Plumb OptDrawState down to VertexShaderBuilderGravatar egdaniel2014-10-06
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/628293002
* Remove globals from tests/CanvasTest.cppGravatar piotaixr2014-10-03
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/617093004
* Speculative revert to diagnose crash in chrome. Revert "Add SkCachedData and ↵Gravatar reed2014-10-03
| | | | | | | | | | | use it for SkMipMap" This reverts commit 92561a0b99ad6c08ab7a11dd1872f028199392e9. crasher in question: https://code.google.com/p/chromium/issues/detail?id=420178 Review URL: https://codereview.chromium.org/617613003
* Add isSingleComponent bool to getConstantColorComponentGravatar egdaniel2014-10-03
| | | | | | | | | | Initial step to allowing effects to use/output 1 or 4 color/coverage components. This cl doesn't change any current logic and all effects still assume they are working with 4 components. BUG=skia: Committed: https://skia.googlesource.com/skia/+/3b8af078281a5a20f951b9fd84f38d92b8f6217b Review URL: https://codereview.chromium.org/608253002
* abort op early if path isn't parseableGravatar caryclark2014-10-03
| | | | | | | TBR= BUG=419649 Review URL: https://codereview.chromium.org/623943002
* Add SkCachedData and use it for SkMipMapGravatar reed2014-10-02
| | | | Review URL: https://codereview.chromium.org/592843003
* Revert of Add isSingleComponent bool to getConstantColorComponent (patchset ↵Gravatar robertphillips2014-10-02
| | | | | | | | | | | | | | | | | | | | | | | #6 id:100001 of https://codereview.chromium.org/608253002/) Reason for revert: Changing some GMs Original issue's description: > Add isSingleComponent bool to getConstantColorComponent > > Initial step to allowing effects to use/output 1 or 4 color/coverage components. This cl doesn't change any current logic and all effects still assume they are working with 4 components. > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/3b8af078281a5a20f951b9fd84f38d92b8f6217b TBR=joshualitt@chromium.org,bsalomon@google.com,reed@google.com,egdaniel@google.com NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/617853003
* Caching the result of readPixelsSupportedGravatar piotaixr2014-10-02
| | | | | | | | | | | | | | | | | 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 Review URL: https://codereview.chromium.org/364193004
* Add isSingleComponent bool to getConstantColorComponentGravatar egdaniel2014-10-02
| | | | | | | | Initial step to allowing effects to use/output 1 or 4 color/coverage components. This cl doesn't change any current logic and all effects still assume they are working with 4 components. BUG=skia: Review URL: https://codereview.chromium.org/608253002
* Demote getCount, getDepth, and clear to RTree-only methods.Gravatar mtklein2014-10-02
| | | | | | | | We use them only to test RTree. BUG=skia: Review URL: https://codereview.chromium.org/622773003
* Archive more dead code.Gravatar mtklein2014-10-02
| | | | | | | | These classes were used by QuadTree, which has been archived (with prejudice). BUG=skia: Review URL: https://codereview.chromium.org/616963006
* BBHs: void* data -> unsigned dataGravatar mtklein2014-10-02
| | | | | | | | | | | | | | Now that the old backend's not using BBHs, we can specialize them for SkRecord's needs. The only thing we really want to store is op index, which should always be small enough to fit into an unsigned (unsigned also helps keep it straight from other ints floating around). This means we'll need half (32-bit) or a quarter (64-bit) the bytes in SkTileGrid, because we don't have to store an extra int for ordering. BUG=skia:2834 Review URL: https://codereview.chromium.org/617393004
* Don't adjust the bounds after a restore with the restore's paired ↵Gravatar mtklein2014-10-01
| | | | | | | | | | | | saveLayer's paint. It makes no sense for the paint from a saveLayer to effect anything outside its saveLayer/restore block. But as currently written, we'll adjust the clip bounds just after a restore by that paint. Turns out the test I wrote for the last CL (which caused this bug) actually had the bug baked into its expectations. I've updated them and added some notes to explain. BUG=418417 Review URL: https://codereview.chromium.org/623563002
* Remove DEPRECATED_beginRecording().Gravatar mtklein2014-10-01
| | | | | | | | | | | | | | | This removes: 1) ability to record old pictures with SkPictureRecorder; 2) a couple tests specific to the old backend. The functionality of DEPRECATED_beginRecording() now lives in (private) SkPicture::Backport(), which is the only place we need it now. BUG=skia: TBR=reed@google.com Review URL: https://codereview.chromium.org/618303002
* Update GrRecordReplaceDraw to use SkTDynamicHash & add ReplaceDrawGravatar robertphillips2014-10-01
| | | | | | | | | | | | Having hoisted layers from different pictures invalidates the assumptions of the old GrReplacements object. This is fixed by switching to a SkTDynamicHash-based back-end. Sub-picture-layers also require that the replacement drawing occur for the sub-pictures too. The ReplaceDraw object is added to make this happen and limit the replacement lookup to saveLayer draw commands. This is split out of (Fix sub-picture layer rendering bugs - https://codereview.chromium.org/597293002/). BUG=skia:2315 Review URL: https://codereview.chromium.org/607763008
* Archive more dead code.Gravatar mtklein2014-09-30
| | | | | | | | | BUG=skia: R=reed@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/617003004
* Strip old backend recording down to essentialsGravatar mtklein2014-09-30
| | | | | | | | | | | | | | | | | | | | | | | | | Feature-wise, this removes: 1) BBH support; 2) peephole optimizations; 3) record-time text op specializations; 4) the guarantee that SkPaints are flattened. This deletes the optimizations GM, which only exists to test the peepholes of the old backend. SkRecord optimizations are unit tested, and if that ever fails we can think about adding another GM like this, but they're different enough we'd want to start from scratch anyway. We need to keep the code that plays back the specialized text ops around for a while for compatibility with existing .SKPs that have those ops recorded. BUG=skia: CQ_EXTRA_TRYBOTS=tryserver.skia:Canary-Chrome-Ubuntu13.10-Ninja-x86_64-ToT-Trybot R=robertphillips@google.com, reed@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/617953002
* Make "priv" classes for GrTexure and GrSurface.Gravatar bsalomon2014-09-30
| | | | | | | | R=robertphillips@google.com, egdaniel@google.com, joshualitt@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/596053002
* Revert of Make "priv" classes for GrTexure and GrSurface. (patchset #9 ↵Gravatar robertphillips2014-09-30
| | | | | | | | | | | | | | | | | | | | | | | id:260001 of https://codereview.chromium.org/596053002/) Reason for revert: Breaking the Chrome builds with: lib/libcc.so: error: undefined reference to 'GrAutoScratchTexture::detach()' (http://108.170.220.120:10117/builders/Canary-Chrome-Ubuntu13.10-Ninja-x86_64-DRT/builds/2990/steps/Retry_BuildContentShell_1/logs/stdio) Original issue's description: > Make "priv" classes for GrTexure and GrSurface. R=egdaniel@google.com, joshualitt@google.com, bsalomon@google.com TBR=bsalomon@google.com, egdaniel@google.com, joshualitt@google.com NOTREECHECKS=true NOTRY=true Author: robertphillips@google.com Review URL: https://codereview.chromium.org/618733002
* Revert of GrResourceCache2 manages scratch texture. (patchset #14 id:260001 ↵Gravatar robertphillips2014-09-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | of https://codereview.chromium.org/608883003/) Reason for revert: Turning bots red: Nanobench seems to be uniformly failing on Android (http://108.170.220.21:10117/builders/Perf-Android-Venue8-PowerVR-x86-Release/builds/99/steps/RunNanobench/logs/stdio) Ubuntu GTX660 32bit is failing in both Debug and Release on GM generation (it appears to be out of memory) (http://108.170.220.120:10117/builders/Test-Ubuntu12-ShuttleA-GTX660-x86-Debug/builds/2457/steps/GenerateGMs/logs/stdio) Original issue's description: > GrResourceCache2 manages scratch texture. > > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/3d398c876440deaab39bbf2a9b881c337e6dc8d4 R=bsalomon@google.com TBR=bsalomon@google.com NOTREECHECKS=true NOTRY=true BUG=skia: Author: robertphillips@google.com Review URL: https://codereview.chromium.org/611383003
* GrResourceCache2 manages scratch texture.Gravatar bsalomon2014-09-30
| | | | | | | | | BUG=skia: R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/608883003
* Make "priv" classes for GrTexure and GrSurface.Gravatar bsalomon2014-09-29
| | | | | | | | R=robertphillips@google.com, egdaniel@google.com, joshualitt@google.com, joshualitt@chromium.org Author: bsalomon@google.com Review URL: https://codereview.chromium.org/596053002
* remove alphatype from colortableGravatar reed2014-09-29
| | | | | | | | | | | the owning bitmap is (already) responsible for knowing the alphatype BUG=skia: R=djsollen@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/611093002
* Move offset and CTM from LayerCache Key to per-hoisted-layer infoGravatar robertphillips2014-09-29
| | | | | | | | | | | | | | | | | | This CL reduces the amount of information used in the layer cache key: - the stop value isn't needed since the start value uniquely identifies the layer in the picture. - only the upper-left 2x2 portion of the CTM should be used as a key for looking up cached layers. - individual layers can be redraw in different locations so the final offset cannot be a part of the key. Since this data is no longer stored in the cached layer, but is still required to draw the cached layer, it is now stored in the per-layer information (i.e., HoistedLayer). This is split out of (Fix sub-picture layer rendering bugs - https://codereview.chromium.org/597293002/). BUG=skia:2315 R=egdaniel@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/609403003
* Sanitize SkMatrixConvolutionImageFilter creation params.Gravatar senorblanco2014-09-29
| | | | | | | | | | | Apply the same memory limit in the Create() function that we do when deserializing. R=reed@google.com Author: senorblanco@chromium.org Review URL: https://codereview.chromium.org/610723002
* fail on extremely large coincident curvesGravatar caryclark2014-09-29
| | | | | | | | | TBR= BUG=418381 Author: caryclark@google.com Review URL: https://codereview.chromium.org/607913007
* Update RecordReplaceDrawTest to generate and pass picturesGravatar robertphillips2014-09-29
| | | | | | | | | | | | This CL splits the unit test changes out of (Fix sub-picture layer rendering bugs - https://codereview.chromium.org/597293002/). For various reasons GrRecordReplaceDraw now needs to take an SkPicture (rather than an SkRecord and a BBH). R=egdaniel@google.com, bsalomon@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/608823002