summaryrefslogtreecommitdiffstats
path: root/tests/CanvasCompare
Commit message (Collapse)AuthorAgeFilesLines
* We need to specify a target SDK < 21 to use graphics RS.Stephen Hines2014-08-201-1/+1
| | | | | | | | Bug: 16031597 This change also removes some unnecessary code from ScriptC construction. Change-Id: I6680109deb34de841dfade769d556f5060aee423
* Merge "Inspect SkShader to determine hw shader."Chris Craik2014-05-232-0/+55
|\
| * Inspect SkShader to determine hw shader.Leon Scroggins III2014-05-222-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of duplicating internal info about SkShader, inspect the SkShader installed on the SkPaint. core/java/android/view/GLES20Canvas.java: Remove setupModifiers, nResetModifiers, and nSetupShader. core/jni/android/graphics/Shader.cpp: Remove calls to create/destroy the (previously) attached SkiaShader. core/jni/android_view_GLES20Canvas.cpp: Remove native code for setupShader and resetModifiers. graphics/java/android/graphics/BitmapShader.java: graphics/java/android/graphics/ComposeShader.java: graphics/java/android/graphics/LinearGradient.java: graphics/java/android/graphics/RadialGradient.java: graphics/java/android/graphics/Shader.java: graphics/java/android/graphics/SweepGradient.java: Remove code keeping track of native SkiaShader. libs/hwui/Caches.h: Include Extensions.h. libs/hwui/DeferredDisplayList.cpp: Compare shaders on the paint, instead of on DrawModifiers. libs/hwui/DisplayList.cpp: libs/hwui/DisplayList.h: Remove vector of SkiaShaders. libs/hwui/DisplayListOp.h: Access the SkShader on mPaint. Remove SetupShaderOp and ResetShaderOp. libs/hwui/DisplayListRenderer.cpp: libs/hwui/DisplayListRenderer.h: Remove resetShader, setupShader, refShader, and mShaderMap. libs/hwui/FontRenderer.cpp: Pass SkShader to setupDrawShader and setupDrawShaderUniforms. libs/hwui/OpenGLRenderer.cpp: libs/hwui/OpenGLRenderer.h: Add LayerShader, a class inheriting from SkShader, to mimic the behavior of SkiaLayerShader. Unlike SkiaLayerShader, it can be set on the SkPaint so it can be inspected later. Set a LayerShader instead of a SkiaLayerShader. setupDrawShader and setupDrawShaderUniforms now inspect an SkShader passed in. Inspect SkShader instead of mDrawModifiers.mShader. Remove resetShader and setupShader. setupDrawColorUniforms now takes a boolean indicating whether there is a shader. Add an inline function for accessing the SkShader on an SkPaint. In setupDrawBlending(Layer*, bool), do not check the shader (which will never be set), but do check whether the color filter may change the alpha (newly fixed behavior). In setupDrawBlending(SkPaint, ...), check the SkShader and whether the color filter affects alpha (the latter is new behavior). libs/hwui/Renderer.h: Remove pure virtual functions setupShader and resetShader. libs/hwui/ResourceCache.cpp: libs/hwui/ResourceCache.h: Remove functions for refing/unrefing shaders. libs/hwui/SkiaShader.cpp: libs/hwui/SkiaShader.h: Much of this code was redundant and has been removed. Convert structs into class with nothing but static functions for calling describe/setupProgram. libs/hwui/TextureCache.cpp: libs/hwui/TextureCache.h: Use the SkPixelRef as the key to the bitmap Lru cache, since shader inspection will provide a different SkBitmap pointer (though it will hold the correct SkPixelRef with the correct generation ID). tests/CanvasCompare/src/com/android/test/hwuicompare/DisplayModifier.java: tests/CanvasCompare/src/com/android/test/hwuicompare/ResourceModifiers.java: Update manual test to have more shaders: radial, sweep, compose, invalid compose. BUG:10650594 Change-Id: Iaa7189178bda1c55f96da044d2a9fa602ba36034
* | Cleaned up CanvasCompare tests.Antonio Calabrese2014-05-192-19/+13
|/ | | | Change-Id: I93b2f73283e3ab2b8679bf36f29c7bd6cb74c6bf
* Refactor HardwareLayerJohn Reck2014-02-102-6/+10
| | | | | | | Defer all the things! Groundwork to allow hardware layers to work in a renderthread world Change-Id: Ib3aa47525f393083621254a743dbaa6352f933bd
* Remove NearestImageView from CanvasCompareChris Craik2013-07-093-48/+2
| | | | Change-Id: I69b0539df704d80a34cc8f22096657210f5d78ad
* Fix ambiguous clamp.Jason Sams2013-05-291-2/+2
| | | | Change-Id: I75a55bbfe6b8ef68242c8ecd0f70ef218829d110
* Add tessellation path for pointsChris Craik2013-05-143-2/+49
| | | | | | | | | | | | | | | | | | bug:4351353 bug:8185479 Point tessellation is similar to line special case, except that we only tessellate one point (as a circle or rect) and duplicate it across other instances. Additionally: Fixes square caps for AA=false lines Cleanup in CanvasCompare, disabling interpolation on zoomed-in comparison view Change-Id: I0756fcc4b20f77878fed0d8057297c80e82ed9dc
* Add input/output JSON data for baseline comparisonChris Craik2013-04-103-38/+213
| | | | | | | | | CanvasCompare will output a JSON file with test results, and can take such files as input for baseline comparison. The new logcat output breaks down results into per-test and per-modifier improvement and regressions. Change-Id: I4da0251db0637841173ac95e9f431a7ff52c8b61
* Adjust offset for non-AA line drawingChris Craik2013-02-151-4/+31
| | | | | | | | | | | | | bug:8114304 The original .375 was chosen to make GL_LINES align with Skia drawing. The new value of .065 is chosen to be as small as possible to make triangle-based lines align with Skia, while keeping lines drawn on integer coordinates unambiguous as to which column/row they draw on. Also adds more lines in CanvasCompare test to highlight the difference Change-Id: If578684f2db320682219c3caa625cf79bc62d88f
* Add cap tessellation supportChris Craik2013-02-061-0/+6
| | | | | | | | | | | bug:7117155 bug:8114304 Currently used for lines (with and without AA) and arcs with useCenter=false Also removes 0.375, 0.375 offset for AA lines Change-Id: Ic8ace418739344db1e2814edf65253fe7448b0b0
* Hardware / Software Canvas comparison toolChris Craik2012-11-2016-0/+1685
Has automated and manual testing modes Change-Id: I84d27447ad64021540525372022ab13a36ffc116