summaryrefslogtreecommitdiffstats
path: root/libs/hwui/OpenGLRenderer.h
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix premultiplied alpha.Romain Guy2010-07-121-2/+2
| | | | Change-Id: I08da422c5350503e1f4f27b9890f15a813d0c6c7
* Correctly support pre-multiplied alpha, optimizations, more stuff.Romain Guy2010-07-121-3/+5
| | | | | | | | | | | | | | Add support for the following drawing functions: - drawBitmap(int[]...) - drawPaint() Optimizes shader state changes by enabling/disabling attribute arrays only when needed. Adds quick rejects when drawing trivial shapes to avoid unnecessary OpenGL operations. Change-Id: Ic2c6c2ed1523d08a63a8c95601a1ec40b6c7fbc9
* Optimize shader binding changes.Romain Guy2010-07-121-1/+10
| | | | | | | This change also cleans up the internal API a little bit by using mat4 everywhere instead of float[16] (for the ortho matrix for instance.) Change-Id: I35924c7dc17bad17f30307118d5ed437c2ed37e0
* Refactoring to move vertex computing to the Patch class.Romain Guy2010-07-091-6/+0
| | | | | | This change is mostly cleanup to keep less code in OpenGLRenderer. Change-Id: I954375143b2943829457ab470423729b60b844f5
* Optimize blending state changes.Romain Guy2010-07-091-2/+44
| | | | Change-Id: I7c22a8aecccb8b5abfcf7243f049a4ef3cf3979a
* Draw n-patches using OpenGL.Romain Guy2010-07-081-19/+16
| | | | | | Currently only tested with title bars and buttons. Change-Id: I8263a9281898dc0e943b1b8412827fe55639b9d6
* Add support to draw 9patches in OpenGL.Romain Guy2010-07-071-0/+3
| | | | | | | This change only adds the necessary API and stubs. The implementation will be added in another change. Change-Id: Ie50b8aff5868e78796cee331df15bdbf990d2ea1
* Add a layer (FBO) cache.Romain Guy2010-07-061-0/+3
| | | | | | | | | | | | | | The cache is used to draw layers so that a new texture does not have to be recreated every time a call to saveLayer() happens. The FBO cache used a KeyedVector, which is a bad idea. The cache should be able to store several FBOs of the same size (this happens a lot during scrolling with fading edges for instance.) This will be changed in a future CL. Change-Id: Ic316189e625f0dbcf0d273a71cc981a433d48726
* Don't use full screen FBOs, this dramatically increase performance.Romain Guy2010-07-011-2/+2
| | | | | | | The next step will be to add an FBO cache to avoid churning memory on every frame we draw. This change also adds support for drawBitmap(Bitmap, Matrix, Paint). Change-Id: I7825cdcf0cad9bffe6219e05d8328a53d4a6e583
* Add implementation for drawBitmap(Bitmap, Rect, Rect, Paint)Romain Guy2010-06-301-1/+14
| | | | Change-Id: I10904d2325a5431d15801aebcec1048715678e8c
* Add implementation for drawBitmap().Romain Guy2010-06-301-2/+3
| | | | Change-Id: Iada9325f3c5642b61c2e0c4cd80bcfbc92cb491e
* Add hooks for drawBitmap().Romain Guy2010-06-301-0/+8
| | | | | | | | Change-Id: I58e962c3a8b2bc75c2605fe369ad3002579d86e0 Add texture cache. Change-Id: I1c0e5581d228869e114438258a1014e33e024ad7
* Add support for saveLayer().Romain Guy2010-06-281-1/+31
| | | | | | saveLayer() is affected by the paint's alpha and xfermode. Change-Id: I28693a9337052643adccdb4889a8f228d4e17903
* Implement support for PorterDuff's blending modes.Romain Guy2010-06-281-1/+28
| | | | | | | | | The blending modes are currently hooked up only when drawing filled rects but the code is reusable for other primitives. This will allow implementation of saveLayer(). This method is required to support the fade effects used throughout the standard Android UI. Change-Id: I396023d123436f16cdafc606e358e4eb80c9df2c
* Reduced the complexity of layers composition.Romain Guy2010-06-271-104/+53
| | | | | | | | | | | This change also refactors the code base a bit by moving classes out of OpenGLRenderer into separate headers/implementations. This makes the code more manageable. This change also adds documentation for implementation methods. The undocumented methods are simply Skia's Canvas methods. Change-Id: I54c68b443580a0129251dddc1a7ac95813d5289e
* Add implementations for saveLayerAlpha() and textured rects.Romain Guy2010-06-261-3/+35
| | | | | | | | | | | Even though there's an implementation for textured rects, drawBitmap() is not hooked up yet as it will require a good texture cache. This method is implemented using FBOs. There's currently an issue either in the driver or in the Canvas renderer that forces the FBO to be fullscreen, which is extremely expensive and yields terrible performance. Change-Id: I148419195e12d45653c60186938aa78c23a68e2c
* Convert tabs to spaces.Romain Guy2010-06-251-48/+48
| | | | Change-Id: I5d3ae48af79b19b6d293deff0521e4bb57d5114b
* Implement quickReject() and drawRect().Romain Guy2010-06-251-3/+13
| | | | | | | The OpenGL ES 2.0 renderer can now draw colored rectangles. At least there's something on screen now. Change-Id: I80a13ccc1dd56784edf74f2670a364f30700234a
* Add colored rectangles implementation in OpenGLRenderer.Romain Guy2010-06-241-6/+73
| | | | | | | Drawing two rectangles one after the other discards the second one because of Z buffering issues. This will be fixed in another changelist. Change-Id: Ida1b3cde8a78e60cacc07e477abc44def527ff67
* Add support for transformations.Romain Guy2010-06-231-2/+28
| | | | | | | | | | | | | | | This change adds partial support for the following transforms: - scale() - translate() - rotate() - setMatrix() - getMatrix() The transform is stored in a snapshot and saved/restored as needed. The transform is currently not applied to the clip rect and is not mapped to the vertex shader. Change-Id: Id48993453311200804149917d0c126a4d0471226
* Add implementations for clipRect(), save() and restore().Romain Guy2010-06-231-1/+45
| | | | | | | The current implementation of clipRect() does not apply local transformations before setting the new clip. Change-Id: I5997871bb638dfcd1a8ef96354846af52427e445
* Fix the simulator build.Romain Guy2010-06-221-0/+41
Change-Id: Ie404f7c2c308f0657f273af19a56e8c039b61898