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
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
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
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
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
The OpenGL ES 2.0 renderer can now draw colored rectangles. At least there's
something on screen now.
Change-Id: I80a13ccc1dd56784edf74f2670a364f30700234a
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
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
The current implementation of clipRect() does not apply local transformations
before setting the new clip.
Change-Id: I5997871bb638dfcd1a8ef96354846af52427e445
This is the initial checkin to setup the library and turn on OEGL ES 2.0
in ViewRoot, not a functional renderer.
Change-Id: I6655c54166e2967da2e21e7d6dcfba78bf113b44