History log of /frameworks/base/libs/hwui/OpenGLRenderer.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
7fae5216d24ebe67e22777ab933689dbcbc001b9 01-Nov-2012 Chris Craik <ccraik@google.com> Avoid tesselation path when useCenter is set

bug:7458300

The tesselation path doesn't handle sharp joins.

Change-Id: I28bf03f3b72fc584a205daa40934dda17031098f
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
41308e2936c768103d0e9c82500e97938d6797f1 23-Oct-2012 Romain Guy <romainguy@google.com> Properly draw the window background on window resize
Bug #7385090

This change gets rid of two silly asumptions:
- That a layer needs to be cleared with opaque black (it shouldn't,
it's already cleared to transparent and the view will cover it up
with its own background)
- The the clip should be dirty at the beginning of a frame only
when the render target is opaque

Change-Id: I415b6d3cab196057fb0281419a53fef601a44e28
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
7c25aab491707f7324f9941b8cfa9bd2b4b97e76 19-Oct-2012 Romain Guy <romainguy@google.com> Defer layer rendering to avoid stalls
Bug #7326824

When a layer is taken out of the cache and initialized it gets cleared
to prepare it for future rendering. This triggers the following sequence
of operations:

glBindFramebuffer(layer.fbo)
attach texture storage to FBO
glClear()
glBindFramebuffer(defaultFbo)

The clear forces a resolve on tilers which stalls the CPU for a little
while, thus producing jank during animations. This change moves the
clear to the next frame when we know we will have to execute a resolve
anyway.

Change-Id: Ic1939c25df20ed65a4c48dc81ee549b2cd8b6ec3
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
b2e2f2470693e78baed20617f989d9a166864ed4 18-Oct-2012 Romain Guy <romainguy@google.com> Take into account the texture layer's transform for clipping
Bug #7370212

Change-Id: Ibdc3161306f54a1cfe66e08458f05ee01a13b1df
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
1b85122bd22c4528679ae8bd67077dfc2fdf1847 17-Oct-2012 Romain Guy <romainguy@google.com> Merge "Add API to enable mipmaps on Bitmap Bug #7353771" into jb-mr1-dev
713e1bb9df6bdfc21bd5c40d1a6ecf6c822a4be5 17-Oct-2012 Romain Guy <romainguy@google.com> Add API to enable mipmaps on Bitmap
Bug #7353771

This API can be used when scaling large images down to a small size
to get nicer looking results.

Change-Id: If09087eed36077eee5355f6047a3ca67747d7d9e
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
a92bb4dc9605c86b8773c929412af2dc242b1fa8 16-Oct-2012 Romain Guy <romainguy@google.com> Support clipping in Canvas.drawBitmapMesh()
Bug #7354162

Change-Id: Ifd1d0b365e8a4d88e0ff0629c9ee13f27e1a7331
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
780c12875ce0c0d3fd072484d4b8b3c327cc4f31 04-Oct-2012 Chris Craik <ccraik@google.com> HW Acceleration support for stroked arcs with BUTT caps

bug:4419017

Change-Id: I7371bfb36cef460da861a47d4d945218c6d0c3d0
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
b30cb10a0c75c2295e89b1b30d91a73f38ee09fb 06-Oct-2012 Chris Craik <ccraik@google.com> Use offset in line drawing

Partial revert of cb4d6009

bug:7299070
Change-Id: I1db7b035e3015e0f6d15c95aef71ea74dbeca13e
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
cf8675ee176a375f873792684d38a47f78348dff 02-Oct-2012 Romain Guy <romainguy@google.com> Draw stroked rectangle as meshes instead of textures
Bug #7233734

Stroked rectangles were rendered using software generated textures
which would lead to slightly misaligned results. Instead, let's use
the new convex path rendering code that will do the right thing
(and save a lot of bandwidth.)

Change-Id: Ib95ff581e56c1ecead97e4919298e6fd146ca167
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
bf09ffb4e0dc820aeae56a3e576aed33cab218da 01-Oct-2012 Chris Craik <ccraik@google.com> Quick reject empty paths

bug:7260035

Adding a circle of radius 0 to a path is a no-op in skia, so detect
this case both in the PathRenderer, and in quickReject().

Change-Id: I7a172db49a5d5351b4734b39d4e4ca6379658096
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
a3dc55f83ab583e0a66b893c71b849afa046770a 28-Sep-2012 Romain Guy <romainguy@google.com> Fix a couple of rendering issues
Bug #7253839

1. Make sure we don't make GL calls while recording display lists

2. Disable an early and trivial clip optimization in font renderer
when a perspective transformation is used on the Canvas

Change-Id: I3f1052164239329346854f72d0a0d401fbfecf06
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
a852ff3a4b637e8101c2f54e110467586fe604cf 28-Sep-2012 Romain Guy <romainguy@google.com> Merge changes I9873540e,I4f6c38e3 into jb-mr1-dev

* changes:
Skia's ColorMatrix vector is in the 0..255 range not 0..1 Bug #7248980
Don't use the QCOM_tiled_rendering extension with functors Bug #7247880
54c1a64d5441a964890b44280e4457e11f4f924a 28-Sep-2012 Romain Guy <romainguy@google.com> Don't use the QCOM_tiled_rendering extension with functors
Bug #7247880

Change-Id: I4f6c38e37b953c58e6107097c613891a49dac766
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
cb4d6009576cf08195dc23f341a3f4939c0878bb 25-Sep-2012 Chris Craik <ccraik@google.com> Add stroke support to polygonal shape rendering

bug:4419017
bug:7230005

- Adds support for stroke/strokeAndFill for shapes without joins
- Fixes path-polygonization threshold calculation
- Fixes rendering offset (now only used for points)
- Several formatting fixes

Change-Id: If72473dc881e45752e2ec212d0dcd1e3f97979ea
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
e529ece37f664f8947a1d4a1e27d679f6f286388 26-Sep-2012 Romain Guy <romainguy@google.com> Applies a layer's color filter even when the layer is a quad
Bug #7238059

Change-Id: Ib4736a419bc1a9a67a01d090516ed049fe3aebca
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
e83221c547cf2038752e5378e72e49a62cfd9954 25-Sep-2012 Romain Guy <romainguy@google.com> Fix alpha channel computation with ColorMatrixColorFilter
Bug #7222476

There were two issues:
- Blending was ignored with color filters
- The addition vector of a color filter was treated as integer values
instead of float values

Change-Id: Id94065704a30ee8aaaa5724a9f3a3cff7c50ced7
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
87e2f757be9b24d369bab354e37c276e851b1fc7 24-Sep-2012 Romain Guy <romainguy@google.com> Add a property to disable libhwui's scissor optimization
Bug #7158326

When scissor optimization is enabled, OpenGLRenderer will attempt to
minimize the use of scissor by selectively enabling and disabling the
GL scissor test.
When the optimization is disabled, OpenGLRenderer will keep the GL
scissor test enabled and change the scissor rect as needed.
Some GPUs (for instance the SGX 540) perform better when changing
the scissor rect often than when enabling/disabling the scissor test
often.

Change-Id: Idb68862e287a23358f9188d577ae0f86161902fd
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
8e586f61dd4f7fa53b01e63ac779ffc7cde05bdd 22-Sep-2012 Romain Guy <romainguy@google.com> Merge "Add support for a new developer setting: overdraw debugging" into jb-mr1-dev
7c450aaa3caac2a05fcb20a177483d0e92378426 22-Sep-2012 Romain Guy <romainguy@google.com> Add support for a new developer setting: overdraw debugging

Change-Id: I350ba4486577c3289f82c20938f7a35138778727
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
61d37041ac76a95aedb98d3550bb5efa33d898a1 21-Sep-2012 Chris Craik <ccraik@google.com> Merge "Polygonal rendering of simple fill shapes" into jb-mr1-dev
11cb642756093a4af901b1525375b1eb2b5c3e2b 21-Sep-2012 Romain Guy <romainguy@google.com> Update layers in a single batch at the beginning of a frame
Bug #7186819

Change-Id: Ice5926dfedfb3be3a3064e65008dafa2852407da
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
57b5268708c3b974296c7d4e58a02a957979224a 21-Sep-2012 Romain Guy <romainguy@google.com> Optimize tiling management
Bug #7186819

Change-Id: Iebc42a6e9c96ad5605fbbe1539aa887695d2e829
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
710f46d9d6a5bf9ea1c1833384caf61e1934124f 18-Sep-2012 Chris Craik <ccraik@google.com> Polygonal rendering of simple fill shapes

bug:4419017

Change-Id: If0428e1732139786cba15f54b285d880e4a56b89
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
2b7028eabac80cec170572bc0e945a1d4224e595 20-Sep-2012 Romain Guy <romainguy@google.com> Add support for QCOM_tiled_rendering
Bug #7186819

This optional OpenGL extension can be used by tiled renderers to optimize
copies from main memory to tiles memory.

Change-Id: Id4a5d64e61ad17f50e773e8104b9bf584bb65077
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
35643ddc689913f5b5f80ceed864470d987bd6cd 19-Sep-2012 Romain Guy <romainguy@google.com> Minimize state changes when updating layers

Change-Id: I407fcc80bd3178f9f09a3b379ceb7f7ce0749e08
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
603f6de35f21d74ae242d52d501f4f5c25ff4f4c 15-Sep-2012 Chet Haase <chet@google.com> Fix occasional crash bug with layers

Launcher occasionally crashes with a stack trace indicating that the memory
of a Layer object is corrupt. It is possible for us to delete a Layer
structure and then, briefly, use it to draw a DisplayList again before
that DisplayList gets recreated (without the layer that got deleted).

When this happens, if the memory got corrupted, it's possible to crash.

The fix is to add Layer to the other objects which we currently refcount
(bitmaps, shaders, etc.). Then instead of deleting a Layer, we decrement the
refcount. We increment when creating it, then increment it again when it's
referenced from a DisplayList. Then we decrement the refcount instead of
deleting it, and decrement when we clear a DisplayList that refers to it.
Then when the refcount reaches 0, we delete it.

Issue #6994632 Native crash in launcher when trying to launch all apps screen

Change-Id: I0627be8d49bb2f9ba8d158a84b764bb4e7df934c
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
45e4c3df6c00ac98ff6144de9af574877d4fff19 12-Sep-2012 Romain Guy <romainguy@google.com> Discard framebuffer commands when we redraw the entire buffer

Change-Id: I32e3014832cbd3bdbace8c3d2206eb20a2002d64
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
beb8bd0db28d8c5cad2a258f2ba2f3b8b76cf037 10-Sep-2012 Chet Haase <chet@google.com> Reset GL buffer state after functor invocation

Functors in WebView were binding to different buffers than we
assumed in the toolkit, eventually causing a crash due to improper
dereferencing in the currently bound buffer. Fix is to reset state
after invoking functors.

Issue #6666279 Native crash in Currents, mostly on Nakasi

Change-Id: I3697812d83613fffc9193daa99beea4dbf26474a
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
dc531fa7d4ec545ace1b3daae0849d3101102e49 08-Sep-2012 Chris Craik <ccraik@google.com> Merge "Handle different x, y scales in drawLines AA path" into jb-mr1-dev
75040f8a7727f18bb33da23696a32a0760926ff2 07-Sep-2012 Chris Craik <ccraik@google.com> Handle different x, y scales in drawLines AA path

bug:7114630

Fixes different x, y scales, and fixes boundaryWidthProportion to be from
center, not edge.

Also adds drawLine tests that previously drew blurry.

Change-Id: I2b648a60361ad3931eac67647b9b27909525ee1e
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
d15ebf25c595b855f6978d0600218e3ea5f31e92 05-Sep-2012 Chet Haase <chet@google.com> Enable changing properties of layer paint

Previously, to draw a layered view with a changed Paint object for the
drawLayer operation, you'd have to invalidate the parent view, to get the
native DisplayList to pick up the new Paint properties. This change adds
API and functionality so that the developer can call setLayerPaint(), which
does the proper invalidation (lightweight, doesn't cause redrawing the view).

Issue #6923810 Make it easy to efficiently animate a layer's Paint

Change-Id: I7fea79788d50f6d9c86dd5e5b2a4490cb95142bb
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
9147cd4ac56d53dec6da1ef13dd04ba1eec1a7df 07-Sep-2012 Chris Craik <ccraik@google.com> Fix m11 to be Y scale instead of X

bug:7114630

Fixes different X and Y values resulting in blurry lines/rects.

Change-Id: I3eb244e0cf769efa6b38d08741cf37d0bf62b786
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
378d131e65348d199db36c21ba7156542bbf0045 06-Sep-2012 Chris Craik <ccraik@google.com> Merge "Varying-based AA rect drawing" into jb-mr1-dev
6ebdc114e0d72137394f02bc8ffe9d7a782a65c4 01-Sep-2012 Chris Craik <ccraik@google.com> Varying-based AA rect drawing

Instead of calculating opacity from relative position in the shader, use a
shader varying to do this computation for us.

bug:5045101

Also adds a test to HwAccelerationTest to show incorrect antialiasing in
scaled drawAARect / boundarySize calculation.

Change-Id: Icdc41acb01dc10ce354834f8389a5aed2f439162
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
d84aaa23a53b57834b0722ad36c460833dc4823c 05-Sep-2012 Chris Craik <ccraik@google.com> Merge "Fix line drawing path to use proportional distance from center" into jb-mr1-dev
8f5ad7657b6c7cdb8927d7da5140602b68b450ac 04-Sep-2012 Chris Craik <ccraik@google.com> Fix line drawing path to use proportional distance from center

boundaryWidth and boundaryLength are now distance from center, instead of
distance from edge, in order to avoid unnecessary calculation in the shader. New
calculation of these matches drawAARect.

Change-Id: I1c7f576a97a6f0ce00d521661fd56fb62e05e6f2
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
0baaac5e9adf3ee280ae1239e2e58754a9d2b099 01-Sep-2012 Romain Guy <romainguy@google.com> Revert "Revert "Add more support for transformed clip rects and paths""

This reverts commit a8557d2169e14997637f57bc897640c8882d4a46.

Change-Id: I36d4883d548fc47ba6c0b4a42012107d0d2f85a6
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
a8557d2169e14997637f57bc897640c8882d4a46 01-Sep-2012 Mathias Agopian <mathias@google.com> Revert "Add more support for transformed clip rects and paths"

this introduced a dead lock in GradientCache's ctor.

This reverts commit dfe082f63e94cde9aee271c94d13de5e7217e036.

Bug: 7096001
Change-Id: I57b8bbab11fb7cb502fa58e3bbf5d19864db874f
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
dfe082f63e94cde9aee271c94d13de5e7217e036 01-Sep-2012 Romain Guy <romainguy@google.com> Add more support for transformed clip rects and paths

Change-Id: I41791b1e1bffef77d503dc9e52428395d2309688
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
63f2fcae3e7089ce0e27837a5152392d503f41eb 30-Aug-2012 Chet Haase <chet@google.com> Merge "Fix bug with Fbo layer clipping" into jb-mr1-dev
d48885a6c8cd27a8a62552c33b5282e9882e19f6 29-Aug-2012 Chet Haase <chet@google.com> Fix bug with Fbo layer clipping

Rendering views with alpha causes the creation of Fbo layers. These layers
are created at the size of the view, clipped by the current clip rect.
However, if the view lies completely outside the current clip rect, the
Fbo layer is created at the full size of the view and copied into place
outside of its container, causing artifacts like notification items showing
up outside the notification panel.

Fix is to note when the intersect() operation fails and to set an empty bounds
on the layer.

Issue #7069881 Bottom notification sometimes shows below bottom of notification panel shade

Change-Id: Ib52f7c4e503bbe9204cb808755ab269195aa94c1
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
a798b95a9ef328720febec72d01462cd97e3d4c7 28-Aug-2012 Chris Craik <ccraik@google.com> Use smoothstep to eliminate branches in AA shader

Change-Id: If4ecb1a9446f29b2f8444f5cee551f863c1993e8
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
8025061c594e5171e1bf370d8fdd77e0e9a02b47 15-Aug-2012 Chet Haase <chet@google.com> Restore scissor state correctly

Chrome is disabling the scissor, which doesn't play well with our
code that assumes that we know the state of the scissor. This fix
sets up our internal state based on the actual state of the scissor
in the resume() function (which is called after any calls out to the
Chrome or Browser GL functor). This fixes intermittent rendering
artifacts, including a gray address bar (where the gray background
gets painted without the clip that is being applied to the text foreground).

Issue #6886339 Address bar in Chrome turns gray after swiping the tabs / favicons drift outside of tab

Change-Id: I3d8a23f4438b41a367336507845baaea90cccc7e
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
33fa1f774c8e7289fd7c39fbc2c65b9361f2c2c4 08-Aug-2012 Romain Guy <romainguy@google.com> Draw an empty border around glyphs to avoid sampling issues
Bug #6942209

The font renderer was preserving a 1 px border around each glyph to ensure
bilinear filtering would work nicely. Unfortunately, this border was not
set to 0 when glyphs were added in the cache to replace old evicted glyphs.

Change-Id: Ib85afca7ebad5cb63f960dc0e87ae162333dbfe8
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
4ff0cf4b83605bff630c4e6f1fabe4f72a3f93a1 06-Aug-2012 Romain Guy <romainguy@google.com> Add new debug tool to track hardware layers updates

You can setprop debug.hwui.show_layers_updates true to flash
hw layers in green when they update. This is also a setting
in the Dev. section of the settings app.

Change-Id: Ibe1d63a4f81567dc1d590c9b088d2e7505df8abf
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
8b4072d3fb9bb49d774d97689a065204beca1752 31-Jul-2012 Raph Levien <raph@google.com> Fix bug 6892600 Font (character pairs) rendering issue

Alignment on paint for actual glyph drawing needs to always be left,
even when drawing centered or right aligned text. The x offset for
alignment is applied by OpenGLRenderer::drawText (and needs to be early
in the pipeline for quickReject to work). Similar change needed for
drawing drop shadow.

Also fixes bug with mispositioned underline (offset for alignment has
already been applied once, no need to do it again in
drawTextDecorations).

Change-Id: Id3dcd62de5536a26b158d768889273a1492b35d6
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
c25259519f1b74bb62a2b051b74537f073436b5c 28-Jul-2012 Romain Guy <romainguy@google.com> Rename drawGeneralText to drawText

Change-Id: I5062ea5b0605fc7af27f410fafc930d10f38e926
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
996e57c84368058be793897ebc355b917a59abc2 24-Jul-2012 Raph Levien <raph@google.com> Hardware implementation of glyph positioning (bug 5443796)

This implementation adds a drawGeneralText() method to the OpenGL
Renderer, which supports both a global x, y position, an array of
individual glyph positions, and also a length parameter (which enables
drawing of underline and strikethrough. It also adds the method to the
display list (with marshalling and unmarshalling).

With this change, the existing drawText() method is removed entirely, as
it's subsumed by the new method. It's easy enough to revert to the old
functionality if needed by passing in a NULL positions array.

Change-Id: I8c9e6ce4309fd51cc5511db85df99f6de8f4f6f5
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
00755fed35e4a91291c42a8a47bed8b957e9f8e1 20-Jul-2012 Raph Levien <raph@google.com> Merge "Add drop shadow for drawPosText in hwui renderer."
416a847633680d94efb926837efdc18726d54918 20-Jul-2012 Raph Levien <raph@google.com> Add drop shadow for drawPosText in hwui renderer.

This patch adds support for drop shadows (setShadowLayer) for
drawPosText in the hwui renderer. In and of itself, it's not very
important, but it's on the critical path for correct mark positioning,
tracked as bug 5443796.

The change itself is fairly straightforward - it basically just adds an
extra "positions" argument to all draw and measure methods on the code
path for drawing drop shadowed text, as well as to the cache key for
cached shadow textures.

Change-Id: Ic1cb63299ba61ccbef31779459ecb82aa4a5e672
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
04299385c681140239b0dc31d9780d087d2b4d7c 19-Jul-2012 Romain Guy <romainguy@google.com> Clip lines, AA rects and points correctly

Change-Id: I900dd986f397b66f133e6021aa4c2539e7abc2b9
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
8a4ac610e1aaf04931ac1af54b146a7fc8e66114 18-Jul-2012 Romain Guy <romainguy@google.com> Don't clear the dirty clip flag if it's not applied
Bug #6833979

Change-Id: I0ea78b7f31a557a335de10d910d03b0520029080
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
4121063313ac0d6f69f6253cac821d0c1c122086 17-Jul-2012 Romain Guy <romainguy@google.com> Add shader-based text gamma correction

To enable it, the system property ro.hwui.text_gamma_shader must be
set to true. For testing, DEBUG_FONT_RENDERER_FORCE_SHADER_GAMMA
can be set to 1 in libhwui/Debug.h.

Change-Id: If345c6b71b67ecf1ef2e8847b71f30f3ef251a27
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
be6f9dc1e71b425b7ac1c40c0a2c72d03eb9fbee 16-Jul-2012 Romain Guy <romainguy@google.com> Don't copy paints for 9patches

Change-Id: I863100a0dc53fec1a3a1b2acbdeb76e6049ffe58
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
b1d0a4ed21168fefcb82232c8f22cb95d60acb85 14-Jul-2012 Romain Guy <romainguy@google.com> Refactor GammaFontRenderer

This change is the first step to a shader-based text antialias
gamma correction.

Change-Id: I9eb02d4c56cb95d05219f712290c865b46141954
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
586cae3ac69c0c667fbf8a954edbd399f620a717 14-Jul-2012 Romain Guy <romainguy@google.com> Improve rendering speed by disabling scissor tests

This change improves execution of display lists, particularly on
tiled renderers. The goal is to disable the scissor test as
often as possible. Drawing commands are rarely clipped by View
bounds so most of them can be drawn without doing a scissor test.

The speed improvements scale with the number of views and drawing
commands.

Change-Id: Ibd9b5e051a3e4300562463805acc4fd744ba6266
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
9c0b188e4231bcb967234f3646c178d22d8a9f50 13-Jul-2012 Romain Guy <romainguy@google.com> Text shadow alpha handling incorrect

External bug: http://code.google.com/p/android/issues/detail?id=34879

This CL also fixes a bug where a View's alpha would be applied twice.

Change-Id: I13a1546228f44d4c169259414b6fa103a6e4a0fa
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
f877308f77f7c6f3edd91618a092207dd3be9077 13-Jul-2012 Romain Guy <romainguy@google.com> Remove obsolete optimization

Change-Id: I2d43c009c62a7f4a4a2e0a6303bdfa692c4b8c8c
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
16c88085255c71a1a8fc034129aa2dcc61e1ddd0 12-Jun-2012 Romain Guy <romainguy@google.com> Textured text calls could be invisible
Bug #6597730

Text would sometimes not appear when rendered with textured content
(BitmapShader, LinearGradientShader, etc.) This was due to a misuse
of OpenGL texture unit in FontRenderer. Textured text normally uses
two texture units:
- texture unit 0 for the font cache
- texture unit 1 for the textured content (gradient, etc.)

Recent changes to the font renderer allow it to bind new textures
while processing the text's geometry (this happens when caches get
full or when switching font size for instance.) The bindings were
done without ensuring the texture unit was the correct one
(unit 0), thus replacing the content of another texture unit
(unit 1).

This lead to text being drawn using the font cache itself as the
content texture, making the text invisible.

Change-Id: I392b4c884f09223305f6cbc6253e2ef9a98944c9
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
44b2fe3fc114ee5f7273c6b0fee2cc999bf244a2 07-Jun-2012 Chet Haase <chet@google.com> Track canvas clearing for swap buffers logic.

A previous fix made it necessary for a frame to render something to GL
in order to cause a call to eglSwapBuffers(). Besides the calls being
tracked as part of issuing a DisplayList, there is also a potential call
to clear the canvas (via glClear()) on non-opaque surfaces. This call is also
good to track, since a surface that gets cleared without any other drawing operations
is worth flipping to the screen (to erase old contents on that surface).

This fix tracks the status of the pre-draw operations to find out whether
glClear() was called and then sets the drawing status appropriately.

Issue #6606422 QuickContact dismissal is janky again (Tracking)

Change-Id: I5fcaccfdc9293dd46b83f2fc279730a5d2740ebf
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
932b7f6765968bd526c03512f3805fbc3924dc29 06-Jun-2012 Chris Craik <ccraik@google.com> Revert "Add more temporary logging for investigating detachFunctor"

bug:6608646

This reverts commit 8857b2f76abad1e4ec742dfd85d0c997880be376

Change-Id: I1563b5974c52b84201ae448298f804eb0dcc235d
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
8857b2f76abad1e4ec742dfd85d0c997880be376 05-Jun-2012 Chris Craik <ccraik@google.com> Add more temporary logging for investigating detachFunctor

bug:6596807
Change-Id: Ic9e34e323b12a887f2e8df0773a6155627b6a64f
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
486590963e2207d68eebd6944fec70d50d41116a 01-Jun-2012 Chet Haase <chet@google.com> Skip eglSwapBuffers() call when we do not draw to GL

The fix is to track when we issue GL drawing commands, and to skip the
call to eglSwapBuffers() when a DisplayList does not result in
any actual rendering calls to GL.

Issue #6364143 QuickMuni list items and buttons flicker instead of fade

Change-Id: I60a02c61a58c32d92481a1e814b4c8a49c6a37a3
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
3534e13486a0081b1229e698f13bd3a37efa3fb0 23-May-2012 Chris Craik <ccraik@google.com> Merge "Avoid crash if onDetachedFromWindow called after destroy" into jb-dev
9e08012869f77f212186a5d5856831a85fb73d40 23-May-2012 Chris Craik <ccraik@google.com> Avoid crash if onDetachedFromWindow called after destroy

This also removes the temporary logging from commit
f8dafa14e058cdc2f408b59be7911abaceb73c47.

bug:6535911
Change-Id: Icf1d0438b349a0e92e7d9cefed57a252eed2b9b0
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
7a9328a3118725389564fe2a9b926837fa3d58a9 22-May-2012 Chris Craik <ccraik@google.com> Merge "Add temporary functor lifetime logging" into jb-dev
e5a4a3dc1648844f06d29efd42c9306c3cdf177e 22-May-2012 Romain Guy <romainguy@google.com> Merge "Ensure we always set the proper blending mode Bug #6527305" into jb-dev
f8dafa14e058cdc2f408b59be7911abaceb73c47 22-May-2012 Chris Craik <ccraik@google.com> Add temporary functor lifetime logging

bug:6535911

Change-Id: Ida5cc1def7fe1fc314317bbc5df50e1465753deb
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
ddf74373616c89e0880a28a2185fd7ce3db91de6 22-May-2012 Romain Guy <romainguy@google.com> Ensure we always set the proper blending mode
Bug #6527305

At the beginning of a frame, always set the blending mode that we
think GL is using just in case it was modified by another entity
(for instance a WebView functor.)

Change-Id: I0e1d0abee8a2abb2b8e7622aed28346e89562c06
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
c8538ade8df2c2f013f8b93094912057ee1cc417 22-May-2012 Chris Craik <ccraik@google.com> Don't clear the functor at every draw

instead clear functors at invoke time, and let them detach themselves as needed.

bug:6511995
Change-Id: I9115fcadffb27eb850c1d1773c098d3d2e22788b
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
49c5fc0b9e850497233e189ff9dcc71a78ebe6e7 15-May-2012 Romain Guy <romainguy@google.com> Avoid unnecessary copy when invoking drawBitmap(int[])
Bug #6483390

Change-Id: I4d2d725ef50c9401b4bd998b6160128102b40745
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
e651cc6239616a202f6e96ebc2ed93b4b8b3627c 15-May-2012 Romain Guy <romainguy@google.com> Remove all Dalvik allocations from Cavnas.drawBitmap(int[], ...)

Change-Id: Ie28538a2104d21154fdc78a56525e7403f08287d
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
12d434a9be03214e9c673580a6f55128eec9b3f9 08-May-2012 Chris Craik <ccraik@google.com> Revert "Add temporary functor lifetime logging"

bug:6445573

This reverts commit 2fe99801e81bb7c0ff846b536cbb7a12707410ed
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
2fe99801e81bb7c0ff846b536cbb7a12707410ed 02-May-2012 Chris Craik <ccraik@google.com> Add temporary functor lifetime logging

bug:6405861

Note: revert once the above bug is verified fixed

Change-Id: Iae04ec6ffa73a2711f96e128d60011bcb5864b5c
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
8bd12ea8001f72f4450e318e43c50dbc46b4869c 26-Apr-2012 Romain Guy <romainguy@google.com> Merge "Decode common GL error codes when logging frame error status" into jb-dev
a44a63ac5c29b2cc57df95ec495def8cdddd9c6f 26-Apr-2012 Romain Guy <romainguy@google.com> Decode common GL error codes when logging frame error status

Change-Id: I38b333eea53aef20340ce48dfcb0dd30a223f7a8
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
a75fbc3c76dfe6a1c678b66f83cef878e3f3cdf4 26-Apr-2012 John Reck <jreck@google.com> Merge "On new content, attach functor directly" into jb-dev
c189ef53220059acf2adedc92ac4ac7e6a993e6b 26-Apr-2012 Romain Guy <romainguy@google.com> Ensure we start every frame in the proper GL state
Bug #6345013, #6314960

Change-Id: I6985f7f233eb6a5f9223e9f4be3f323154b5dbf0
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
c2c9543c135ffc4e18c7db0e817112ac03e3e97a 26-Apr-2012 Chris Craik <ccraik@google.com> On new content, attach functor directly

bug:6323847

depends on external/webkit change: https://android-git.corp.google.com/g/#/c/184314/

Change-Id: Ibdf997f3ee4f5c5c1ea5a320556813f175fea93f
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
3d745c03ace18ee59c539e1b7f1df13f22beb57d 24-Apr-2012 Romain Guy <romainguy@google.com> Fix the build before the bot yells at me.

Change-Id: Ice7fe02b684ad662262aae3cac7a48a835ebcad5
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
ba6be8a62dcdb3ffd210cd36b9af4e3a658eac47 24-Apr-2012 Romain Guy <romainguy@google.com> Prevent WebView from crashing when detached from the window
Bug #6365056

WebView enqueues a functor in the hardware renderer to handle
animations and this functor is called at a later time by the
hardware renderer. However, the functor was not removed from
the queue when WebView was removed from the window. This could
cause the hardware renderer to attempt to execute an invalid
functor and lead to a crash.

Change-Id: I9d38e80f3fdc5e29d4d0cdfa1e893c251a954508
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
1271e2cc80b01d577e9db339459ef0222bb9320d 20-Apr-2012 Chet Haase <chet@google.com> Remove USE_DISPLAY_LIST_PROPERTIES flag

This flag was still hanging around pending any need to disable
DisplayList properties. But things seem stable, so it's time to clean up
and simplify the code.

At the same time, I reduced redundance in DisplayList dimensions. We
used to call drawDisplayList() with width/height parameters that were
used to do a clip reject. This is redundant with the DisplayList properties
that set the bounds of the DisplayList; the left/right and top/bottom properties
represent the same width/height properties formerly used in drawDisplayList().
The new approach is to not pass dimensions to drawDisplayList(), but to
instead pull those dimensions directly from the DisplayList when needed.

Change-Id: I8871beff03b1d4be95f7c6e079c31a71d31e0c56
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
a23eed808a1ae4ec0d818c0a9238385e797fd056 13-Apr-2012 Chet Haase <chet@google.com> Fix layer blending bug

Cached layers were sometimes retaining an obsolete blending
value, causing artifacts where translucent objects were disappearing
completely. Also, added extra tracing info for DisplayLists.

Issue #6303668 Flickering views during SwipeHelper drag

Change-Id: I66ce158652c4a3ed316040585b40b1744e1fad0c
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
7b6a75872bd2df96a23453d31c2e2e7fcc373554 11-Apr-2012 Chet Haase <chet@google.com> Pass width/height parameters to webview

When webview draws into an fbo layer, it needs to know the
size of that surface to create the rendering transform appropriately.
This change copies in the current viewport size to the structure that
is passed to the webview.

Change-Id: I7160b0836d00834134c799c95a439cdc045e2035
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
65924a3e56c2e7ac863f8e25e9f9a58b9db7d513 06-Apr-2012 Chris Craik <ccraik@google.com> fix functor flag parsing, tweak process delay

Change-Id: I0a679cc33f92ff6fd2e33db9ad58b52622def012
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
fda531c9e4e49cfd962d3784b3501f6a1e64dc22 04-Apr-2012 Romain Guy <romainguy@google.com> Merge "Disable AA lines vertex attrib arrays after rendering"
7b63142d2f4bc32beacedcc761453b8aea1f3a86 04-Apr-2012 Romain Guy <romainguy@google.com> Disable AA lines vertex attrib arrays after rendering

Change-Id: I2f035e9d87f4f97bc1e37355c84570fd58df0374
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
8c8c2400923bd5b0ab1f52adc4f2232dbf690d91 04-Apr-2012 Romain Guy <romainguy@google.com> Merge "Optimize FBOs composition"
e0aa84b7dc087e999e20055dcc04cb6a48d5bd62 04-Apr-2012 Romain Guy <romainguy@google.com> Optimize FBOs composition

Change-Id: Ifc8eada8922509373c0e4c3b2ed75b6f08d098de
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
db8c9a6a4d9bf8c39f834b25611926caf21380f6 22-Mar-2012 Chet Haase <chet@google.com> Optimization of alpha with DisplayList properties

Some views (such as ImageView and TextView) handle non-opaque alpha
values directly. This was originally an optimization, but we can handle it faster
in many cases without this optimization when DisplayList properties are enabled.
Basically, if a view has non-overlapping rendering, we set the alpha value directly
on the renderer (the equivalent of setting it on the Paint object) and draw each
primitive with that alpha value. Doing it this way avoids re-creating DisplayLists
while getting the same speedup that onSetAlpha() used to get pre-DisplayList properties.

Change-Id: I0f7827f075d3b35093a882d4adbb300a1063c288
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
e2eaf6997d429249904f842092b075f3da92c5be 03-Apr-2012 Romain Guy <romainguy@google.com> Merge "Prevent crash when flushing the layers cache Bug #6258973"
5c88fc744db977ef26887df9605beaa409394806 03-Apr-2012 Romain Guy <romainguy@google.com> Prevent crash when flushing the layers cache
Bug #6258973

When flushing the layer caches we would attempt to delete the FBOs
associate with layers in the cache. The FBO property was however not
always properly cleared when recycling layers.

Change-Id: I7dedfe391d659a0849f1e1d84df17313b2c6e2b2
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
8f3b8e32993d190a26c70c839a63d8ce4c3b16d9 28-Mar-2012 Romain Guy <romainguy@google.com> Allow fine-grained control over functors execution

Adds non-drawing execution mode

Change-Id: I82f92cf1b9a3b9ff2ca6d7427c4e02b73e04e6bf
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
b85967b9af76e1e60f7a96603e2567a6449d2e04 26-Mar-2012 Chet Haase <chet@google.com> Re-enabling DisplayList properties

Several issues came up after DisplayList properties were enabled,
so they were disabled pending fixes. Those issues have been fixed, so
DisplayList properties are once again being enabled by default. This
CL both re-enables these properties (in View.java and DisplayListRenderer.h)
and fixes the various issues that enabling them caused the first time around.

Related issues (all currently marked as Fixed, though that was simply because
DL properties were disabled - this CL provides the real fixes now that
DL properties are enabled by default):
Issue #6198276 Text input broken
Issue #6198472 Native crash at pc 00076428 in many different apps in JRM80
Issue #6204173 Date/time picker isn't rendering all parts of UI
Issue #6203941 All Apps overscroll effect is rendered weirdly/has flickering
Issue #6200058 CAB rendering issue - not drawing items?
Issue #6198578 Front camera shows black screen after taking picture.
Issue #6232010 Layers not recreated when children change (DisplayList properties)

Change-Id: I8b5f9ec342208ecb20d3e6a60d26cf7c6112ec8b
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
6554943a1dd6854c0f4976900956e556767b49e1 27-Mar-2012 Romain Guy <romainguy@google.com> Use a status_t return type for GL functors

WebView needs more fine-grained control over the behavior of the
framework upon execution of the display lists. The new status_t
allows WebView to requests its functor to be re-executed directly
without causing a redraw of the entire hierarchy.

Change-Id: I97a8141dc5c6eeb6805b6024cc1e76fce07d24cc
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3 21-Feb-2012 Chet Haase <chet@google.com> Handle view properties at the native level

Basic functionality of handling View properties (transforms,
left/right/top/bottom, and alpha) at the native DisplayList level.
This logic is disabled for now (via compile-time flags in View.java and
DisplayListRenderer.h) as we continue work on it (there is no advantage
to the new approach until we optimize invalidation and rendering paths
to use the new code path).

Change-Id: I370c8d21fbd291be415f55515ab8dced6f6d51a3
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
55fd2c9b2e87986b03cb58676bdf46bc6d5f1c36 10-Mar-2012 Romain Guy <romainguy@google.com> Don't bind data to missing uniforms

Change-Id: Ib9d1f14eb0bef04e0910baa4eaf3e49cce81c0ce
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
2bf68f063b0077ddef6ebfe54f2ae5e063c2c229 02-Mar-2012 Romain Guy <romainguy@google.com> Deferred layer updates

Change-Id: I83d9e564fe274db658dcee9e0cc5bbf9223ebb49
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
dd7c8e4c68205d39109d4317dd0c9b05ed43e8e5 01-Mar-2012 Romain Guy <romainguy@google.com> Small tweak to Canvas.drawPath() GL implementation

Change-Id: I1d668a912996e1267bcf2127058888e489a2d9b3
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
9777173eb6c9eb97c7921c8288ebc65e3ab3ce6f 29-Feb-2012 Romain Guy <romainguy@google.com> Full implementation of Canvas.drawPath()

Change-Id: I23223b89770a0cd2b4762365bead9bfddb094290
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
03d58520c3eb6bb7efb7235bfd957550533d6725 25-Feb-2012 Romain Guy <romainguy@google.com> More infrastructure for Canvas.drawTextOnPath

Change-Id: Iff42b24e342650d06fa4e2fa9db6c28da820ff01
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
325740fb444af8fc7fb0119b2e30ce322c2ae134 25-Feb-2012 Romain Guy <romainguy@google.com> Add hooks to implement Canvas.drawTextOnPath() in GL

Change-Id: I165c9e05facf5365aa6850605688e538640c7fcc
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
33f6beb10f98e8ba96250e284876d607055d278d 17-Feb-2012 Romain Guy <romainguy@google.com> Record possible clip rejects when recording display lists

This optimization allows us to quickly skip operations that lie
entirely outside of the known bounds of a display list. Because
of ViewGroup.setClipChildren, we must keep the operations recorded
in the display list. setClipChildren(false) is however a very
uncommon operation and we will therefore often benefit from this
new optimization.

Change-Id: I0942c864e55298e6dccd9977d15adefbce3ba3ad
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
211370fd943cf26905001b38b8b1791851b26adc 02-Feb-2012 Romain Guy <romainguy@google.com> Add optional metadata to initiliaze the render threat.

The render threat is likely to break your application if you initiate it.
As such it must be explicitely requested using the following meta-data
tag in your manifest's application tag:

<meta-data android:name="android.graphics.renderThread" android:value="true" />

Change-Id: Ibf0a48af2a0d091562bf6907eac970e3d1d601c4
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
13631f3da855f200a151e7837ed9f6b079622b58 31-Jan-2012 Romain Guy <romainguy@google.com> Add debug markers to OpenGLRenderer

These markers will be used to group the GL commands by View in the
OpenGL ES debugging tool. This will help correlate individual GL
calls to higher level components like Views.

Change-Id: I73607ba2e7224a80ac32527968261ee008f049c6
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
530041d3191ce817832a0108514617768e43cda6 26-Jan-2012 Romain Guy <romainguy@google.com> Add stencil buffer to the EGL config

Change-Id: If76c0cd6127534d90f9526b75c0f8e56259c6722
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
5ff9df658230d49e42c43586997a02d8e4dd417e 24-Jan-2012 Romain Guy <romainguy@google.com> Add full support for Canvas.setDrawFilter()

Change-Id: I0ad35d0603c4eeda469014803be14c1dcdde918c
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
671d6cf460531825a321edb200523d0faa7792c9 18-Jan-2012 Romain Guy <romainguy@google.com> Full support for Canvas.drawPosText

This also introduces a small optimization when rendering text.

Change-Id: Iff620ac97bf878eaac406bccc6daa07052c93890
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
eb9a5367e8f0e970db8509ffb2584f5376bc62ed 18-Jan-2012 Romain Guy <romainguy@google.com> First pass at implementing Canvas.drawPosText() in GL

Change-Id: Ia3ac347e95d57eb86c63045156c8dbc0572b03cb
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
3762c311729fe9f3af085c14c5c1fb471d994c03 06-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/#/c/157220

Bug: 5449033
Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
5baa3a62a97544669fba6d65a11c07f252e654dd 20-Dec-2011 Steve Block <steveblock@google.com> Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/156016

Bug: 5449033
Change-Id: I4c4e33bb9df3e39e11cd985e193e6fbab4635298
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
82bc7a772747fcf8a6fe7097f70bf2981429ffe9 03-Jan-2012 Romain Guy <romainguy@google.com> Properly restore the GL scissor after a GL draw functor
Bug #5781254

Change-Id: I1dc4809563a793b6b579814951d4d73b4c34bf32
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
8f85e80b64b89fd38cc23b129f61ec36ddde7f15 15-Dec-2011 Romain Guy <romainguy@google.com> Generate even fewer GL commands

Change-Id: I0f4dcacb03ef5ee7f6ebd501df98bfead5f0a7f8
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
2d4fd364843d3efc6e6ee59ccc5beb513a86d789 14-Dec-2011 Romain Guy <romainguy@google.com> Reduce the number of active texture changes

Change-Id: I94046bdfe20740c26c8183822e3002d692fde7c4
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
a1d3c91afbd52c7e8b01f4a9060c5459f02ae7a5 13-Dec-2011 Romain Guy <romainguy@google.com> Further reduce the number of GL commands sent to the driver

Change-Id: Id922b2a166ea4573b767c27d3195e11c70320b23
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
15bc6437f8b4cf10dba55c7638d349e7b9563f4f 13-Dec-2011 Romain Guy <romainguy@google.com> Reduce the number of GL commands generated by the UI

This optimization along with the previous one lets us render an
application like Gmail using only 30% of the number of GL commands
previously required

Change-Id: Ifee63edaf495e04490b5abd5433bb9a07bc327a8
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
f3a910b423db7ad79cf61518bdd9278c048ad0d8 13-Dec-2011 Romain Guy <romainguy@google.com> Optimize state changes

Change-Id: Iae59bc8dfd6427d0967472462cc1994987092827
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
d71dd367af604571c7d00ca473184a1b9240eca2 13-Dec-2011 Romain Guy <romainguy@google.com> Minimize the amount of data uploaded to draw text

Change-Id: I6313ac039291c9cd93aadafe3566ad9d60cab42d
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
39d252a6632d057d5077f7eaf1b8ed7a142f3397 13-Dec-2011 Romain Guy <romainguy@google.com> Various OpenGL optimizations

Change-Id: Ib0742c96f10f5f50e7e5148b742c31b6c232d127
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
3e263fac8c9c0e0fb242186b514a7af8efb40961 13-Dec-2011 Romain Guy <romainguy@google.com> Keep shaders to render properly

I don't know who's to blame, SGX or Tegra2 but one of those two GPUs is not
following the OpenGL ES 2.0 spec.

Change-Id: I2624e0efbc9c57d571c55c8b440a5e43f08a54f2
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
9c4b79af221b53f602f946faa9ff317a596a0c39 11-Nov-2011 Romain Guy <romainguy@google.com> Discard framebuffer rendering queues when discarding layers
Bug #5581817

Change-Id: Ie30700a29059d2ea60eb7bd3f8bd20ac48a149ab
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
8f9a9f61ab793d9387a5942b307e74324704893b 05-Dec-2011 Romain Guy <romainguy@google.com> Clip text correctly
Bug #5706056

A newly introduced optimization relied on the display list renderer
to properly measure text to perform fast clipping. The paint used
to measure text needs to have AA and glyph id encoding set to return
the correct results. Unfortunately these properties were set by
the GL renderer and not by the display list renderer. This change
simply sets the properties in the display list renderer instead.

This change also improves the error message printed out when the
application attempts to use a bitmap larger than the max texture
size.

Change-Id: I4d84e1c7d194aed9ad476f69434eaa2c8f3836a8
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
cac5fd3e09e9dc918753d4aff624bf29a367ade3 02-Dec-2011 Romain Guy <romainguy@google.com> Faster text clipping

Change-Id: I03a00c4261d81a416b1ad7b86ce2d432c71908b4
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
d21b6e1fe337b35f62cf2028e9bd0637fd009a75 01-Dec-2011 Romain Guy <romainguy@google.com> Optimize away unnecessary state changes

Change-Id: I0f6816f9f6234853575ecee5033186ad19e76380
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
d3ea6b40bb8f0fbc2a877963db1ab4fa0fc02b2f 29-Nov-2011 Chet Haase <chet@google.com> am 38928899: am 8990cb57: Merge "Fix flashing wifi dialog after rotating back from landscape." into ics-mr1

* commit '3892889952b0ad3fa0b095c96d8ae2ae110585e2':
Fix flashing wifi dialog after rotating back from landscape.
08837c246c9c27902c59b41c8661c2f27a4aa2bc 28-Nov-2011 Chet Haase <chet@google.com> Fix flashing wifi dialog after rotating back from landscape.

There was an error in some of the OpenGL layer logic such that we would
occasionally set up a layer for rendering and then not clean up when it was
done. This caused future OpenGL rendering to go into that layer instead of
to the buffers being displayed on the screen, resulting in artifacts including
flashes and displaying of stale content. This happened specifically when
using the wifi settings dialog with the InputMethod keyboard displayed,
but it was probably visible in other situations as well.

Issue #5628248: Flickering/flashing after entering password for WiFi

Change-Id: I38139f620b310f4309570fa7224552d2ee633999
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
c28e574037b2bfc8c2ea24593299aa20ae9078f8 22-Nov-2011 Romain Guy <romainguy@google.com> am a2fabf4a: am 303a0695: Merge "Draw in the correct FBO after invoking a GL functor Bug #5650514" into ics-mr1

* commit 'a2fabf4a109d46f99ff7370aa05e48c1708c2838':
Draw in the correct FBO after invoking a GL functor Bug #5650514
421458aad764cd9d1403d2540ab979b336b02341 22-Nov-2011 Romain Guy <romainguy@google.com> Draw in the correct FBO after invoking a GL functor
Bug #5650514

After invoking a GL functor, libhwui restores a few OpenGL states
including the current FBO. The renderer was however making the
wrong assumption that the FBO to restore to was the base layer
instead of the FBO associated with the current canvas state.

Change-Id: Ie565500832ebffd673f6a43b83422d6cc05470a0
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
28a5ec9613a824d2ec15ce5e5cec77a6fcf444d5 14-Nov-2011 Dave Burke <daveburke@google.com> am 2cfb873c: am 9d66da8a: Merge "Revert "Discard framebuffer rendering queues when discarding layers"" into ics-mr1

* commit '2cfb873c9f0b56f2c7d694a21c968511223933af':
Revert "Discard framebuffer rendering queues when discarding layers"
7077506f9945b87b02bdd47ffce75a5b813c821c 14-Nov-2011 Dave Burke <daveburke@google.com> Revert "Discard framebuffer rendering queues when discarding layers"

This reverts commit da96f8ac2c1c35a54f3f36e6d776cb386a251d03.
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
3f511aaf1cb9dfa69e2f4225a5bd41bec0864cc7 14-Nov-2011 Mathias Agopian <mathias@google.com> am a16ee939: am 28587497: Merge "Discard framebuffer rendering queues when discarding layers Bug #5581817" into ics-mr1

* commit 'a16ee9390e1fcea8ff7cbefd253659c37f2999a3':
Discard framebuffer rendering queues when discarding layers Bug #5581817
da96f8ac2c1c35a54f3f36e6d776cb386a251d03 11-Nov-2011 Romain Guy <romainguy@google.com> Discard framebuffer rendering queues when discarding layers
Bug #5581817

Change-Id: If612846ec5f7793710fc4df152791fb32c506551
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
ef9bb3c3ea3aa08071ea0c32a505b379c322e5b5 17-Oct-2011 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #5438102 Double Arabic harakat overlap instead of stack In TextView

IMPORTANT: this change needs two patches for Harfbuzz:
- one concerning hb_utf16_script_run_prev() which was not returning the correct "previous" script
- one for the "script_properties" table that was missing Arabic code point ranges and declaring
HB_Script_Inherited instead of HB_Script_Arabic

The current change is doing the following:
- pass the correct typeface for Harbuzz shaping (depending on the script of the run)
- offset correctly the glyphIDs returned by Harfbuzz

We need to offset the glyphsID as Harfbuzz will return local glyphIDs (meaning in the
local range of the font used for shapping).

We then cannot use those glyphIDs when we are using a fallback Font (Arabic, Hebrews...)
because the FontRenderer needs glyphIDs in the range of all the Fonts (including the fallbacks)

Change-Id: I494897435bbc59293b02392ee2059cebcdf0e571
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
e707859415f4c8e1c01228dfaa58fb0a690d442e 28-Oct-2011 Romain Guy <romainguy@android.com> Load identity matrix when calling Canvas.setMatrix(null)
Bug #5446826

Change-Id: I3a7817f266b17e9abe948500816d629edd9a2822
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
2ffefd48e20d311b38c0673edadb27c1f6ad328b 09-Sep-2011 Romain Guy <romainguy@google.com> Add support for 3 new blend modes when blending with framebuffer:
Add
Multiply
Screen

Change-Id: I92a3c2612c86613087568bf0c03cc6f92b5ded44
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
8a3957d43bcae93fbb9f6b4b4c3de8abdb3c953c 08-Sep-2011 Romain Guy <romainguy@google.com> Add reminder in the code to fix T-junctions

Change-Id: I52b112694f930e641f01fb78dc55412986023411
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
04c9d8c2ffd028c35c750bac0a4a7b79e48059b5 25-Aug-2011 Romain Guy <romainguy@google.com> Optimize display lists

Remove redundant or useless operations

Change-Id: If989b4eaa9143eef4254c38b39959aeed1f2b9ab
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
631582f7f7a3c879a5fba81f2bc082e4826758aa 24-Aug-2011 Romain Guy <romainguy@google.com> Enable linear filter when scaling bitmaps
Bug #5205673

Change-Id: I8b0f90877df6b6c6757d35dcf6cd14e79e840b96
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
6816972eb69ee8b294553dac92b3c1ad5b1ca1f7 23-Aug-2011 Romain Guy <romainguy@google.com> Don't use bilinear filtering on unscaled bitmaps
Bug #5198590

Change-Id: I4333d850501ac849eeeeb247e4178dd469b9de3d
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
302a9df1d50373c82923bb84ff665dfce584fb22 16-Aug-2011 Romain Guy <romainguy@google.com> Add an API to set the transform on a TextureView's surface texture.
Bug #5156689

Change-Id: I635a625885c9b832a60d44ece0de7613ceb84109
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
9d865512f1a39bac6bed612b24023213d5a1fb1d 12-Aug-2011 Romain Guy <romainguy@google.com> Remove unnecessary private API

Change-Id: I2ecb367528ec0691c07153a3d163b82a6ca33fdf
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
b50149825fae95b2918bcf67b2ddb773b9797068 29-Jul-2011 Romain Guy <romainguy@google.com> Correctly apply linear filter to drawBitmap(Rect, Rect)

Change-Id: I1049282e1996b1020c92cb7bec46e9f28e94e967
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
e3c26851dc315b730ea0fe5ef35bb1db81f6d675 26-Jul-2011 Romain Guy <romainguy@google.com> Improve rendering performance on some GPUs

This change sets textures filtering to GL_NEAREST by default. GL_LINEAR
filtering is only used when textures are transformed with a scale or
a rotation. This helps save a couple of fps on some GPUs.

Change-Id: I1efaa452c2c79905f00238e54d886a37203a2ac1
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
f2fc460a9512500d9d5749fbaada88903d8e3b22 20-Jul-2011 Romain Guy <romainguy@google.com> Reduce the fade area to save bandwidth.

Change-Id: I8ccea17fc1fb3c132329baa0acc1b3d5a140a5c6
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
b2479153b743df9e54f7e17c7132a5ecd87fa453 08-Jul-2011 Romain Guy <romainguy@google.com> Correctly position layers.

Change-Id: I1678b1c5bdab140b44e56556c50ab8329255f18a
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
ec19b4a764d512091a780fc93ced567dfbf80914 08-Jul-2011 Romain Guy <romainguy@google.com> Use NEAREST filtering mode for TextureView.getBitmap().

Change-Id: I4649062bbdf18ebba7924bdf578f39ad8f6576ac
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
9ace8f5e79e76893fe4ca9e4d10f6c4056330485 08-Jul-2011 Romain Guy <romainguy@google.com> Use NEAREST filtering for layers whenever possible.

Change-Id: Id5bee1bd4a322cf93e8000b08e18f1e1b058648e
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
a9489274d67b540804aafb587a226f7c2ae4464d 23-Jun-2011 Romain Guy <romainguy@google.com> Add the ability to specify the opacity of a TextureView

TextureView assumes its content is opaque by default.

Change-Id: Iba873423566a5b67c388081838bd910dceba32ba
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
d6b2a00dd43257d1498b09175bff63663f6cb861 18-Jun-2011 Romain Guy <romainguy@google.com> Add error checking to LayerRenderer::copyLayer

This method is invoked by TextureView.getBitmap() and failures must be
caught to avoid leaving the GL context in a potentially bad state.

Change-Id: I620de395ba1bc20154de58c81963223dc55cac78
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
54be1cdf3d63095512120fa7ced5c16e462abffa 14-Jun-2011 Romain Guy <romainguy@google.com> Batch glCopyTexImage() calls to get about 15 fps back on SGX.

Change-Id: I04079e070739c1e46df3e90fc388c335e2a7d2b9
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
181d0a6ccedee03789919d53c46540a8df751896 10-Jun-2011 Romain Guy <romainguy@google.com> Don't apply AA to rects with no rotation/perspective.

Change-Id: I21138d4d0589cc28f1dcffb8b675cd81a9900e24
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
67ffc36a79ce3a9a0b5da28b65123864b7d2597f 04-Jun-2011 Romain Guy <romainguy@google.com> Measure text with the appropriate text encoding.
Bug #4546327

Change-Id: I8eb593b03a81145e08be92579706ddd775feb0a2
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
726aeba80ffc6778a9bc3e0ee957b8d644183505 01-Jun-2011 Romain Guy <romainguy@google.com> Add support to OpenGLRendere to draw BiDi text.
Bug #4350336

Change-Id: I1cf31693f7ca9653fa3a41b5b91c27ef288d680f
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
f09ef51889f75289b041f9e9f949b7b82ed5b686 27-May-2011 Romain Guy <romainguy@google.com> Fix issue with drawColor(color, Mode.Clear)

Change-Id: I486b24a5b609c6f8adb0276037ddb24af2b888b2
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
1e59f9d10d164f156221f6d34b932f06cdd29f1f 27-May-2011 Romain Guy <romainguy@google.com> Fix texture coordinates for sub-bitmap rendering.

Change-Id: I05a31775e03f5b223a55a5144d420351abac89be
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
f504a2fa144504ca1efd39a4ef9208e3d4d336c5 27-May-2011 Romain Guy <romainguy@google.com> Correctly implement the CLEAR xfermode.

The previous implementation was using glBlendFunc with the parameters
GL_ZERO/GL_ZERO which doesn't work for text, paths and other alpha
sources (anti-aliasing.) The correct implementation is GL_ZERO/
GL_ONE_MINUS_SRC_ALPHA.

Change-Id: I4cca65e57b6a37bbf5a41d382cb0648ee8e11e79
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
d39d1affe82cb8c21d32baaa5fbb2d6afb806f8e 16-May-2011 Derek Sollenberger <djsollen@google.com> Updates resulting from the Skia merge (revision 1327)

Change-Id: I2a8f5869dbe95bb594f2ba5d7278f9b330e6f17a
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
9dec462c1f522533620be3c70f2fc60e69368c1a 13-May-2011 Fabrice Di Meglio <fdimeglio@google.com> Merge "Prepare OpenGLRenderer to use glyphs from TextLayoutCache"
2ea75880142152b3a9993cb245754d73c05749a7 13-May-2011 Fabrice Di Meglio <fdimeglio@google.com> Prepare OpenGLRenderer to use glyphs from TextLayoutCache

- add OpenGLRenderer.drawGlyph()
- refactor glypth logging code

Change-Id: I797e6f1304d3f3f8f6ed31e7f9965d336233d2a4
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
858aa93ddb6e69e0503382af63bb681b6728aef1 12-May-2011 Chet Haase <chet@google.com> Antialiasing for rectangles

Change-Id: I7ca6931606541ddd504bd5db7f8dc04b9cde8cd9
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
c54ed966f78b9ee8117931859d62faa6f11fe018 06-May-2011 Chet Haase <chet@google.com> Minor javadoc enhancements

Change-Id: Ic24bb0e1e669989f0cae3a9b8fa064b38c8e7948
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
3825fef300122ffcc262e56a36a9fc36d8d084b0 06-May-2011 Chet Haase <chet@google.com> Merge "Fix for scaled AA lines"
99ecdc480dd4f9b550b2a62ea39f77845a4fec49 06-May-2011 Chet Haase <chet@google.com> Fix for scaled AA lines

Previously, the translucent boundary of AA lines would be scaled
by the line's transform. It should always be exactly one pixel wide
in screen space. This fix accounts for scaling for the boundary
region, and fixes some AA calculations that make wide/AA lines
more correct.

Change-Id: I30df2d5d96315bf3e7ff30be9735282fd5439a39
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
ed30fd8e9a2d65ee5c8520de55b0089c219f390c 23-Apr-2011 Chet Haase <chet@google.com> Add ability for hierarchyviewer to output displaylist info

Clicking on a node in hierarchyviewer1 and hierarchyviewer2 and then
clicking the new "Dump DisplayList" button will cause the display
list for the selected node (including its children) to be output into
logcat.

Change-Id: Iad05f5f6cca0f8b465dccd962b501dc18fe6e053
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
a17de9b493123f0d6e6d0b842150bf29322b7a88 05-May-2011 Chet Haase <chet@google.com> Revert "Add ability for hierarchyviewer to output displaylist info"

This reverts commit b2a4b52e8d5e499d33e2765e8c47851bf0266299.
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
b2a4b52e8d5e499d33e2765e8c47851bf0266299 23-Apr-2011 Chet Haase <chet@google.com> Add ability for hierarchyviewer to output displaylist info

Clicking on a node in hierarchyviewer1 and hierarchyviewer2 and then
clicking the new "Dump DisplayList" button will cause the display
list for the selected node (including its children) to be output into
logcat.

Change-Id: Id32f62569ad1ab4d533bc62987f3a7390c1bb4e6
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
df0a7fbdcff3c683641b7980da50a7d0eebe0876 03-May-2011 Romain Guy <romainguy@google.com> Merge "Allows to render with an OpenGL context inside a TextureView."
8f0095cd33558e9cc8a440047908e53b68906f5f 03-May-2011 Romain Guy <romainguy@google.com> Allows to render with an OpenGL context inside a TextureView.

Change-Id: I59453f7fc3997f0502a1c5d325d37fed376fabc7
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
99585adeb4167ca357a72eb866f34c1af944f4b9 03-May-2011 Chet Haase <chet@google.com> Line endcaps for AA lines are now antialiased.

Also fixed other minor issues with AA and line rendering.

Change-Id: Icd4638d27c70e2ee0f28b5d9a2b97d8b29e8ac4d
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
ad44445c772efe66fdf063aa8f78d7ae3233570e 29-Apr-2011 Romain Guy <romainguy@google.com> Merge "New widget: TextureView Bug #4343984"
aa6c24c21c727a196451332448d4e3b11a80be69 29-Apr-2011 Romain Guy <romainguy@google.com> New widget: TextureView
Bug #4343984

TextureView can be used to render media content (video, OpenGL,
RenderScript) inside a View.

The key difference with SurfaceView is that TextureView does
not create a new Surface. This gives the ability to seamlessly
transform, animate, fade, etc. a TextureView, which was hard
if not impossible to do with a SurfaceView.
A TextureView also interacts perfectly with ScrollView,
ListView, etc. It allows application to embed media content
in a much more flexible way than before.

For instance, to render the camera preview at 50% opacity,
all you need to do is the following:

mTextureView.setAlpha(0.5f);
Camera c = Camera.open();
c.setPreviewTexture(mTextureView.getSurfaceTexture());
c.startPreview();

TextureView uses a SurfaceTexture to get the job done. More
APIs are required to make it easy to create OpenGL contexts
for a TextureView. It can currently be done with a bit of
JNI code.

Change-Id: Iaa7953097ab5beb8437bcbbfa03b2df5b7f80cd7
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
75e3ef048d8826f0db58f117403ce412e1d076a7 27-Apr-2011 Chet Haase <chet@google.com> Merge "Fix various hw-accelerated line/point bugs"
8a5cc92a150bae38ec43732d941b38bb381fe153 26-Apr-2011 Chet Haase <chet@google.com> Fix various hw-accelerated line/point bugs

All accelerated lines are now rendered as quads. Hairlines used to
be rendered as GL_LINES, but these lines don't render the same as our
non-accelerated lines, so we're using quads for everything. Also, fixed
a bug in the way that we were offsetting quads (and not offseting points)
to ensure that our lines/points actuall start on the same pixels as
Skia's.

Change-Id: I51b923cc08a9858444c430ba07bc8aa0c83cbe6a
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
9fc27819d75e24ad63d7b383d80f5cb66a577a0d 27-Apr-2011 Romain Guy <romainguy@google.com> Correctly compute tex coords for rect layers.
Bug #4192695

This change also fixes Javadoc links in the framework.

Change-Id: Ia548bcb18baba5d6fe6a4a04a2278e3a3bd465b2
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
740bf2bb2e900d3db2292b5909b4b4c6e90320e6 27-Apr-2011 Romain Guy <romainguy@google.com> Apply shaders/filters to text drop shadows.
Bug #4318323

This change also fixes the fact that shaders were not modulated
by the paint's color when drawing paths.

Change-Id: Id88804143aea06c895d4cbcdbe106d660230aa5a
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
6cfdf4538049e4b96f50d8c0fe3119664420cc34 23-Apr-2011 Chet Haase <chet@google.com> Fix bitfield bug with vertex shader selection

Change-Id: I8bd3005f363afb52e6624806efb3e04c4a56ee18
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
5b0200bd47e8a9a4dc8d2e6c3a110d522b30bf82 14-Apr-2011 Chet Haase <chet@google.com> Enable anti-aliasing for hw-accelerated lines

Draw anti-aliased lines with OpenGL by constructing a quad with
a border that fades out (to mimic fragment coverage).

Change-Id: Ib81a3e62d663acdf1b46b401ac4aa7ee9855cc7e
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
8a40f6a6324387b324c998cd9d6af900f1dca5ab 25-Mar-2011 Chet Haase <chet@google.com> Merge "Fix bug with accelerated translucent rendering"
f147340bd117c16a67287e2f6ca9ded651bb32b2 24-Mar-2011 Chet Haase <chet@google.com> Fix bug with accelerated translucent rendering

There was a bug in the dirty region optimizations when
using alpha layers. This prevented translucent objects from
being drawn at all in many situations.

Change-Id: I23e9bce3595fbd6fe2bda15e8753a0f35baffb82
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
5b7a3150a6dbf193b371854b66fa654937633d3a 24-Mar-2011 Romain Guy <romainguy@google.com> Don't crash when omitting paint to drawBitmap() with A8 configs.

Change-Id: I3d630554ad82fa846385274d12d0434e890ef45d
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
ed6fcb034b44d9a6ac2fc72fee6030417811f234 21-Mar-2011 Romain Guy <romainguy@google.com> Add support for drawPoint() and drawPoints().

Change-Id: I01bef50c08ec3160f8d40dc060b2cf6c2e4d7639
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
67ac217a81f34ee3d35df84b38f3456843c40706 19-Mar-2011 Romain Guy <romainguy@google.com> Fix hairline rendering.

Change-Id: Ib6129b446b53678b1b955d8516418370cbae4f10
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
a168d7372132d6c87835878794b6ed43d0d282fd 19-Mar-2011 Romain Guy <romainguy@google.com> Correctly apply filters to Alpha8 bitmaps.

This change also removes unnecessary operations from display lists.

Change-Id: I627f85861982731f0ee7705b48b36d9c56f22f39
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
40667676e542a9daeafeac9904c30004e8706fd3 18-Mar-2011 Romain Guy <romainguy@google.com> Optimize rect-shaped layers.

This brings back an optimization disabled in HC-MR1. This time the
correct geometry is generated to avoid unnecessary blending.

Change-Id: Id56404dc46bb84c75facc25c18488a690741b592
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
08aa2cbd5e62e7ca140f78f8bea0477a19880fd9 17-Mar-2011 Romain Guy <romainguy@google.com> Send WebView the current transform and whether we're drawing a layer.
Bug #3275491

These can be used by WebView to correctly apply alpha and geometric
transforms.

Change-Id: I2ecd4376d68df886dead3c9240317de33f56828f
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
80911b851764b073310fd0bffdf4a7db0d8fdd0b 16-Mar-2011 Romain Guy <romainguy@google.com> Modify the GL renderer's functor to pass the clip to WebView

Change-Id: If5efe399ca58f3000b2883e24e9f3736a2025184
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
6217a71cd281003a376d998269d577d26a61c206 16-Mar-2011 Romain Guy <romainguy@google.com> Fix performance issue in Launcher
Bug #3515248

The problem is caused by the fast path when compositing layers on screen.
The fast path draws a single quad using glDrawArrays() whereas the general
path draws an arbitrary mesh using glDrawElements(). It looks like there's
an issue in the driver since glDrawArrays() is significantly slower than
glDrawElements() for a quad (6 vertices!)

This change just gets rid of the fast path.

Change-Id: Ib2361253ec67f44a988270f76c183422f12ce537
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
ad37cd3b5d3de9dd0858af04fbccd102e8ff4b0e 15-Mar-2011 Romain Guy <romainguy@google.com> Fix disappearing edges in lists/scrollviews/etc.
Bug #4093871

This bug was introduced by a change that modified the way fade areas
are cleared. The previous change relied on Rect::intersect() to empty
the intersected rect when the two rects don't intersect. Unfortunately
this is not what intersect() does. The fix is rather simple and
sets the layer's bounds to empty when they don't intersect with the
clip or the viewport. This has the side effect of ignoring the layer
which is the expected result.

Change-Id: Icf0038b9a476c53f8eff7084136aba3033d093e6
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
7b5b6abf852c039983eded25ebe43a70fef5a4ab 15-Mar-2011 Romain Guy <romainguy@google.com> Fix rendering artifact in edge fades.
Bug #4092053

The problem always existed but was made visible by partial invalidation.
When saving a layer, the renderer would try to postpone glClear()
operations until the next drawing command. This however does not work
since the clip might have changed. The fix is rather simple and
simply gets rid of this "optimization" (that turned out to be
usless anyway given how View issues saveLayer() calls.)

This change also fixes an issue with gradients (color stops where
not properly computed when using a null stops array) and optimizes
display lists rendering (quickly rejects larger portions of the
tree to avoid executing unnecessary code.)

Change-Id: I0f5b5f6e1220d41a09cc2fa84c212b0b4afd9c46
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
cabfcc1364eb7e4de0b15b3574fba45027b45cfc 08-Mar-2011 Romain Guy <romainguy@google.com> Add support for partial invalidates in WebView
Bug #3461349

This change also fixes two bugs that prevented partial invalidates
from working with other views. Both bugs were in our EGL implementation:
they were preventing the caller from comparing the current context/surface
with another context/surface. This was causing HardwareRenderer to always
redraw the entire screen.

Change-Id: I33e096b304d4a0b7e6c8f92930f71d2ece9bebf5
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
84962f2fe6ce779c583cc54b11a9de2b6a568117 03-Mar-2011 Romain Guy <romainguy@google.com> We need to go deeper.
Bug #3431907

When drawing layers inside a layer, the wrong target FBO would be used.
This would happen for instance with app widgets using a ViewFlipper
in Launcher. The ViewFlipper uses a fade animation that triggers a
call to saveLayerAlpha(), which in turns creates an FBO. If this happened
during a scroll, the ViewFlipper's FBO would be composited back directly
inside FBO 0, i.e. the screen. This properly initializes the snapshots
of hardware layers to use the layer's FBO as the default compositing
target instead of using 0.

This problem did not happen when drawing hardware layers inside
hardware layers because LayerRenderer already takes care of figuring
out the FBO it needs to composite into. The bug would occur only
with layers generated with saveLayer() and its saveLayerAlpha()
variation.

Layers inside hardware layers insider layers inside hardware layers
now work properly.

Change-Id: Ibe852301087f3d414ad8a18436eebc81f8ac66f5
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
d643bb56fdf21973ea75984f0816b7dc024698df 01-Mar-2011 Romain Guy <romainguy@google.com> Correctly mark layers dirty when drawing WebView.

Change-Id: I7ae0c3cfa0916d8fbeaf01e8da127c621a06a0f4
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
4368c449d7baa398e67eb4d96467f1de8862c5bb 25-Feb-2011 David Li <davidxli@google.com> Merge "Fix mTexCoordsSlot > 0 check to mTexCoordsSlot >= 0"
cf28957c89127ccfc82d535903c776124665446a 25-Feb-2011 David Li <davidxli@google.com> Fix mTexCoordsSlot > 0 check to mTexCoordsSlot >= 0

0 Is a valid attribute location.

Change-Id: Ib24335f48efd6cc59e2ab877569d7d0c95f8490a
Signed-off-by: David Li <davidxli@google.com>
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
b37cbec6d06578a72bdd9c2caa3fd964ade71c53 25-Feb-2011 Romain Guy <romainguy@google.com> Correctly blend translucent GIF bitmaps.

Change-Id: Ifeb2c1d97a4c6dfeb1a7b5b26f1a3153e9f8da7f
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
6062c5912dc79704b489fc8c289b78a400ed05ee 22-Feb-2011 Derek Sollenberger <djsollen@google.com> Skia Merge (revision 808)

This is a companion CL to the one found in /external/skia

Change-Id: If81748545435cab20a5d8479329ab333cb973e16
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
894df17eee708688c8a6e67941add2017239c790 18-Feb-2011 Alex Sakhartchouk <alexst@google.com> Fixing font renderer attribute slot locations.

Change-Id: I6377bb641df7d8372d873c00790189f9a190afd6
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
b18d2d0079b4dbf5675ab79b7111b3dfb3cc1ad0 11-Feb-2011 Romain Guy <romainguy@google.com> Dirty layers in the area covered by a drawBitmapMesh() call
Bug #3410827

Change-Id: Ic8b4f6201af94497bba86c75819588c78debddc2
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
c78b5d50f961ac8f696f8282979ae283cacd3574 04-Feb-2011 Romain Guy <romainguy@google.com> Properly handle dirty rectangles generated from 9-patches
Bug #3409580

This bug affects anything that draws a 9patch inside a layer, this includes
launcher's workspace, all of the fade animations, etc.

Change-Id: Icbe8ecd158e3d5f44d07516462de68c5d1fb0a8f
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
3a3133d876caf60ebff2176ad75c3dcf0259148d 02-Feb-2011 Romain Guy <romainguy@google.com> Update layers based on the dirty region.
Bug #3413433

This helps Launcher when a widget updates during a scroll, or when interacting
with widgets on the workspace if layers are still turned on.

Change-Id: Ic7a42eb34f74f4ae988039754f815e2efd1d1e4f
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
4f09f5417b5c14fd31336dacfff86972e7885a03 27-Jan-2011 Romain Guy <romainguy@google.com> Don't draw the same triangles several times.
Bug #3388197

Change-Id: Ief1dfd9447f144e9992340a173d2893e5e049129
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
2b1847ea60650a9f68372abe860415f18b55081d 26-Jan-2011 Romain Guy <romainguy@google.com> Remove unused API

Change-Id: I1714fd82a64b752f0350ef4ef9179ce19e089c6a
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
f90f8171e6acb56f9f87093c01fd586f2140697a 26-Jan-2011 Romain Guy <romainguy@google.com> Make sure the opaque bitmap is opaque. GL doesn't like being lied to.
Bug #3382992

The result still looks wrong but it works as designed, unfortunately.

Change-Id: I6108e199fa336cb01faaabf6c75faa3b71c2339b
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
8d2959ddffcdee8b0c2f6387f2e2772c6df474ae 25-Jan-2011 Romain Guy <romainguy@google.com> Remove debugging log left by mistake.

Change-Id: I7d5165b4b682714940cea9886abeedd3f4858057
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
8168396d1acbcb5fdd29eeda4c30b2803d5283ae 25-Jan-2011 Romain Guy <romainguy@google.com> Fix rendering issues with animated layers.
Bug #3385247

- The layer's alpha was interpreted in the wrong range 0..255 instead of 0..1
- 9-patches would not correctly dirty the layer region, the generated mesh
was incorrect

Change-Id: I4916249bedcdb0794929f3796bd17854971efc88
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
7d7b5490a0b0763e831b31bc11f17d8159b5914a 25-Jan-2011 Romain Guy <romainguy@google.com> Enable partial invalidates when rendering with OpenGL.

Change-Id: Ie8be06c4776b815e8737753eb8003b4fd8936130
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
daf98e941e140e8739458126640183b9f296a2ab 10-Jan-2011 Chet Haase <chet@google.com> Use optimized display lists for all hwaccelerated rendering

Previously, display lists were used only if hardware acceleration
was enabled for an application (hardwareAccelerated=true) *and* if
setDrawingCacheEnabled(true) was called. This change makes the framework
use display lists for all views in an application if hardware acceleration
is enabled.

In addition, display list renderering has been optimized so that
any view's recreation of its own display list (which is necessary whenever
the visuals of that view change) will not cause any other display list
in its parent hierarchy to change. Instead, when there are any visual
changes in the hierarchy, only those views which need to have new
display list content will recreate their display lists.

This optimization works by caching display list references in each
parent display list (so the container of some child will refer to its
child's display list by a reference to the child's display list). Then when
a view needs to recreate its display list, it will do so inside the same
display list object. This will cause the content to get refreshed, but not
the reference to that content. Then when the view hierarchy is redrawn,
it will automatically pick up the new content from the old reference.

This optimization will not necessarily improve performance when applications
need to update the entire view hierarchy or redraw the entire screen, but it does
show significant improvements when redrawing only a portion of the screen,
especially when the regions that are not refreshed are complex and time-
consuming to redraw.

Change-Id: I68d21cac6a224a05703070ec85253220cb001eb4
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
a566b7c3aada08d37cf08096c972e3e641bed773 24-Jan-2011 Romain Guy <romainguy@google.com> Fix bitmap meshes to work in display lists.

Change-Id: Ie226d049840942d9ad9cf58e0c19132f49d62a75
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
8b2f5267f16c295f12faab810527cd6311997e34 24-Jan-2011 Romain Guy <romainguy@google.com> Add support for arcs.

Change-Id: I96c057ff4eb1b464b03f132da0b85333777bee4f
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
c1cd9ba335b293f11e1082447ef08e474710a05f 23-Jan-2011 Romain Guy <romainguy@google.com> Add support for ovals and stroked rectangles.

Change-Id: I1292e241386763c82e6622c8f7ed90b0f5b7bd4f
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
f6834478b379856d3e5de92ddce7de0e6ba9fa4a 23-Jan-2011 Romain Guy <romainguy@google.com> Always render text underline extra.
Bug #3381287

Change-Id: Ibfbc9c51c8dccef216daccc37d835e5dbf143a6a
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
c88e357d1ed9dadfc0efb3dfbe92f24460674ef5 22-Jan-2011 Romain Guy <romainguy@google.com> Fix regression with hardware layers.

The renderer was checking whether the layer's region is a rect to
draw it with a simple quad. This test was done against the layer's
region structure, which was cleared after generating the mesh.
Unfortunately Region::isRect() returns true when the region is
empty, which was causing the renderer to always use a quad to
draw a mesh on screen.

Change-Id: If4b874579ee0cedcb67367c9efa5c0c98ca55231
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
5a7b466a2b4b7ced739bd5c31e022de61650545a 21-Jan-2011 Romain Guy <romainguy@google.com> Add support for drawBitmapMesh().

Change-Id: Ic77f9c534bb90dc7b9458299544bd50b8b6ae6a5
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
ed8f8dd8cf621d6046db7e083f8a36205ed55609 20-Jan-2011 Romain Guy <romainguy@google.com> Merge "Add rounded rects and circles support to OpenGLRenderer." into honeycomb
01d58e43ede5ca98cbebdd166f9b0c545032c01b 20-Jan-2011 Romain Guy <romainguy@google.com> Add rounded rects and circles support to OpenGLRenderer.

Change-Id: I6cedf2b495d58de7c0437096809fa9e4518a1b8c
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
514fb18827186591d66973c2362c859b64b63556 19-Jan-2011 Romain Guy <romainguy@google.com> Don't attempt to create empty layers.
Bug #3369888

Change-Id: Ic17bbd1c04bbf760cb17d0eb9e6767fd6479948c
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
42f3a4b7c35dd1ea1922356eb3611af8cde05179 19-Jan-2011 Romain Guy <romainguy@google.com> Make embedded hardware layers work.
Bug #3369474

Change-Id: Ib6d7fb44eedda9dc2933b5e1b176f307968af91d
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
807daf7df615b60ce6fc41355aabe3aa353cebab 18-Jan-2011 Romain Guy <romainguy@google.com> Add support for skew()

Change-Id: Ia3a9a867f74fd78b61f75179e3788fdc2f0cacd0
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
f219da5e32e85deb442468ee9a63bb28eb198557 16-Jan-2011 Romain Guy <romainguy@google.com> Don't blend transparent pixels when rendering layers.

With this change, the rendere keeps track of what regions are rendered into
and generates a mesh that matches these regions exactly. The mesh is used
to composite the layer on screen.

Change-Id: I1f342576b9134fb29caff7fb8f4c1da179fe956d
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
1bd1bad0b4a75e633c5edbe802bf6fb4dd765161 15-Jan-2011 Romain Guy <romainguy@google.com> Preapre region tracking in layers

Change-Id: Ied1fa0d36c99ef4e33cb8fde7e3106a793db3a4c
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
f5106847fc962d57c7d5c586099b4a382f3e1c3d 14-Jan-2011 Romain Guy <romainguy@google.com> Don't add clipped rects to layer regions.
Bug #3350208

Change-Id: I9266862f1d4d57b4598852e8dfa202b5f5099cce
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
1e3a431d07cc0a307c6441e9ae1b17d3bf42323e 14-Jan-2011 Romain Guy <romainguy@google.com> Remove debug code

Change-Id: Idbc54d16adb4d86185d7196ea0297b5019d14ae4
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
ffac7fc5042296a459d0f5a450dbfe20917093dc 14-Jan-2011 Romain Guy <romainguy@google.com> Add debug logs for display lists.

Change-Id: I7bae8fd96e9eccb51f29f73e4069b4d3e6bdbdd7
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
ada830f639591b99c3e40de22b07296c7932a33f 13-Jan-2011 Romain Guy <romainguy@google.com> Cleanup implementation of hardware layers.

The new implementation relies on OpenGLRenderer's existing layer
code instead of duplicating it. The new code is much cleaner, with
simpler and better APIs and allows tracking of drawn regions inside
layers. Region tracking is not yet enabled but this will be done
in a future CL.

Change-Id: Ie826121a2227de8252c77b992a61218defea5143
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
c038ea358aadca082198f3effc550d33135bf426 13-Jan-2011 Romain Guy <romainguy@google.com> Reenable region composition pipeline for layers
Bug #3341848

It works this time!

Change-Id: I0d371d8b2c75c67d4ce5009ddb990fe5e55a0a27
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
6c319ca1275c8db892c39b48fc54864c949f9171 11-Jan-2011 Romain Guy <romainguy@google.com> Better backend for hardware layers.

With this new backend, a hardware layer is only recreated when
its associated view is udpated. This offers fast composition
in GL and fast update of the layer in GL as well.

Change-Id: I97c43a612f5955c6bf1c192c8ca4af10fdf1d076
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
7230a74e9a36dfc6c4346c14e325bf07cd05b380 11-Jan-2011 Romain Guy <romainguy@google.com> Composite layers as regions.

This change detects what area of a layer was drawn into and generates a mesh
to match this area exactly. This can be used to avoid blending empty pixels
when the layer is composited.
This change also adds proper layers support to lines rendering and implements
layers composition in a more readable way.

Change-Id: I4a5588b98b19bd66891ebdc39631b193c5e31999
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
a07105b7d2a27e6d69407bf96ddb773bddb5e553 11-Jan-2011 Romain Guy <romainguy@google.com> Better logging of out of memory errors in OpenGLRenderer.

Change-Id: I6b72a084340d8d4b6e0b0a100ed4314d09d441ef
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
171c592f0b7066acf279863c8a52ddabea49d3db 06-Jan-2011 Romain Guy <romainguy@google.com> New layers API for Views.

This API can be used to back a view and its children with either a
software layer (bitmap) or hardware layer (FBO). Layers have
various usages, including color filtering and performance
improvements during animations.

Change-Id: Ifc3bea847918042730fc5a8c2d4206dd6c9420a3
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
b146b1214ef6e4fc75d98779b22434335764cfdb 16-Dec-2010 Romain Guy <romainguy@google.com> Fix text shadow rendering issue.

Change-Id: Ic9eb0d38ad684d2f2c95a4f586f865db911cb872
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
8d0d4783a0206c5884bf0b958d181f450ba5207d 15-Dec-2010 Romain Guy <romainguy@google.com> Cleanup OpenGLRenderer::drawLines()

Change-Id: I3545a616e964335897c6e4148c431a07a2ce2a8b
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
86568198f2c83d4ce5c4cd692eda074ba9de9ed2 15-Dec-2010 Romain Guy <romainguy@google.com> Continue cleanup refactoring in OpenGLRenderer.

Methods that still need refactoring:
- drawLines
- composeLayerRegion

Change-Id: If546641adf598d49c330988803667264fda50ac2
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
fa7952dbb86a8aff0c90418aa77dddee3802c23a 14-Dec-2010 Romain Guy <romainguy@google.com> Colors are in the [0..1] range, not [0..255]

This fixes rendering in YouTube and other applications.

Change-Id: Ib5f3df632cde97374113ed42f895f136b2796373
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
5536841e5452172e7772d84ad5f4a2fc7059c9dd 14-Dec-2010 Romain Guy <romainguy@google.com> OpenGLRenderer would not render colors < ALPHA_THRESHOLD
Bug #3282805

This bug was introduced with a previous refactoring. This also fixes
issues with setting the alpha when drawing bitmaps.

Change-Id: Id47641d26a4536c7e540041f92243bf6db9fc96d
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
70ca14e08ae197547ac412e8a1210e1ebdfb2eb1 14-Dec-2010 Romain Guy <romainguy@google.com> Refactor OpenGLRenderer to simplify OpenGL drawing code.

This is the first step of the refactoring:
- drawColorRect
- drawTextureMesh

Remaining methods to refactor:
- setupTextureAlpha8
- drawPath
- setupShadow
- drawText
- drawLines
- composeLayerRegion

Change-Id: I0fced6a05b6b6eee10ee7cef0c3fbdaa6cefab20
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
32963c393a804db2cd86c24443c2f1c6eee6064b 10-Dec-2010 Romain Guy <romainguy@google.com> Ignore empty layers.

Change-Id: Ib2f99cdab654881fe079306e27d87c5ef9535700
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
af636ebf5feb2837683fbfe965040cb706b32ec1 10-Dec-2010 Romain Guy <romainguy@google.com> Don't set the invisible flag when saving an empty layer.
Bug #3270371

Change-Id: I65e85671c2fb70d74553c91213e5e759e0ac64ee
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
a957eea78557cb47a91d44d9e6ee641c58cf1c07 09-Dec-2010 Romain Guy <romainguy@google.com> New, better line drawing implementation.
Bug #3207544
Bug #3225875

Change-Id: Ibdd1dfc64e01625d5c441f39eb0aa3ee647f6ff5
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
8ab4079ca27e36e5c584495bcd71b573598ac021 07-Dec-2010 Romain Guy <romainguy@google.com> Fix 9patch rendering
Bug #3253396

Some quads were incorrectly assumed to be degenerate.

Change-Id: I9155699edc3424afe9d5a131886bb9966d46b109
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
3a3fa1be9ab8e11edc660ecb35ae21ae0b5c8cc2 07-Dec-2010 Romain Guy <romainguy@google.com> Draw text decorations correctly.

Change-Id: I237c0ca8bfe9f233e62476e80f72bcea4359398e
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
6620c6d413f972819fada92b574f0fa9e96d36c1 07-Dec-2010 Romain Guy <romainguy@google.com> Correctly render text when coordinates are not integers.
Bug #3225632

Change-Id: If09759e6e95eb2885362ab3ba088cf5aae64c7bf
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
a5ef39a21683189e5906c9f252b997f0508e350d 04-Dec-2010 Romain Guy <romainguy@android.com> Don't render degenerate triangles in 9patches.
Bug #3251983

Change-Id: Ib0b38a7b8111542372f4c4c106b6321c26fe4ad4
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
6f72bebe92a4db7b5dc83f4ac5b5fd02e3b4e2cd 30-Nov-2010 Romain Guy <romainguy@google.com> Update 9patch structure when rendering with different divs/colors.
Bug #3221488

Change-Id: Ifc9e42a991d630feadc9e8032322f37504d09d6d
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
fe48f65922d4a3cc4aefe058cee5acec51504a20 12-Nov-2010 Romain Guy <romainguy@google.com> Free resources only from the GL context thread.
Bug #3179882

Resources were freed following garbage collections on a worker thread.
This worker thread had no EGL context, which would cause the renderer
to incorrectly assume that the memory was liberated.

Change-Id: Ifdb51f94ddf42641e8654522787bfac532976c7c
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
01d065795794fa56be660d6346e4830eb7e90a41 11-Nov-2010 Romain Guy <romainguy@google.com> Reduce number of GL calls when drawing with shaders.

Change-Id: I27aca9f6d381d5c7e363d90a93225d185f2ff4e3
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
e190aa69756aecfaffabdd4c6d32cb6b3220d842 11-Nov-2010 Romain Guy <romainguy@google.com> Add new runtime debug flags.

Change-Id: I07955de166a89b5053c6c13f250bb3e2936ca86e
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
c15008e72ec00ca20a271c3006dac649fd07533b 10-Nov-2010 Romain Guy <romainguy@google.com> Move all debug flags in a single place.

This change also adds a new memory usage flag. When turned on, the
following is printed after every frame:

D/OpenGLRenderer( 3723): Current memory usage / total memory usage (bytes):
D/OpenGLRenderer( 3723): TextureCache 3766680 / 20971520
D/OpenGLRenderer( 3723): LayerCache 3538944 / 8388608
D/OpenGLRenderer( 3723): GradientCache 135168 / 524288
D/OpenGLRenderer( 3723): PathCache 41180 / 4194304
D/OpenGLRenderer( 3723): TextDropShadowCache 0 / 2097152
D/OpenGLRenderer( 3723): FontRenderer 0 262144 / 262144
D/OpenGLRenderer( 3723): FontRenderer 1 262144 / 262144
D/OpenGLRenderer( 3723): FontRenderer 2 262144 / 262144
D/OpenGLRenderer( 3723): Other:
D/OpenGLRenderer( 3723): FboCache 2 / 12
D/OpenGLRenderer( 3723): PatchCache 31 / 512
D/OpenGLRenderer( 3723): Total memory usage:
D/OpenGLRenderer( 3723): 8268404 bytes, 7.89 MB

This should help tracking possibe memory issues.

Change-Id: I83f483ca1d2dbef904829bce368e33fe5503e8d6
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
0d200833fdc53f9796698f97c18cefc4a1b82df2 05-Nov-2010 Chet Haase <chet@google.com> Fix GL rendering of translucent surfaces

GL renderer was not initializing scissor correctly for translucent
surfaces, resulting in invisible window backgrounds in some cases
like fading popup windows

Change-Id: I87a964986e1ba2c4f59708c8892c5fa71903e6fc
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
0fe478ea04720a57ef3919dbc23711bc7eba517f 08-Nov-2010 Romain Guy <romainguy@google.com> Support nested display lists.

Change-Id: I3815a2832fc0f722c668ba8f51c5f177edb77c94
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
7f78b0c3ae6222b39f6240524390de9764f21764 04-Nov-2010 Romain Guy <romainguy@google.com> Lines would not set the scissor before drawing.

Lines were not drawing in Calendar because they were getting clipped
by the previous clip rectangle. This change simply updates the scissor
as needed. This change also reduces the number of state changes in GL.

Change-Id: I41ab13dca3a33cfa6d1a44371c48852ab418b04e
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
e45362cad94c014d8b3765cb102db0f8c0d92500 04-Nov-2010 Romain Guy <romainguy@google.com> Fix rendering bug with saveLayerAlpha/drawColor.

drawColor() was not calling quickReject because it fills the clip region
and thus always passes the test. However, quickReject also checks whether
the current layer is invisible. drawColor() now performs the same check
and avoid drawing inside an invisible layer.

Change-Id: I63d0e9a8a9c0fba774f0f5c3870d58e6ed96fbd1
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
5ec9924d24495822b589f1a17996655d66273b30 04-Nov-2010 Romain Guy <romainguy@google.com> Fix rendering issue with layers.

Change-Id: I1d511ab2707000762a942d32c300a9944ab38603
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
5b3b35296e8b2c8d3f07d32bb645d5414db41a1d 28-Oct-2010 Romain Guy <romainguy@google.com> Optimize FBO drawing with regions.
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
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
746b7401ceb86b5f2805f8c0d3b39ac739152015 27-Oct-2010 Romain Guy <romainguy@google.com> Remove unnecessary GL calls.

This change batches calls to glScissor() and removes extra GL
queries and glActiveTexture() calls.

Change-Id: I1cd079d314f87cd9c088f95c8d4909c2f860f6aa
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
3e3ba155fc0ef7a7f40f06762240d9ba22f62b19 26-Oct-2010 Romain Guy <romainguy@google.com> Don't change texture unit when not needed.

Change-Id: Ifa84426d234f2122402cb13533cb5964f1ce95ec
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
8164c2d338781c3a3c4a443941070dca5d88f2a7 26-Oct-2010 Romain Guy <romainguy@google.com> Don't change textures wrap modes on every draw.

Change-Id: If6d3f313778cc7f3e803a063338539c8b3e165e3
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
ae88e5e8e9cb6c9539314c4360c5b20f8ec1fefc 23-Oct-2010 Romain Guy <romainguy@android.com> Fix rendering issue with layers.

A change was made earlier in the renderer to not snap the current clip rect
on every clip operation. The clip rect must not be snapped to pixel boundaries
before being used for pixel precision operations. Some operations were doing
this correctly, others were not. For instance, a layer was always created by
rounding to the correct pixels, but composing a layer was done with a non
rounded clip, thus resulting in slightly odd behaviors.

Change-Id: I31c2cf0a343450470bcd449c3f13fe37648b9c7c
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
58ae6db4ff8a9d0910e1183ee8be9a038a2712a6 22-Oct-2010 Romain Guy <romainguy@android.com> Don't use two different variables to refer to mSnapshot.

Change-Id: Ie4a0616d2fe0b040ac14b734a9ddf77bf1f35b0c
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
ae517591d96be39f5f18a1716c856ade13a8bcc7 22-Oct-2010 Romain Guy <romainguy@android.com> Don't perform glCopyTextImage with coordinates outside the buffer.

Bug #3122179

Change-Id: I91ed397e9e553a8eeb69d82d0c5b1e49a3cdd5ff
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
5c13d89c1332fcc499379b9064b891187b75ca32 08-Oct-2010 Chet Haase <chet@google.com> Optimizing display lists by referencing pointers to resources instead of copying them

Change-Id: I81ad3551d74aa1e5bb64d69e33d2eb29a6c1eb6a
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
50c0f093d942a59d4e01b2c76d26c0e9d6ed796c 19-Oct-2010 Romain Guy <romainguy@google.com> Solve rendering issue with embedded WebViews.
Bug #3094017

The blending mode was not appropriately set after WebView released the
context.

Change-Id: Ib36d48e82c12f6d131dd5a0bcde9106925b8da63
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
03750a067e818ca7fbd0f590e2ff6a8fded21e6c 18-Oct-2010 Romain Guy <romainguy@google.com> Use VBOs to render most geometries.

Change-Id: I4360dc4fe5693ab425450c107282b2c22db4dca7
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
054dc1840941665e32036f9523df51720ad069c8 16-Oct-2010 Romain Guy <romainguy@google.com> Don't draw entirely transparent 9patch meshes.

Change-Id: If3e62e18b8e0dbde8a22f8ede2889b86500a4dc2
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
9d13fe25f4f10b25776b1dc5c858f9ebb0b28b30 16-Oct-2010 Romain Guy <romainguy@google.com> Fix text rendering artifact.

Change-Id: I50f47207846e4208d363dde4e8f5f1a0f23d2d75
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
e5ebcb0107a939395e03592fd44c746cd09e311d 15-Oct-2010 Romain Guy <romainguy@google.com> Fix clipping issue in StackView.

Change-Id: I7ec28f25c3993a2bd7ef6399ba1923839d239905
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
d2a1ff003b9b1212c9ab4b5f679b5b097720a359 14-Oct-2010 Romain Guy <romainguy@google.com> Fix text rendering issue.

The local clip rect could be off by one pixel when a 3D transform
was applied to a text primitive. This would cause small rendering
glitches in Launcher in particular.

Change-Id: I1254f6a5838c26810cbe969b096679d40b8dd504
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
93d2361c6d294c390cb5c4a13bd1b88dcd465fd7 14-Oct-2010 Romain Guy <romainguy@google.com> Fix layer rendering glitch.

Change-Id: If2f987fe5526fc88743ca3e91edde4f8232ff658
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
909cbaf8f92d69f507bbdba9e5aa960d1e6c7a1f 14-Oct-2010 Romain Guy <romainguy@google.com> Don't draw TextView's alpha layers when not needed.

Change-Id: Iedf42cbc62d727f18500c78fcccf2d081a761fec
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
99bcdc52dcb365ed7d8cfa13540fb33fbcbbac9d 14-Oct-2010 Romain Guy <romainguy@google.com> Return identity matrix when rendering in an FBO.

Change-Id: I57438e745b30c8cfe16c269f3cafcd719049d705
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
41030da16856c8869e1e51d4a0405432fa96614e 13-Oct-2010 Romain Guy <romainguy@google.com> Add a getNativeMatrix() API.

This API can be used by WebView to apply the appropriate transform
on its rendering.

Change-Id: I79aa39a29805f462fb08226370328815e74bdc52
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
eb07af687319a0f52c219c3c0c1b73162fce9d04 13-Oct-2010 Romain Guy <romainguy@google.com> Optimize layer clears.

Don't clear the entire texture when we use textures that are bigger
than the layer itself. This will save time during the glClear() calls.

Change-Id: I06f3259ba62affb3708ba69ea41418832c7e1a65
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
e91080581f467d55913a8c5ab53dedc2dab2e5b6 13-Oct-2010 Romain Guy <romainguy@google.com> Tweak layers caching for better performance in Launcher.

Change-Id: Ia6e67699d98f69c8a93385b3ecbdd814c7b16921
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
4bb942083a0d4db746adf95349108dd8ef842e32 13-Oct-2010 Romain Guy <romainguy@google.com> Optimize 9patch rendering.

This change detects empty quads in 9patches and removes them from
the mesh to avoid unnecessary blending.

Change-Id: I4500566fb4cb6845d64dcb59b522c0be7a0ec704
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
c00972bb162779e52d1b0d8f662a9f6033bf9182 12-Oct-2010 Romain Guy <romainguy@google.com> Don't recreate a new texture every time we draw a layer.

Change-Id: I3c28aff5acffc7c6f1ac74805869725426c62d28
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
dbc26d2ba13f80a7590c57de2d80530d96832969 12-Oct-2010 Romain Guy <romainguy@google.com> Don't draw fully transparent views/primitives.

Change-Id: Icd7d8ef1f57b51a24faf32f7004125e6300d4fdc
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
707b2f78ccaa09965d7e030fda3a883ce9b75ea8 12-Oct-2010 Romain Guy <romainguy@google.com> Optimize GLSL shaders.

Change-Id: I9a5e01bced63d8da0c61330a543a2b805388a59d
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
2728f961614a385df1f056fc24803a9f65c90fab 09-Oct-2010 Romain Guy <romainguy@google.com> Don't update 9patches on every frame.

Change-Id: I7ffb2365f83e0453e7d0a0cdcb3fc9308b305238
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
8550c4c7b5952b7a4e1e0ede95c9492d03099a13 09-Oct-2010 Romain Guy <romainguy@google.com> Better cache for layers, reduce memory usage and increase framerate.

Change-Id: I5ff864a361db4791bd5ff6be716f7ce692ef572d
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
6b7bd24659fb175fe1f0e97c86c18969918b496a 07-Oct-2010 Romain Guy <romainguy@google.com> Don't clear the framebuffer when not needed.
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
eb99356a0548684a501766e6a524529ab93304c8 06-Oct-2010 Romain Guy <romainguy@google.com> Optimize saveLayer() when the clip flag is set.

This speeds up applications, especially Launcher.
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
bdb801ca993bcccbf2a4c2401d1720c3fa523777 05-Oct-2010 Romain Guy <romainguy@google.com> Remove logs to reduce logcat spam.

Change-Id: I5fc295b05b5d82bb86827b88e94dd51e8bcdc7d3
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
e8cb9c14309b0f01c0159efdf9a7198f44a62642 04-Oct-2010 Romain Guy <romainguy@google.com> Apply bilinear filtering on text only when necessary.

Change-Id: Ic903f4b5d30e9c92528c6291941896efe4729ee3
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
0bb5667b4ef91fefd0500fae0186789d15d54e0e 01-Oct-2010 Romain Guy <romainguy@android.com> Fix INVALID_OPERATION error with layers rendering.

This change is a workaround for a driver bug that causes an INVALID_OPERATION
to be thrown on every glCopyTexSubImage() call. This change also adds a new
test for gradients local matrices.

Change-Id: I41b7437481026702d0a3a9677f099b4557c0a84e
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
4aa90573bbf86db0d33a3a790c5dbd0d93b95cfe 27-Sep-2010 Romain Guy <romainguy@google.com> Adding display lists to the GL renderer (checkpoint.)

Change-Id: Iaa49757600a53b39369dbb23f8c3feab282518e6
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
e2d345ea67e2960b37bfdc0fc8626d1bfa747404 25-Sep-2010 Romain Guy <romainguy@google.com> Add debug mode to measure performance.

Change-Id: I9d4c84034dc200b99c8266165942a7cdbcb5c0c5
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
38c85b907a478af96d71b9a5df5a2066b8475311 23-Sep-2010 Romain Guy <romainguy@android.com> Correctly initialize/refresh layers.

Change-Id: Id8cdcf587b13098460f7d4aa1bd17708784d89bb
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
e20ecbd12d26467754a7770d44bcce2ea92335ef 23-Sep-2010 Romain Guy <romainguy@android.com> Draw text decorations with lines instead of rectangles.

Change-Id: Icd25c85c3a24da96a3d2f76f9477da6f87e0303c
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
29d8997bd43b7c4ad37fc3d6f91eaafa74913c88 23-Sep-2010 Romain Guy <romainguy@android.com> Fix OpenGL errors in various places.

Change-Id: I3a4e115d8fb13b6c443e65460d92987b16f2524c
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
b5ab4173e0927e4668a45298c9900cd8007584e1 18-Sep-2010 Romain Guy <romainguy@google.com> Fix positioning of 1 pixel wide lines (esp. non AA lines.)

Change-Id: Ic155cac72f351edae35dffdfbb236954f57ba7de
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
c95c8d6bf8fda5c4e8ebd0033b789be7868e6e07 18-Sep-2010 Romain Guy <romainguy@google.com> Add support for non AA lines.

Change-Id: Id5200e94815404d62760437d0d2dbb0a9276c700
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
759ea80dca64ad652110a129e0d8bf93fea79f61 17-Sep-2010 Romain Guy <romainguy@google.com> Add support for drawLines(), with anti-aliasing

Change-Id: I16c0593c5671490909dec13a85df601e1428a1a6
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
bf434114cbf55b216fdc76fc8d65a75e84c9dab5 16-Sep-2010 Romain Guy <romainguy@google.com> Snap layer bounds to pixel boundaries.

Change-Id: I272ceebf469a119f01ea9d73cdd68519afdffa99
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
b025b9c8b4efefadb01937db61a1f8ee7d2452bf 16-Sep-2010 Romain Guy <romainguy@google.com> Better error handling in the OpenGL renderer.

Add a glGetError() check on every frame
Don't attempt to create textures larger than the maximum size allowed

Change-Id: Iee4afae16089406dbe8bf10fc93b674f1271a0ca
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
6820ac8b14b4558f5d8b833dde80895306a3e137 16-Sep-2010 Romain Guy <romainguy@google.com> Fix 9patch rendering.

Change-Id: Ic4c18ff483cca95fbabcb10843f7714efe488adb
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
87a76578f76f4a6bceb187da6b7a01899ca0d85a 14-Sep-2010 Romain Guy <romainguy@google.com> Docs updates.

Change-Id: Iff395e1c6d81a484a2c4ad6e88357c0134971b78
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
1c740bce8a762f02b5283045a0e2de7c8fb41277 14-Sep-2010 Romain Guy <romainguy@google.com> Document the implementation of saveLayer().

The implementation is simple but tricky. Leave explanations to my
future self so that I don't invent a time machine to come back to
now and slap my self.

This change also simplifies the way the GL blending function is
chosen when compositing a layer. It reuses existing OpenGLRenderer
APIs and is easier to understand.

Change-Id: I1b9cf8c5d51e09836d85b8cf157a1c284aa65c59
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
81ab046a1127bd2ad397e6d1c6f8021b202a97ff 14-Sep-2010 Romain Guy <romainguy@google.com> Forgot the return value...

Change-Id: Iccf369a613c1cf83f3e948460c567291b084fad2
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
8411f336c786379c5a03106e9ed3bc8622b579a5 14-Sep-2010 Romain Guy <romainguy@google.com> Fix rendering issue with layers intersecting the clip rect.

Change-Id: Icbe35194fa219ef13ce639d33631235f8d7df3d7
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
2bffd268f135df8308c9e67af110525a5c463424 13-Sep-2010 Romain Guy <romainguy@google.com> Fix text rendering issue with text scaling.

Change-Id: I1f3ae40025697e8f8ca0616ee6550fe215cadcc8
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
8694230ff25fa0a60e480d424843e56b718f0516 12-Sep-2010 Romain Guy <romainguy@google.com> Optimize calls to glCopyTexImage2D().

Change-Id: I34ee87bd4472864f440916e03a2894fae24bbe4a
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
f607bdc167f66b3e7003acaa4736ae46d78c1492 11-Sep-2010 Romain Guy <romainguy@google.com> Correct implementation of saveLayer().

Change-Id: I5375126636913e0a84f2d6bbd0ebe40d2e4f2763
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
a5aed0d58962a24c44728ffc46dc9e1ba2f9fda5 09-Sep-2010 Romain Guy <romainguy@google.com> Add support for advanced blend modes with the framebuffer.

This adds the ability to blend with the framebuffer using Darken,
Lighten, Add, Multiply, Overlay and Screen.

Change-Id: Iae01a53797d4ad39c373cba6ff2a42293129da1a
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
d90f23e24a4d1768d5a7ed0e7072e67af6330a45 09-Sep-2010 Romain Guy <romainguy@google.com> Do not convert 8888 bitmaps to 565 when doing a copy.

Bug #2988077
This change keeps the 8888 format for new bitmaps and also keeps,
when possible, the opaque flag.

Change-Id: Ia61f2e89936916b329212a4c59a7d815c329f84e
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
8aef54fa17f2a3753d9a8f2027629bc480088f69 02-Sep-2010 Romain Guy <romainguy@android.com> Add support for Canvas flags on save.

This is required for the rewrite of layers support.

Change-Id: I5c0867dcf5aeb0392c8d0fbab05febb0eaff70d9
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
da8532c6f48b4c10b5e2ccb9e08690341efa1616 31-Aug-2010 Romain Guy <romainguy@google.com> Add hooks for hardware accelerated WebView.

Change-Id: I907cdec8a67594f87749ac46bda85f04af5a2003
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
b45c0c9774bd19a9dbe77d149abae4e124b08bf6 27-Aug-2010 Romain Guy <romainguy@google.com> Apply gamma correction to font rendering.

Change-Id: I1b05f40e356221b2a5eb9400e67d77ecd98ed6c4
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
fb8b763f762ae21923c58d64caa729b012f40e05 24-Aug-2010 Romain Guy <romainguy@google.com> Use only one GL context per process, share chaches.

Change-Id: Ieabaa25338d2f4b8d4fd90e7401ad6e7452eae11
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
a80d32f7b69aa37026ab99e4ade1ad86dae76a81 21-Aug-2010 Romain Guy <romainguy@google.com> Add support for textScaleX.

This will not look great because we render fonts using bitmaps, not
paths.

Change-Id: I01b87b81bfbdbfa28460a5d5309d38e2a65e77c4
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
8b55f377655d13a445b08a0a8ed09b6e95c752b0 19-Aug-2010 Romain Guy <romainguy@google.com> Fix drawing issues with layers.

Prior to this change layers would clip their content incorrectly. They would
also not apply alpha properly.

Change-Id: Id7b3aaa7dbdc51de68fe050e64458f68e40503fd
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
1f8c9602eeff0a35f8af70bd3fdcd770f0127775 18-Aug-2010 Romain Guy <romainguy@google.com> Fix the build.

Change-Id: I8bd418ba21e3e3f68b793030398d1a5e933dfb19
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
2542d199745cdf3ec910b8e3e4cff5851ed24e9b 18-Aug-2010 Romain Guy <romainguy@google.com> Layers were using an extra Snapshot causing extra clipping.

Bug #2919310

Change-Id: I72ccd44bba7a3f3db72f581aa96198b6226e4478
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
8fb954263dd2f918ad339045cc6d82e346515599 18-Aug-2010 Romain Guy <romainguy@google.com> Fix save()/restore() issues in the OpenGL renderer.

The save stack now behaves exactly like in Skia.

Change-Id: If7e642f41f2c8f693f6e8c26cba81507d466562e
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
1d83e1981c8b89da93dff37a4f8b2b1ad8480b44 17-Aug-2010 Romain Guy <romainguy@google.com> Correctly set the viewport in layers.

Bug #2919295

Change-Id: I16ce79ab0d5747cb01c6c1abe531da3dfd93fb54
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
0a41749953f35d33f61b3119e3161a82bb5fa59e 17-Aug-2010 Romain Guy <romainguy@google.com> Cleanup, better code reuse.

Change-Id: Ib86a7309ae579cce3b7cf464782c34e70a74c616
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
1e45aae5de003657e5d18f74d34998f5de5db5b7 14-Aug-2010 Romain Guy <romainguy@google.com> Add drop shadows.

Change-Id: Ic6a72409d4785968d1fbdff229f17ee5c00b240b
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
959c91f7f7b4f921d341264f5b4ef54e702a0df0 12-Aug-2010 Romain Guy <romainguy@google.com> Bunch of fixes.

Fixes memory leak, fixes multiple context support, fix 3d transforms.

Change-Id: I7462cfbc57857dbd4de4e76b9d4cba58a1bce77b
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
a674ab74e359ac73b4c4dd6b1a3a771836ac7e40 11-Aug-2010 Romain Guy <romainguy@google.com> Add support for text underline and strikethru.

Change-Id: I3a0e6643d7cafbdd06d9a908c8cf9347dcaba146
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
61c8c9c5b2006d18e9310b6521c65b36ffe75ce4 10-Aug-2010 Romain Guy <romainguy@google.com> Fix tons of bugs and add new text rendering support.

Change-Id: I326c66b10784006f6df2f12d38e120cef94cd0d7
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
9cccc2b9bdd4850a3f9679569aaec3ab98477a5d 08-Aug-2010 Romain Guy <romainguy@android.com> Enforce maximum texture size.

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
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
22158e139a3d6c6a9787ca0de224e9368f643284 06-Aug-2010 Romain Guy <romainguy@google.com> Automatically cleanup textures that don't fit in the cache.

Change-Id: I4f29ed96ea11118b391fb957e1e4d1b8fcef1537
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
7fbcc0492fca03857e3c45064f4aa040af817d55 05-Aug-2010 Romain Guy <romainguy@google.com> Add support for paths.

Rendering is implementing by rasterizing the paths into A8 textures.
This cna be extremely inefficient if the path changes often.

Change-Id: I609343f304ae38e0d319359403ee73b9b5b3c93a
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
db1938e0e6ef816e228c815adccebd5cb05f2aa8 03-Aug-2010 Romain Guy <romainguy@google.com> Add support for ColorFilters.

Color filters are fully supported and can be used with shaders.

Change-Id: Id90ccf1c81cb462f2431f366f3f8f710d7971e04
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
06f96e2652e4855b6520ad9dd70583677605b79a 31-Jul-2010 Romain Guy <romainguy@google.com> Refactor Skia shaders handling.

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
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
b82da65cb1601be504241f36778395cd6cb9f87b 30-Jul-2010 Romain Guy <romainguy@google.com> Fix improper clipping after a save()

Change-Id: I13426a67f20d77e2710bd500d82884098f4be97c
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
ae5575b3421c8fbe590ab046d7d5f2b36ecfd821 30-Jul-2010 Romain Guy <romainguy@google.com> Fix gradients rendering and destructor crashes.

This changes binds all textures to GL_TEXTURE0, this will have
to be changed when combining shader capabilities.

Change-Id: I02df4f5ba41e9b01ffa52fd7c26b41477c7ed18f
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
889f8d1403761d5668115ced6cbb3f767cfe966d 29-Jul-2010 Romain Guy <romainguy@google.com> Moved all the rendering code to the new shader generator.

The generator supports features that are not yet implement in the
renderer: color matrix, lighting, porterduff color blending and
composite shaders.

This change also adds support for repeated/mirrored non-power of 2
bitmap shaders.

Change-Id: I903a11a070c0eb9cc8850a60ef305751e5b47234
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
ac670c0433d19397d4e36ced2110475b6f54fe26 28-Jul-2010 Romain Guy <romainguy@google.com> Generate shaders to cover all possible cases.

With this change, all the vertex and fragment shaders used by the GL
renderer are now generated based on a program description supplied
by the caller. This allows the renderer to generate a large number
of shaders without having to write all the possible combinations by
hand. The generated shaders are stored in a program cache.

Change-Id: If54d286e77ae021c724d42090da476df12a18ebb
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
65ef909776c03417d8b597738da54ca211e37e4f 26-Jul-2010 Alex Sakhartchouk <alexst@google.com> When font cache still has empty space,
precache some commonly used characters to reduce studder.

Change-Id: I1f66f57482c4a025672dfd1d8ecaf2b9736cd9a0
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
e8e62a4a032a80409114a37908b5f18ab0080848 24-Jul-2010 Romain Guy <romainguy@google.com> Add text alignment support to drawText().

This change also integrates better support for RTL text.

Change-Id: I6da8f5cf5dc28ca7cf1b22e27b0d853c919e8481
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
51769a68a5cb34e9564740c6a854fcb93018789d 23-Jul-2010 Romain Guy <romainguy@android.com> Cleanup, added properties for the FontRenderer.

Change-Id: I909c74815d3ac394438ad8071d17fef5401dbeed
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
09147fbdc8206a0cac78bfe9083e7e15b3c5689c 22-Jul-2010 Romain Guy <romainguy@google.com> Add support for text culling.

Change-Id: Ibf0adacdc5c64d40a8000b21d7cb0797d63efe29
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
694b519ac647fe998fd396fe0784cc8e179aadc4 22-Jul-2010 Romain Guy <romainguy@google.com> Add text rendering.

Change-Id: Ibe5a9fa844d531b31b55e43de403a98d49f659b9
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
a1db574036c9bc2d397b69f8200594027e1fff16 20-Jul-2010 Romain Guy <romainguy@google.com> Add preliminary support for text rendering.

Change-Id: I547eb631dbda24d13960d54b4144fb8908fd8a49
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
c0ac193b9415680f0a69e20a3f5f22d16f8053be 20-Jul-2010 Romain Guy <romainguy@google.com> Add support for linear gradients.

Change-Id: Id15329da065045b3f06fdaed615f33cd57608496
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
f9764a4f532561f6e2e985ff3b25112f1132ce44 17-Jul-2010 Romain Guy <romainguy@android.com> Add program for linear gradient.

This change adds a new DrawLinearGradientProgram class to enable the drawing
of linear gradients. Two new vertex and fragment shaders are introduced,
based on DrawTextureProgram's shaders.

Change-Id: I885afc076bb6cef8cd3962ae21a086fa6a03bf96
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
7fac2e18339f765320d759e8d4c090f92431959e 17-Jul-2010 Romain Guy <romainguy@android.com> Add plumbing to support gradients in OpenGL renderer.

The LinearGradient class keeps a copy of the various parameters that
define the gradient. The copies are native arrays to avoid copying
Java arrays on every draw call. The gradient code path is implemented
until OpenGLRenderer::drawRect() (see TODO.) The actual gradient
implementation will be added in a latter change.

Change-Id: I9300d250ef5e2e9c2e097c3116ee71dfc9d752d8
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
1e79386ba34f0db38c1b35b22cdf122632534354 17-Jul-2010 Romain Guy <romainguy@android.com> Optimize textures binding.

The renderer is still changing textures' wrap modes every time, this will require
a latter optimization.

Change-Id: I3eb92cb8c886c4a692b7f0ca759911f9371d4d2c
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
079ba2c85b15e882629b8d188f5fbdb42f7f8eea 16-Jul-2010 Romain Guy <romainguy@android.com> Improve clip support (add intersect, union and replace.)

This change also modifies the way the clip is stored. The clip is now
always stored in screen-space coordinates.

Change-Id: I96375784d82dfe975bc6477a159e6866e7052487
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
d27977d1a91d5a6b3cc9fa7664ac7e835e7bd895 15-Jul-2010 Romain Guy <romainguy@google.com> Add support for BitmapShader.

This change also fixes an issue with the clip and layers.

Change-Id: I5fd9832098d8cf7ae8eb781ff9bffe7defaea279
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
3d58c03de0d8877b36cdb78b0ca8b5cac7f600e2 15-Jul-2010 Romain Guy <romainguy@google.com> Do not apply transforms when using drawColor().

This fixes an issue in the way the clip transformations were applied.

Change-Id: I91e7b5d15baf244d1280e48938282bb33609081d
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
a979474f15b454c8e2963f239a3770e200bb227c 13-Jul-2010 Romain Guy <romainguy@google.com> Cleanup: remove unnecessary parameters.

Change-Id: I5956ef1db6be28a01369387aaeeb65a94656c48c
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
92429d9266edf63cf632c132c5936f0e31850988 13-Jul-2010 Romain Guy <romainguy@google.com> Fix premultiplied alpha.

Change-Id: I08da422c5350503e1f4f27b9890f15a813d0c6c7
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
6926c72e25b8dec3dd4b84af0819fa1937ae7296 13-Jul-2010 Romain Guy <romainguy@google.com> Correctly support pre-multiplied alpha, optimizations, more stuff.

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
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
260e102162322958cf17dbd895cd6bd30dc87e32 12-Jul-2010 Romain Guy <romainguy@google.com> Optimize shader binding changes.

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
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
0b9db91c3dc8007b47c8fd4fb9dd85be97201a88 10-Jul-2010 Romain Guy <romainguy@google.com> Remove math from the vertex shader.

Change-Id: I02847a60a8734bf8b3d29ec12e76297795095e38
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
16202fc9745e9b11db089ebc8f40119d13732016 10-Jul-2010 Romain Guy <romainguy@google.com> Fix alpha blending and improve fragment shaders performance.

Change-Id: Ib74f6941d25ca6f6a41708e541174eaa7e8d9bc2
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
fb5e23c327cd5f8f93d1eaa7c10f34d6fd3efb6c 09-Jul-2010 Romain Guy <romainguy@google.com> Refactoring to move vertex computing to the Patch class.

This change is mostly cleanup to keep less code in OpenGLRenderer.

Change-Id: I954375143b2943829457ab470423729b60b844f5
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
82ba814ca0dea659be2cc6523bc0137679d961ce 09-Jul-2010 Romain Guy <romainguy@google.com> Optimize blending state changes.

Change-Id: I7c22a8aecccb8b5abfcf7243f049a4ef3cf3979a
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
f7f93556c8fcc640ab5adef79d021a80a72a645a 09-Jul-2010 Romain Guy <romainguy@google.com> Draw n-patches using OpenGL.

Currently only tested with title bars and buttons.

Change-Id: I8263a9281898dc0e943b1b8412827fe55639b9d6
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
f18fd99b5c182329cd8936a9611f0103d8ece44a 08-Jul-2010 Romain Guy <romainguy@google.com> Create FBOs in LayerCache.

This moves a bit of code away from OpenGLRenderer and matches
what happens with the TextureCache.

Change-Id: I3c67f54f83d7240770daa015861c0e75a1dd8c42
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
deba785f122a47915756ffd991f5540d952cf937 08-Jul-2010 Romain Guy <romainguy@google.com> Add support to draw 9patches in OpenGL.

This change only adds the necessary API and stubs. The implementation
will be added in another change.

Change-Id: Ie50b8aff5868e78796cee331df15bdbf990d2ea1
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
6c81893c626499e58c8eeb20d6c35ec4e1ce808b 08-Jul-2010 Romain Guy <romainguy@google.com> Simpler way to deal with the FBO multi-cache.

This change removes the need for the SortedList and instead just
add a generated id to each FBO stored in the cache. This is an
artificial way to store several FBOs with the same dimensions.

Change-Id: I9638364e9bdc0f2391261937a0c86096f20505bf
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
5f0c6a483900f3989f4d2a8f913cf5b6a9777d03 07-Jul-2010 Romain Guy <romainguy@google.com> Optimize FBO cache.

This change introduces a new generational cache called GenerationMultiCache
that can store several values with the same key. This can be used to use
multiple layers of the same size at the same time, without recreating them
over and over again.

Change-Id: I425466a20908b862c5f464a0f9e582ec18cbd7ac
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
dda570201ac851dd85af3861f7e575721d3345da 06-Jul-2010 Romain Guy <romainguy@android.com> Add a layer (FBO) cache.

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
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
7d139ba2c331f11e9b485753cc727a0ff202f2a4 02-Jul-2010 Romain Guy <romainguy@android.com> Remove extra leftover logs and use uint32_t instead of unsigned int.

Change-Id: I944f82fe3255de38dc04048cc8bd861f578f01a7
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
121e2242565d5f09ad83a2d33ecd2225838802c5 02-Jul-2010 Romain Guy <romainguy@google.com> Track the size in memory of the texture cache.

The texture cache was previously checking the number of stored textures. This was
not very useful as this could easily lead to an abuse of memory. The new cache
instead tracks the total size occupied in RAM by the cached textures. When a new
texture is generated, older textures are kicked out as needed.

Change-Id: Ib27142f4a018d5bf84774c1fb6f45a67a85f20bc
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
f86ef57f8bcd8ba43ce222ec6a8b4f67d3600640 01-Jul-2010 Romain Guy <romainguy@google.com> Don't use full screen FBOs, this dramatically increase performance.

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
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
8ba548f81d1ab5f1750cbf86098c4a14e0b8bead 01-Jul-2010 Romain Guy <romainguy@google.com> Add implementation for drawBitmap(Bitmap, Rect, Rect, Paint)

Change-Id: I10904d2325a5431d15801aebcec1048715678e8c
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
c1396e93b6a5286a5183c00c781b62e940a12c1f 01-Jul-2010 Romain Guy <romainguy@google.com> Add implementation for drawBitmap().

Change-Id: Iada9325f3c5642b61c2e0c4cd80bcfbc92cb491e
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
ce0537b80087a6225273040a987414b1dd081aa0 30-Jun-2010 Romain Guy <romainguy@google.com> Add hooks for drawBitmap().

Change-Id: I58e962c3a8b2bc75c2605fe369ad3002579d86e0

Add texture cache.

Change-Id: I1c0e5581d228869e114438258a1014e33e024ad7
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
d55a86120dd1e8ebcc6906c9ffd463f7460348da 29-Jun-2010 Romain Guy <romainguy@google.com> Add support for saveLayer().

saveLayer() is affected by the paint's alpha and xfermode.

Change-Id: I28693a9337052643adccdb4889a8f228d4e17903
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
026c5e16704e817cac7d9c382914c947e34f87e0 29-Jun-2010 Romain Guy <romainguy@google.com> Implement support for PorterDuff's blending modes.

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
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
5cbbce535744b89df5ecea95de21ee3733298260 28-Jun-2010 Romain Guy <romainguy@android.com> Reduced the complexity of layers composition.

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
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
bd6b79b40247aea7bfe13d0831c6c0472df6c636 26-Jun-2010 Romain Guy <romainguy@android.com> Add implementations for saveLayerAlpha() and textured rects.

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
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
7ae7ac48aa2b53453c9805075171ecd5bcafd7de 25-Jun-2010 Romain Guy <romainguy@android.com> Convert tabs to spaces.

Change-Id: I5d3ae48af79b19b6d293deff0521e4bb57d5114b
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
c7d53494f1fbd9f9d74af89053ff9fdb1ccbac6c 25-Jun-2010 Romain Guy <romainguy@android.com> Implement quickReject() and drawRect().

The OpenGL ES 2.0 renderer can now draw colored rectangles. At least there's
something on screen now.

Change-Id: I80a13ccc1dd56784edf74f2670a364f30700234a
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
9d5316e3f56d138504565ff311145ac01621dff4 25-Jun-2010 Romain Guy <romainguy@google.com> Add colored rectangles implementation in OpenGLRenderer.

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
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
f6a11b8a9e25ff9861bbba19251bea84d8a5daf2 24-Jun-2010 Romain Guy <romainguy@google.com> Add support for transformations.

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
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
bb9524b6bdddc7ac77d8628daa8b366b8a7be4a4 23-Jun-2010 Romain Guy <romainguy@google.com> Add implementations for clipRect(), save() and restore().

The current implementation of clipRect() does not apply local transformations
before setting the new clip.

Change-Id: I5997871bb638dfcd1a8ef96354846af52427e445
/frameworks/base/libs/hwui/OpenGLRenderer.cpp
85bf02fc16784d935fb9eebfa9cb20fe46ff7951 22-Jun-2010 Romain Guy <romainguy@google.com> Fix the simulator build.

Change-Id: Ie404f7c2c308f0657f273af19a56e8c039b61898
/frameworks/base/libs/hwui/OpenGLRenderer.cpp