aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
Commit message (Collapse)AuthorAge
...
* SkRectShaderImageFilter: add a workaround for the zero-sized rects currently ↵Gravatar senorblanco@chromium.org2013-10-11
| | | | | | | | | | | passed by Blink. BUG=306488 R=robertphillips@google.com, robertphillips Review URL: https://codereview.chromium.org/26799004 git-svn-id: http://skia.googlecode.com/svn/trunk@11733 2bbb7eff-a529-9590-31e7-b0007b416f81
* Use #if insteadof #ifdef DYNAMIC_ANNOTATIONS_ENABLED. It's always defined, ↵Gravatar senorblanco@chromium.org2013-10-11
| | | | | | | | | | | just to 0 or 1. BUG= R=mtklein Review URL: https://codereview.chromium.org/26358010 git-svn-id: http://skia.googlecode.com/svn/trunk@11731 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix double ref issue in SkPDFFont ctorGravatar robertphillips@google.com2013-10-11
| | | | | | | | https://codereview.chromium.org/26799003/ git-svn-id: http://skia.googlecode.com/svn/trunk@11724 2bbb7eff-a529-9590-31e7-b0007b416f81
* SK_ONCE for SkMatrix::I()Gravatar commit-bot@chromium.org2013-10-10
| | | | | | | | | | | | | | Going to start doing these in progressively larger and larger bulk, but I figured the first few changes probably merit caution. BUG= R=reed@google.com, bungeman@google.com Author: mtklein@google.com Review URL: https://codereview.chromium.org/26905002 git-svn-id: http://skia.googlecode.com/svn/trunk@11721 2bbb7eff-a529-9590-31e7-b0007b416f81
* Implement crop rect support for SkRectShaderImageFilter: remove fRect and ↵Gravatar senorblanco@chromium.org2013-10-10
| | | | | | | | | | use the cropRect from SkImageFilter in its place. R=reed@google.com Review URL: https://codereview.chromium.org/26009004 git-svn-id: http://skia.googlecode.com/svn/trunk@11720 2bbb7eff-a529-9590-31e7-b0007b416f81
* Align SkLumaColorFilter with the spec.Gravatar commit-bot@chromium.org2013-10-10
| | | | | | | | | | | | | | | | | | | | | | | | | The spec requires the resulting RGB channels for LuminanceToAlpha to be 0 (and not just scaled by the luminance value</facepalm>): | R' | | 0 0 0 0 0 | | R | | G' | | 0 0 0 0 0 | | G | | B' | = | 0 0 0 0 0 | * | B | | A' | | 0.2125 0.7154 0.0721 0 0 | | A | | 1 | | 0 0 0 0 1 | | 1 | (http://www.w3.org/TR/2011/REC-SVG11-20110816/filters.html#feColorMatrixElement) This doesn't affect luminance masking (which depends only on the resulting alpha channel), but other color filter users may care about all color components. R=bsalomon@google.com, reed@google.com, robertphillips@google.com Author: fmalita@chromium.org Review URL: https://codereview.chromium.org/26467003 git-svn-id: http://skia.googlecode.com/svn/trunk@11713 2bbb7eff-a529-9590-31e7-b0007b416f81
* SkThreadPool: tweak two little things that have been annoying meGravatar commit-bot@chromium.org2013-10-10
| | | | | | | | | | | | | | 1) it's pretty annoying that SkThreadPool doesn't include SkRunnable for us; 2) add wait() so we don't have to keep using SkAutoTDelete/free() to wait for completion. BUG= R=scroggo@google.com, reed@google.com Author: mtklein@google.com Review URL: https://codereview.chromium.org/26470005 git-svn-id: http://skia.googlecode.com/svn/trunk@11711 2bbb7eff-a529-9590-31e7-b0007b416f81
* make explicit the requirement that all colorfilters are reentrant-safeGravatar reed@google.com2013-10-10
| | | | | | | | | BUG= R=mtklein@google.com Review URL: https://codereview.chromium.org/26876002 git-svn-id: http://skia.googlecode.com/svn/trunk@11705 2bbb7eff-a529-9590-31e7-b0007b416f81
* Always clear dest in SkBitmap::copyTo's draw pathGravatar robertphillips@google.com2013-10-10
| | | | | | | | https://codereview.chromium.org/26268003/ git-svn-id: http://skia.googlecode.com/svn/trunk@11697 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
* Change SkImageFilter's cropRect from SkIRect to a CropRect struct, ↵Gravatar senorblanco@chromium.org2013-10-10
| | | | | | | | | | | | | | containing an SkRect and flags indicating which parameters are set. NOTE: this will require SK_CROP_RECT_IS_INT=1 to be set in Chrome until Blink has been updated to use SkImageFilter::CropRect. Include https://codereview.chromium.org/26528002/ with the Skia roll. Note also that SK_CROP_RECT_IS_INT is a temporary measure until all call sites in Blink have been updated to use SkRect. R=reed@google.com Review URL: https://codereview.chromium.org/26371002 git-svn-id: http://skia.googlecode.com/svn/trunk@11692 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-10-10
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@11691 2bbb7eff-a529-9590-31e7-b0007b416f81
* Express (GLSL expression, possibly known value) pairs as a classGravatar commit-bot@chromium.org2013-10-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Express (GLSL expression, possibly known value) pairs as a class instead of two variables Introduces GrGLSLExpr<N> to encapsulate the expression and possibly constant-folded value of the expression. This simplifies passing of the expressions to functions. Changes the shaders with following patterns: { // Stage 0: Linear Gradient vec4 colorTemp = mix(uGradientStartColor_Stage0, uGradientEndColor_Stage0, clamp(vMatrixCoord_Stage0.x, 0.0, 1 colorTemp.rgb *= colorTemp.a; - output_Stage0 = vec4((vColor) * (colorTemp)); + output_Stage0 = (vColor * colorTemp); + } Previously the vector cast was always added if constant folding was effective, regardless of the term dimensions. Now the vector upcast is not inserted in places where it is not needed, ie. when the binary operator term is of the target dimension. Also, some parentheses can be omitted. It is assumed that GrGLSLExpr<N>("string") constructors construct a simple expression or parenthesized expression. Otherwise the shader code remains identical. R=jvanverth@google.com, bsalomon@google.com, robertphillips@google.com Author: kkinnunen@nvidia.com Review URL: https://codereview.chromium.org/25048002 git-svn-id: http://skia.googlecode.com/svn/trunk@11690 2bbb7eff-a529-9590-31e7-b0007b416f81
* SkDocument api changes (abort, close return success, set DCT encoder...).Gravatar commit-bot@chromium.org2013-10-09
| | | | | | | | | | R=reed@google.com, reed Author: edisonn@google.com Review URL: https://codereview.chromium.org/26744002 git-svn-id: http://skia.googlecode.com/svn/trunk@11688 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove _impl from names in SkOnce.h.Gravatar commit-bot@chromium.org2013-10-09
| | | | | | | | | | | | | | This is entirely to make power users (me, Mike's per-object use case) feel less bad about calling sk_once() directly with args not created by DEF_SK_ONCE. BUG= R=bungeman@google.com Author: mtklein@google.com Review URL: https://codereview.chromium.org/26129010 git-svn-id: http://skia.googlecode.com/svn/trunk@11686 2bbb7eff-a529-9590-31e7-b0007b416f81
* low hanging calloc fruitGravatar commit-bot@chromium.org2013-10-09
| | | | | | | | | | | BUG= R=reed@google.com, robertphillips@google.com Author: mtklein@google.com Review URL: https://codereview.chromium.org/24267014 git-svn-id: http://skia.googlecode.com/svn/trunk@11683 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add swapBuffer call to SkGLContextHelper.Gravatar djsollen@google.com2013-10-09
| | | | | | | | R=bsalomon@google.com Review URL: https://codereview.chromium.org/26701002 git-svn-id: http://skia.googlecode.com/svn/trunk@11682 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
* Sketch of SK_ONCEGravatar mtklein@google.com2013-10-09
| | | | | | | | | BUG= R=bungeman@google.com Review URL: https://codereview.chromium.org/26563002 git-svn-id: http://skia.googlecode.com/svn/trunk@11674 2bbb7eff-a529-9590-31e7-b0007b416f81
* Implement stroking a path with nv_path_renderingGravatar commit-bot@chromium.org2013-10-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | Initialize the path stroke properties in the GrGLPath constructor. Use StencilStrokePath and CoverStrokePath to stroke the path. The order of the GL calls is: 1. StencilFill, if needed 2. StencilStroke, if needed 2a. CoverStroke, if stroke was applied 2b. CoverFill, if stroke was not applied The reason for not pairing StencilFill + CoverFill, StencilStroke + CoverStroke is that Skia API does not allow separate fill and stroke color within one call. Covering the stroke bounding box should also cover the fill bounding box. Causes different rendering in gm/dashcubics due to different rendering algorithm. (?) (TODO: this should be resolved somehow.) R=bsalomon@google.com, markkilgard@gmail.com, cdalton@nvidia.com Author: kkinnunen@nvidia.com Review URL: https://codereview.chromium.org/23440049 git-svn-id: http://skia.googlecode.com/svn/trunk@11672 2bbb7eff-a529-9590-31e7-b0007b416f81
* flush after every print in windowsGravatar commit-bot@chromium.org2013-10-09
| | | | | | | | | | R=djsollen@google.com, reed@google.com, epoger@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/26680004 git-svn-id: http://skia.googlecode.com/svn/trunk@11670 2bbb7eff-a529-9590-31e7-b0007b416f81
* ARM Skia NEON patches - 28 - Xfermode: SIMD modeprocsGravatar commit-bot@chromium.org2013-10-09
| | | | | | | | | | | | | | | | | | | | | | Xfermode: allow for SIMD modeprocs This patch introduces the ability to have SIMD Xfermode modeprocs. In the NEON implementation, SIMD modeprocs will process 8 pixels at a time. Signed-off-by: Kévin PETIT <kevin.petit@arm.com> BUG= Committed: http://code.google.com/p/skia/source/detail?r=11654 R=djsollen@google.com, mtklein@google.com, reed@google.com Author: kevin.petit.arm@gmail.com Review URL: https://codereview.chromium.org/23644006 git-svn-id: http://skia.googlecode.com/svn/trunk@11669 2bbb7eff-a529-9590-31e7-b0007b416f81
* Implement filling a path with nv_path_rendering coverGravatar commit-bot@chromium.org2013-10-09
| | | | | | | | | | | | | | | | | | Implement filling a path with nv_path_rendering cover functionality. The nv_path_rendering cover can be used if the fill is non-inverted and the draw operation does not require use of vertex shaders. Moves code for the inverted fill from GrStencilAndCoverPathRenderer down to GrGpuGL. R=bsalomon@google.com, markkilgard@gmail.com, cdalton@nvidia.com Author: kkinnunen@nvidia.com Review URL: https://codereview.chromium.org/22686002 git-svn-id: http://skia.googlecode.com/svn/trunk@11667 2bbb7eff-a529-9590-31e7-b0007b416f81
* try uping the cache-count-limit to see if it speeds up bench-picturesGravatar reed@google.com2013-10-09
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/25118003 git-svn-id: http://skia.googlecode.com/svn/trunk@11663 2bbb7eff-a529-9590-31e7-b0007b416f81
* Improve SkScalerContext_GDI::generateCharToGlyph for non-BMP code points.Gravatar bungeman@google.com2013-10-08
| | | | | | | | | | Sometimes, when ScriptShape is presented with a surrogate pair which does not map to a glyph, it returns two space glyphs instead of .notdef (0). Detect this class of issues and handle appropriately. git-svn-id: http://skia.googlecode.com/svn/trunk@11660 2bbb7eff-a529-9590-31e7-b0007b416f81
* Allow sampling GIF images during decode.Gravatar commit-bot@chromium.org2013-10-08
| | | | | | | | | | | | | | | | | | | | | | SkScaledBitmapSampler: Add a mode for sampling rows out of order, used by GIF decoder for interlaced images. Add a getter for the X sampling rate. SkImageDecoder_libgif: Respect the sampleSize set on SkImageDecoder. skimage_main: Provide an option to set a sample size. BUG=https://b.corp.google.com/issue?id=8999690 R=reed@google.com, djsollen@google.com, halcanary@google.com Author: scroggo@google.com Review URL: https://codereview.chromium.org/25354004 git-svn-id: http://skia.googlecode.com/svn/trunk@11659 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix uninitialized memory accessGravatar robertphillips@google.com2013-10-08
| | | | | | | | https://codereview.chromium.org/26529002/ git-svn-id: http://skia.googlecode.com/svn/trunk@11658 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "ARM Skia NEON patches - 28 - Xfermode: SIMD modeprocs"Gravatar djsollen@google.com2013-10-08
| | | | | | | | This reverts http://code.google.com/p/skia/source/detail?r=11654 Review URL: https://codereview.chromium.org/26340010 git-svn-id: http://skia.googlecode.com/svn/trunk@11655 2bbb7eff-a529-9590-31e7-b0007b416f81
* ARM Skia NEON patches - 28 - Xfermode: SIMD modeprocsGravatar commit-bot@chromium.org2013-10-08
| | | | | | | | | | | | | | | | | | | Xfermode: allow for SIMD modeprocs This patch introduces the ability to have SIMD Xfermode modeprocs. In the NEON implementation, SIMD modeprocs will process 8 pixels at a time. Signed-off-by: Kévin PETIT <kevin.petit@arm.com> BUG= R=djsollen@google.com, mtklein@google.com, reed@google.com Author: kevin.petit.arm@gmail.com Review URL: https://codereview.chromium.org/23644006 git-svn-id: http://skia.googlecode.com/svn/trunk@11654 2bbb7eff-a529-9590-31e7-b0007b416f81
* Update #if to #ifdef for consistencyGravatar commit-bot@chromium.org2013-10-08
| | | | | | | | | | R=mtklein@google.com Author: djsollen@google.com Review URL: https://codereview.chromium.org/26495002 git-svn-id: http://skia.googlecode.com/svn/trunk@11653 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix memory leak in SkPDFRasterizerGravatar robertphillips@google.com2013-10-08
| | | | | | | | https://codereview.chromium.org/26373005/ git-svn-id: http://skia.googlecode.com/svn/trunk@11652 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix ambiguity in API if no matching system language is foundGravatar commit-bot@chromium.org2013-10-07
| | | | | | | | | | R=reed@google.com, wangxianzhu@chromium.org Author: djsollen@google.com Review URL: https://codereview.chromium.org/26325003 git-svn-id: http://skia.googlecode.com/svn/trunk@11641 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix for blinking/corrupted text in Canvas 2D.Gravatar commit-bot@chromium.org2013-10-07
| | | | | | | | | | | | | | Ensure that we update the drawToken for a glyph's plot every time it is used, not just when the glyph is first added. BUG=303803 R=junov@chromium.org, bsalomon@google.com Author: jvanverth@google.com Review URL: https://codereview.chromium.org/26253003 git-svn-id: http://skia.googlecode.com/svn/trunk@11637 2bbb7eff-a529-9590-31e7-b0007b416f81
* Luminance-to-alpha color filter (SkLumaColorFilter).Gravatar commit-bot@chromium.org2013-10-07
| | | | | | | | | | | | | Adding a color filter luma implementation. The plan is to convert existing clients and then deprecate SkLumaXfermode. R=bsalomon@google.com, reed@google.com, robertphillips@google.com Author: fmalita@chromium.org Review URL: https://codereview.chromium.org/25453004 git-svn-id: http://skia.googlecode.com/svn/trunk@11636 2bbb7eff-a529-9590-31e7-b0007b416f81
* style nit for myself retroactively: throwOnFailure -> throw_on_failureGravatar commit-bot@chromium.org2013-10-07
| | | | | | | | | | | BUG= R=reed@google.com Author: mtklein@google.com Review URL: https://codereview.chromium.org/26298002 git-svn-id: http://skia.googlecode.com/svn/trunk@11635 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make skia almost compile again with clang.Gravatar commit-bot@chromium.org2013-10-07
| | | | | | | | | | | | clang is reporting many unused functions and variables. R=bsalomon@google.com, robertphillips@google.com, reed@google.com Author: tfarina@chromium.org Review URL: https://codereview.chromium.org/26167002 git-svn-id: http://skia.googlecode.com/svn/trunk@11630 2bbb7eff-a529-9590-31e7-b0007b416f81
* pdf: drawPath should pass the computed matrix, instead of default matrix ↵Gravatar edisonn@google.com2013-10-07
| | | | | | | | | | | | stored in draw. moved cl https://codereview.chromium.org/24265006/ in git repository so I can run the trybots R=vandebo@chromium.org Review URL: https://codereview.chromium.org/25675011 git-svn-id: http://skia.googlecode.com/svn/trunk@11626 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add perspective support to SkMatrix44 initializers.Gravatar commit-bot@chromium.org2013-10-05
| | | | | | | | | | | | | | | | | | | | I noticed SkMatrix <-> SkMatrix44 conversions were dropping the perspective values on the floor. As we use SkMatrix44 heavily in Chromium, I'm concerned this missing code will cause a bug eventually. It should be correct to simply use the bottom row of the 4x4 matrix excluding the third column. Previously committed and reverted, second attempt with fix for incorrect use of SkMScalar/SkScalar. BUG= R=reed@google.com, caryclark@google.com Author: aelias@chromium.org Review URL: https://codereview.chromium.org/25484006 git-svn-id: http://skia.googlecode.com/svn/trunk@11624 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "Add perspective support to SkMatrix44 initializers."Gravatar aelias@chromium.org2013-10-04
| | | | | | This reverts commit 93db1bcae0863feed8d00a61ae2cf72a90a0083c. git-svn-id: http://skia.googlecode.com/svn/trunk@11623 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add perspective support to SkMatrix44 initializers.Gravatar commit-bot@chromium.org2013-10-04
| | | | | | | | | | | | | | | | | I noticed SkMatrix <-> SkMatrix44 conversions were dropping the perspective values on the floor. As we use SkMatrix44 heavily in Chromium, I'm concerned this missing code will cause a bug eventually. It should be correct to simply use the bottom row of the 4x4 matrix excluding the third column. BUG= R=reed@google.com Author: aelias@chromium.org Review URL: https://codereview.chromium.org/25484006 git-svn-id: http://skia.googlecode.com/svn/trunk@11622 2bbb7eff-a529-9590-31e7-b0007b416f81
* Use vertexless shaders when NVpr is availableGravatar commit-bot@chromium.org2013-10-04
| | | | | | | | | | | | | | | | Adds support for vertexless shaders and enables them when NV_path_rendering is available. This takes a GrGLFragmentOnlyShaderBuilder class, a GrGLTexGenEffectArray class, support for setting TexGen and the projection matrix in GrGpuGL, and code for setting the GL fixed function state where necessary. R=bsalomon@google.com, kkinnunen@nvidia.com Author: cdalton@nvidia.com Review URL: https://codereview.chromium.org/25846002 git-svn-id: http://skia.googlecode.com/svn/trunk@11620 2bbb7eff-a529-9590-31e7-b0007b416f81
* Mutex protect SkFontMgr_DirectWrite cache.Gravatar bungeman@google.com2013-10-04
| | | | | | | | | | | SkFontMgr_DirectWrite is constant, except for its typeface cache. Protect this cache in the face of multiple threads. R=robertphillips@google.com Review URL: https://codereview.chromium.org/26023002 git-svn-id: http://skia.googlecode.com/svn/trunk@11615 2bbb7eff-a529-9590-31e7-b0007b416f81
* commit to xfermode objects being immutableGravatar commit-bot@chromium.org2013-10-04
| | | | | | | | | | | BUG= R=djsollen@google.com, mtklein@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/25968004 git-svn-id: http://skia.googlecode.com/svn/trunk@11614 2bbb7eff-a529-9590-31e7-b0007b416f81
* When cache is full delay flush until GrContext draw is finishedGravatar commit-bot@chromium.org2013-10-04
| | | | | | | | | | R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/25673004 git-svn-id: http://skia.googlecode.com/svn/trunk@11613 2bbb7eff-a529-9590-31e7-b0007b416f81
* Move VertexBuilder to a GrGLFullShaderBuilder subclassGravatar commit-bot@chromium.org2013-10-04
| | | | | | | | | | | | | | | | | | | Removes the VertexBuilder nested class from GrGLShaderBuilder in favor of a new GrGLFullShaderBuilder subclass, and adds an optional emitCode overload to GrGLEffect that takes a GrGLFullShaderBuilder. Makes setData virtual in GrGLEffectArray and adds a GrGLVertexEffectArray subclass that gets built using a GrGLFullShaderBuilder. Also adds a new GrGLVertexEffect subclass that makes the GrGLFullShaderBuilder overload required for emitCode, and updates GrGLEffects to inherit from GrGLVertexEffect where needed. R=bsalomon@google.com Author: cdalton@nvidia.com Review URL: https://codereview.chromium.org/25474006 git-svn-id: http://skia.googlecode.com/svn/trunk@11612 2bbb7eff-a529-9590-31e7-b0007b416f81
* Don't access RT when disabling scissor.Gravatar commit-bot@chromium.org2013-10-04
| | | | | | | | | | R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/25446004 git-svn-id: http://skia.googlecode.com/svn/trunk@11608 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix SkScalar conversion warning error.Gravatar halcanary@google.com2013-10-04
| | | | | | | | | | This was causing probems on the Win build. R=caryclark@google.com Review URL: https://codereview.chromium.org/26011002 git-svn-id: http://skia.googlecode.com/svn/trunk@11604 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make image decoding more fault resistant, less verbose.Gravatar halcanary@google.com2013-10-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change address what happens when a jpeg is partially downloaded before failing. Many browsers will render it anyway: we want Skia to do the same. The JpegTest takes a perfectly cromulent jpeg file and only passes into the ImageDecoder the first half of the image. We then verify that the image decoder returns a valid bitmap of the correct dimensions. We also fixed some png library errors, including issue 1691. Also, suppressed the majority of warnings from using libpng and libjpeg. By default, most warnings are *not* suppressed in debug mode. If you have a debug binary and wish to suppress warnings, set the following environment variables to true skia_images_png_suppressDecoderWarnings skia_images_jpeg_suppressDecoderWarnings or from within a program that links to Skia: #if defined(SK_DEBUG) #include "SkRTConf.h" SK_CONF_SET("images.jpeg.suppressDecoderWarnings", true); SK_CONF_SET("images.png.suppressDecoderWarnings", true); #endif I tested this, before (control) and after these changes (test), on 364,295 skps from the cluster telemetry. - number of errors+warnings in control = 2804 - number of errors+warnings fixed = 2283 - number of PNG verbosity fixed = 2152 - number of PNG error fixed = 4 - number of PNG segfault fixed = 3 - number of PNG errors changed to warnings = 62 - number of JPG verbosity fixed = 26 - number of JPG error fixed = 91 Not all errors and warning have been fixed. These numbers were generated using the find_bad_images_in_skps.py program. This program may be useful going forward for testing image-decoding libraries on skp files from the cluster telemetry. find_bad_images_in_skps.py depends on the test_image_decoder program, which simply executes the SkImageDecoder::DecodeFile function and uses its exit status to report success or failure. BUG=skia:1649 BUG=skia:1691 BUG=skia:1680 R=scroggo@google.com Review URL: https://codereview.chromium.org/24449003 git-svn-id: http://skia.googlecode.com/svn/trunk@11597 2bbb7eff-a529-9590-31e7-b0007b416f81
* Allow gradient optimization with perspectiveGravatar commit-bot@chromium.org2013-10-04
| | | | | | | | | | | | | | | | | | | | Before, gradients would only interpolate the linear portion of the quadratic equation if there was no perspective. This updates them to do so even in the case that there is perspective. The rearrangement of math causes noise differences in the following gm tests: gradients_no_texture_gpu gradients_view_perspective_gpu gradients_local_perspective_gpu gradients_gpu R=bsalomon@google.com Author: cdalton@nvidia.com Review URL: https://codereview.chromium.org/25645006 git-svn-id: http://skia.googlecode.com/svn/trunk@11595 2bbb7eff-a529-9590-31e7-b0007b416f81