summaryrefslogtreecommitdiffstats
path: root/libs/hwui/SkiaShader.h
Commit message (Collapse)AuthorAgeFilesLines
* Delete pre-glop pathChris Craik2015-04-031-65/+0
| | | | | | bug:19014311 Change-Id: I06376b6f625455892d8eafe2727b78025a64c4bf
* Glop SkiaShader supportChris Craik2015-02-171-10/+56
| | | | Change-Id: I894a0b62701bd02367ab970813e4c332147351a2
* Revert "resolved conflicts for merge of 220c3f4f to master"Andreas Gampe2014-11-221-5/+4
| | | | | | | | Reverted as hwui doesn't agree. This reverts commit 8a902d9f24e83c87b054adb5836b4a5b8a257be9. Change-Id: I109e7b02bee2921e2155ded6df36f52e6f574b5a
* resolved conflicts for merge of 220c3f4f to masterAndreas Gampe2014-11-211-4/+5
|\ | | | | | | Change-Id: I37ecce8fddecdff82b0eace16f1ee75152f7171e
| * Frameworks/base: Unused parameters in hwuiAndreas Gampe2014-11-211-4/+5
| | | | | | | | | | | | | | | | | | Remove Clang cutout for unused parameters. Fix warnings. Remove Clang cutout for deprecated Skia function usage. Has been fixed in the L push. Change-Id: I7ea073ff67127cc1e14e798b655e2c50615fe8e7
* | Fix build breakage in HWUI JNITom Hudson2014-10-161-0/+3
| | | | | | | | | | | | R=djsollen@google.com Change-Id: Iaa4e7f22bec8e15748beab1b25d307c48d277c59
* | Clean up physical couplingTom Hudson2014-10-151-5/+1
|/ | | | | | | | Narrow the use of #include directives in hwui, replacing with forward declarations where straightforward. Speeds compiles; doesn't do any restructuring of code. Change-Id: Icac2baffb5896f55d8c6718e9bd9d4bfa02d3ca0
* Inspect SkShader to determine hw shader.Leon Scroggins III2014-05-221-214/+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
* Clip TouchFeedbackDrawable effect to receiver OutlineChris Craik2014-04-231-2/+20
| | | | | | | | Projected RenderNodes are now wrapped with a ClipRect or masked SaveLayer, so that they are clipped to the outline of the projection receiver surface. Change-Id: I1d4afc1bb5d638d650bc0b1dac51a498f216773e
* am ee846d3e: am 38cf0704: am e9a7d229: am 66b5a2b2: am 5150eb8f: Merge ↵Chris Craik2014-01-171-1/+1
|\ | | | | | | | | | | | | "Initialize pointer members to NULL to avoid illegal reference" * commit 'ee846d3e74eda006f4bbf17cb4844b4d8f9c5cb0': Initialize pointer members to NULL to avoid illegal reference
| * Initialize pointer members to NULL to avoid illegal referencelina.x.pi2014-01-171-1/+1
| | | | | | | | | | | | | | | | mBitmap and mTexture is not initialized to NULL which causes illegal address access when it fails to be created from oversized bitmap. Change-Id: Iea54bec8788bc5f3a10040fdb43f416c0d41a14c
* | Fix Clang warnings/errorsChris Craik2014-01-021-1/+2
| | | | | | | | | | | | | | Fix several build warnings (struct != class, int != size_t) and errors (variable leng non-POD arrays). Change-Id: I70b4e784365514303d8954bfcb1f39d7c22c1321
* | Clean unused parameters, disable warningsChris Craik2013-10-171-1/+1
|/ | | | Change-Id: Iddb872f53075dd022eeef45265594d1c6a9e2bc0
* Introduce Caches::bindTexture() to reduce glBindTexture callsRomain Guy2013-06-041-8/+11
| | | | Change-Id: Ic345422567c020c0a9035ff51dcf2ae2a1fc59f4
* Remove C++11 related warningRomain Guy2013-01-031-1/+1
| | | | Change-Id: I250ff7bd0ea49908e11b14c995d77312cd09a8b4
* Pre-multiply color components for 2-stop gradientsRomain Guy2012-08-291-7/+0
| | | | | | Bug #7033344 Change-Id: Ia168501f1dc56ba7a1bb0c55078320432309a66a
* Improve gradientsRomain Guy2012-07-311-7/+2
| | | | | | Avoid using textures for common gradients (two stops from 0.0 to 1.0) Change-Id: Iff55d21b126c8cfc4cfb701669f2339c8f6b131a
* Reduce the size of libhwui by 50%Romain Guy2011-10-121-10/+14
| | | | | | | | This change removes unnessary symbols. All symbols are hidden by default, public APIs with exported symbols are explicitly marked with ANDROID_API. Change-Id: I692fde432a86c12108de1cfd1f6504919a7d5f3f
* Don't crash Launcher on config change.Romain Guy2011-01-141-1/+8
| | | | Change-Id: Ibbbd7146c5ff69e9639b433f39041053654d808c
* Copy shaders when recording them in display lists.Romain Guy2011-01-141-0/+34
| | | | Change-Id: I3f22dd35f1e31c9e5102955d76548098b7b0cd8d
* Reduce number of GL calls when drawing with shaders.Romain Guy2010-11-111-1/+5
| | | | Change-Id: I27aca9f6d381d5c7e363d90a93225d185f2ff4e3
* Optimize FBO drawing with regions.Romain Guy2010-11-021-3/+3
| | | | | | | | | This optimization is currently disabled until Launcher is modified to take advantage of it. The optimization can be enabled by turning on RENDER_LAYERS_AS_REGIONS in the OpenGLRenderer.h file. Change-Id: I2fdf59d0f4dc690a3d7f712173ab8db3848b27b1
* Don't change textures wrap modes on every draw.Romain Guy2010-10-251-2/+2
| | | | Change-Id: If6d3f313778cc7f3e803a063338539c8b3e165e3
* Optimizing display lists by referencing pointers to resources instead of ↵Chet Haase2010-10-211-0/+4
| | | | | | copying them Change-Id: I81ad3551d74aa1e5bb64d69e33d2eb29a6c1eb6a
* Add 3D transforms support to all gradients.Romain Guy2010-10-071-18/+17
| | | | Change-Id: I61409edd00dab3a11684a3f5e4f7df0afc734758
* Apply 3D transformations to gradient shaders.Romain Guy2010-10-061-1/+9
| | | | | | | This fixes only linear gradients. Sweep and radial gradients, as well as bitmap shaders, will be fixed in a future commit. Change-Id: I4eee4ff62e9bbf3b9339fc111a780167449ecfef
* Fix OpenGL errors in various places.Romain Guy2010-09-221-0/+2
| | | Change-Id: I3a4e115d8fb13b6c443e65460d92987b16f2524c
* Add support for circular gradients to the GL renderer.Romain Guy2010-09-211-3/+21
| | | | | | | This change also adds full support for local transformation matrices on sweep and radial gradients. Change-Id: Id8773bc0766575190e3f3d51984fc5e57b266c3f
* Add support for SweepGradient in the GL renderer.Romain Guy2010-09-201-0/+20
| | | | Change-Id: I7aa397ed4e34655ead9ba1f5b4ce087665e0f022
* Add support for drawLines(), with anti-aliasingRomain Guy2010-09-161-0/+6
| | | | Change-Id: I16c0593c5671490909dec13a85df601e1428a1a6
* Enforce maximum texture size.Romain Guy2010-08-071-0/+1
| | | | | | | | | | | | When an app tries to render a bitmap or path larger than the GPU's maximum texture size, the drawing command is ignored and a warning is logged. This change also makes texture drawing more robust by catching potential errors during texture creation. This change also fixes a crash in the FontRenderer. The destructor would sometimes try to free an uninitialized array. Change-Id: I95ae0939c52192d97b340aa02417bf6d0c962c57
* Fix native crash in SkiaShader.Romain Guy2010-08-041-2/+0
| | | | | | Bug #2893733 Change-Id: I7feb9ab113fe0012cf9eb271f2b044f12a5c9c4e
* Add support for ColorFilters.Romain Guy2010-08-021-3/+3
| | | | | | Color filters are fully supported and can be used with shaders. Change-Id: Id90ccf1c81cb462f2431f366f3f8f710d7971e04
* Refactor Skia shaders handling.Romain Guy2010-07-301-0/+163
With this change, Skia shaders can easily be applied to any mesh. This change also supports ComposeShader. For instance, this can be used to blend a gradient and a bitmap togehter and paint a string of text with the result. Change-Id: I701c2f9cf7f89b2ff58005e8a1d0d80ccf4a4aea