OpenGLRenderer.h revision 4aa90573bbf86db0d33a3a790c5dbd0d93b95cfe
1e4d011201cea40d46cb2b2eef401db8fddc5c9c6Romain Guy/* 2e4d011201cea40d46cb2b2eef401db8fddc5c9c6Romain Guy * Copyright (C) 2010 The Android Open Source Project 3e4d011201cea40d46cb2b2eef401db8fddc5c9c6Romain Guy * 4e4d011201cea40d46cb2b2eef401db8fddc5c9c6Romain Guy * Licensed under the Apache License, Version 2.0 (the "License"); 5e4d011201cea40d46cb2b2eef401db8fddc5c9c6Romain Guy * you may not use this file except in compliance with the License. 6e4d011201cea40d46cb2b2eef401db8fddc5c9c6Romain Guy * You may obtain a copy of the License at 7e4d011201cea40d46cb2b2eef401db8fddc5c9c6Romain Guy * 8e4d011201cea40d46cb2b2eef401db8fddc5c9c6Romain Guy * http://www.apache.org/licenses/LICENSE-2.0 9e4d011201cea40d46cb2b2eef401db8fddc5c9c6Romain Guy * 10e4d011201cea40d46cb2b2eef401db8fddc5c9c6Romain Guy * Unless required by applicable law or agreed to in writing, software 11e4d011201cea40d46cb2b2eef401db8fddc5c9c6Romain Guy * distributed under the License is distributed on an "AS IS" BASIS, 12e4d011201cea40d46cb2b2eef401db8fddc5c9c6Romain Guy * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13e4d011201cea40d46cb2b2eef401db8fddc5c9c6Romain Guy * See the License for the specific language governing permissions and 14e4d011201cea40d46cb2b2eef401db8fddc5c9c6Romain Guy * limitations under the License. 15e4d011201cea40d46cb2b2eef401db8fddc5c9c6Romain Guy */ 16e4d011201cea40d46cb2b2eef401db8fddc5c9c6Romain Guy 179d5316e3f56d138504565ff311145ac01621dff4Romain Guy#ifndef ANDROID_UI_OPENGL_RENDERER_H 189d5316e3f56d138504565ff311145ac01621dff4Romain Guy#define ANDROID_UI_OPENGL_RENDERER_H 199d5316e3f56d138504565ff311145ac01621dff4Romain Guy 209d5316e3f56d138504565ff311145ac01621dff4Romain Guy#include <GLES2/gl2.h> 219d5316e3f56d138504565ff311145ac01621dff4Romain Guy#include <GLES2/gl2ext.h> 2285bf02fc16784d935fb9eebfa9cb20fe46ff7951Romain Guy 23ce0537b80087a6225273040a987414b1dd081aa0Romain Guy#include <SkBitmap.h> 24f6a11b8a9e25ff9861bbba19251bea84d8a5daf2Romain Guy#include <SkMatrix.h> 25ce0537b80087a6225273040a987414b1dd081aa0Romain Guy#include <SkPaint.h> 26079ba2c85b15e882629b8d188f5fbdb42f7f8eeaRomain Guy#include <SkRegion.h> 27d27977d1a91d5a6b3cc9fa7664ac7e835e7bd895Romain Guy#include <SkShader.h> 2885bf02fc16784d935fb9eebfa9cb20fe46ff7951Romain Guy#include <SkXfermode.h> 29e4d011201cea40d46cb2b2eef401db8fddc5c9c6Romain Guy 30bb9524b6bdddc7ac77d8628daa8b366b8a7be4a4Romain Guy#include <utils/RefBase.h> 318694230ff25fa0a60e480d424843e56b718f0516Romain Guy#include <utils/Vector.h> 32bb9524b6bdddc7ac77d8628daa8b366b8a7be4a4Romain Guy 3351769a68a5cb34e9564740c6a854fcb93018789dRomain Guy#include "Extensions.h" 34f6a11b8a9e25ff9861bbba19251bea84d8a5daf2Romain Guy#include "Matrix.h" 355cbbce535744b89df5ecea95de21ee3733298260Romain Guy#include "Program.h" 36bb9524b6bdddc7ac77d8628daa8b366b8a7be4a4Romain Guy#include "Rect.h" 375cbbce535744b89df5ecea95de21ee3733298260Romain Guy#include "Snapshot.h" 38f7f93556c8fcc640ab5adef79d021a80a72a645aRomain Guy#include "Vertex.h" 3906f96e2652e4855b6520ad9dd70583677605b79aRomain Guy#include "SkiaShader.h" 40db1938e0e6ef816e228c815adccebd5cb05f2aa8Romain Guy#include "SkiaColorFilter.h" 41fb8b763f762ae21923c58d64caa729b012f40e05Romain Guy#include "Caches.h" 42bb9524b6bdddc7ac77d8628daa8b366b8a7be4a4Romain Guy 43e4d011201cea40d46cb2b2eef401db8fddc5c9c6Romain Guynamespace android { 449d5316e3f56d138504565ff311145ac01621dff4Romain Guynamespace uirenderer { 45e4d011201cea40d46cb2b2eef401db8fddc5c9c6Romain Guy 46f6a11b8a9e25ff9861bbba19251bea84d8a5daf2Romain Guy/////////////////////////////////////////////////////////////////////////////// 47b025b9c8b4efefadb01937db61a1f8ee7d2452bfRomain Guy// Defines 48b025b9c8b4efefadb01937db61a1f8ee7d2452bfRomain Guy/////////////////////////////////////////////////////////////////////////////// 49b025b9c8b4efefadb01937db61a1f8ee7d2452bfRomain Guy 50b025b9c8b4efefadb01937db61a1f8ee7d2452bfRomain Guy// Debug 51b025b9c8b4efefadb01937db61a1f8ee7d2452bfRomain Guy#define DEBUG_OPENGL 1 52b025b9c8b4efefadb01937db61a1f8ee7d2452bfRomain Guy 53b025b9c8b4efefadb01937db61a1f8ee7d2452bfRomain Guy/////////////////////////////////////////////////////////////////////////////// 54f6a11b8a9e25ff9861bbba19251bea84d8a5daf2Romain Guy// Renderer 55f6a11b8a9e25ff9861bbba19251bea84d8a5daf2Romain Guy/////////////////////////////////////////////////////////////////////////////// 56f6a11b8a9e25ff9861bbba19251bea84d8a5daf2Romain Guy 575cbbce535744b89df5ecea95de21ee3733298260Romain Guy/** 585cbbce535744b89df5ecea95de21ee3733298260Romain Guy * OpenGL renderer used to draw accelerated 2D graphics. The API is a 595cbbce535744b89df5ecea95de21ee3733298260Romain Guy * simplified version of Skia's Canvas API. 605cbbce535744b89df5ecea95de21ee3733298260Romain Guy */ 6185bf02fc16784d935fb9eebfa9cb20fe46ff7951Romain Guyclass OpenGLRenderer { 62e4d011201cea40d46cb2b2eef401db8fddc5c9c6Romain Guypublic: 6385bf02fc16784d935fb9eebfa9cb20fe46ff7951Romain Guy OpenGLRenderer(); 64e2d345ea67e2960b37bfdc0fc8626d1bfa747404Romain Guy virtual ~OpenGLRenderer(); 65e4d011201cea40d46cb2b2eef401db8fddc5c9c6Romain Guy 66e4d011201cea40d46cb2b2eef401db8fddc5c9c6Romain Guy void setViewport(int width, int height); 67e2d345ea67e2960b37bfdc0fc8626d1bfa747404Romain Guy 68e2d345ea67e2960b37bfdc0fc8626d1bfa747404Romain Guy virtual void prepare(); 69e2d345ea67e2960b37bfdc0fc8626d1bfa747404Romain Guy virtual void finish(); 70e2d345ea67e2960b37bfdc0fc8626d1bfa747404Romain Guy 714aa90573bbf86db0d33a3a790c5dbd0d93b95cfeRomain Guy virtual void acquireContext(); 724aa90573bbf86db0d33a3a790c5dbd0d93b95cfeRomain Guy virtual void releaseContext(); 7308ae317c21ec3086b5017672bba87420cc38a407Romain Guy 74bb9524b6bdddc7ac77d8628daa8b366b8a7be4a4Romain Guy int getSaveCount() const; 754aa90573bbf86db0d33a3a790c5dbd0d93b95cfeRomain Guy virtual int save(int flags); 764aa90573bbf86db0d33a3a790c5dbd0d93b95cfeRomain Guy virtual void restore(); 774aa90573bbf86db0d33a3a790c5dbd0d93b95cfeRomain Guy virtual void restoreToCount(int saveCount); 78bb9524b6bdddc7ac77d8628daa8b366b8a7be4a4Romain Guy 79e2d345ea67e2960b37bfdc0fc8626d1bfa747404Romain Guy virtual int saveLayer(float left, float top, float right, float bottom, 80e2d345ea67e2960b37bfdc0fc8626d1bfa747404Romain Guy const SkPaint* p, int flags); 81e2d345ea67e2960b37bfdc0fc8626d1bfa747404Romain Guy virtual int saveLayerAlpha(float left, float top, float right, float bottom, 82e2d345ea67e2960b37bfdc0fc8626d1bfa747404Romain Guy int alpha, int flags); 83bd6b79b40247aea7bfe13d0831c6c0472df6c636Romain Guy 844aa90573bbf86db0d33a3a790c5dbd0d93b95cfeRomain Guy virtual void translate(float dx, float dy); 854aa90573bbf86db0d33a3a790c5dbd0d93b95cfeRomain Guy virtual void rotate(float degrees); 864aa90573bbf86db0d33a3a790c5dbd0d93b95cfeRomain Guy virtual void scale(float sx, float sy); 87f6a11b8a9e25ff9861bbba19251bea84d8a5daf2Romain Guy 88f6a11b8a9e25ff9861bbba19251bea84d8a5daf2Romain Guy void getMatrix(SkMatrix* matrix); 894aa90573bbf86db0d33a3a790c5dbd0d93b95cfeRomain Guy virtual void setMatrix(SkMatrix* matrix); 904aa90573bbf86db0d33a3a790c5dbd0d93b95cfeRomain Guy virtual void concatMatrix(SkMatrix* matrix); 91f6a11b8a9e25ff9861bbba19251bea84d8a5daf2Romain Guy 929d5316e3f56d138504565ff311145ac01621dff4Romain Guy const Rect& getClipBounds(); 93c7d53494f1fbd9f9d74af89053ff9fdb1ccbac6cRomain Guy bool quickReject(float left, float top, float right, float bottom); 944aa90573bbf86db0d33a3a790c5dbd0d93b95cfeRomain Guy virtual bool clipRect(float left, float top, float right, float bottom, SkRegion::Op op); 95bb9524b6bdddc7ac77d8628daa8b366b8a7be4a4Romain Guy 96e2d345ea67e2960b37bfdc0fc8626d1bfa747404Romain Guy virtual void drawBitmap(SkBitmap* bitmap, float left, float top, const SkPaint* paint); 97e2d345ea67e2960b37bfdc0fc8626d1bfa747404Romain Guy virtual void drawBitmap(SkBitmap* bitmap, const SkMatrix* matrix, const SkPaint* paint); 98e2d345ea67e2960b37bfdc0fc8626d1bfa747404Romain Guy virtual void drawBitmap(SkBitmap* bitmap, float srcLeft, float srcTop, 99e2d345ea67e2960b37bfdc0fc8626d1bfa747404Romain Guy float srcRight, float srcBottom, float dstLeft, float dstTop, 100e2d345ea67e2960b37bfdc0fc8626d1bfa747404Romain Guy float dstRight, float dstBottom, const SkPaint* paint); 1014aa90573bbf86db0d33a3a790c5dbd0d93b95cfeRomain Guy virtual void drawPatch(SkBitmap* bitmap, const int32_t* xDivs, const int32_t* yDivs, 1024aa90573bbf86db0d33a3a790c5dbd0d93b95cfeRomain Guy uint32_t width, uint32_t height, float left, float top, float right, float bottom, 1034aa90573bbf86db0d33a3a790c5dbd0d93b95cfeRomain Guy const SkPaint* paint); 104e2d345ea67e2960b37bfdc0fc8626d1bfa747404Romain Guy virtual void drawColor(int color, SkXfermode::Mode mode); 105e2d345ea67e2960b37bfdc0fc8626d1bfa747404Romain Guy virtual void drawRect(float left, float top, float right, float bottom, const SkPaint* paint); 106e2d345ea67e2960b37bfdc0fc8626d1bfa747404Romain Guy virtual void drawPath(SkPath* path, SkPaint* paint); 107e2d345ea67e2960b37bfdc0fc8626d1bfa747404Romain Guy virtual void drawLines(float* points, int count, const SkPaint* paint); 108e2d345ea67e2960b37bfdc0fc8626d1bfa747404Romain Guy virtual void drawText(const char* text, int bytesCount, int count, float x, float y, 109e2d345ea67e2960b37bfdc0fc8626d1bfa747404Romain Guy SkPaint* paint); 11085bf02fc16784d935fb9eebfa9cb20fe46ff7951Romain Guy 1114aa90573bbf86db0d33a3a790c5dbd0d93b95cfeRomain Guy virtual void resetShader(); 1124aa90573bbf86db0d33a3a790c5dbd0d93b95cfeRomain Guy virtual void setupShader(SkiaShader* shader); 113d27977d1a91d5a6b3cc9fa7664ac7e835e7bd895Romain Guy 1144aa90573bbf86db0d33a3a790c5dbd0d93b95cfeRomain Guy virtual void resetColorFilter(); 1154aa90573bbf86db0d33a3a790c5dbd0d93b95cfeRomain Guy virtual void setupColorFilter(SkiaColorFilter* filter); 116db1938e0e6ef816e228c815adccebd5cb05f2aa8Romain Guy 1174aa90573bbf86db0d33a3a790c5dbd0d93b95cfeRomain Guy virtual void resetShadow(); 1184aa90573bbf86db0d33a3a790c5dbd0d93b95cfeRomain Guy virtual void setupShadow(float radius, float dx, float dy, int color); 1191e45aae5de003657e5d18f74d34998f5de5db5b7Romain Guy 120e2d345ea67e2960b37bfdc0fc8626d1bfa747404Romain Guyprotected: 121e2d345ea67e2960b37bfdc0fc8626d1bfa747404Romain Guy /** 122e2d345ea67e2960b37bfdc0fc8626d1bfa747404Romain Guy * Compose the layer defined in the current snapshot with the layer 123e2d345ea67e2960b37bfdc0fc8626d1bfa747404Romain Guy * defined by the previous snapshot. 124e2d345ea67e2960b37bfdc0fc8626d1bfa747404Romain Guy * 125e2d345ea67e2960b37bfdc0fc8626d1bfa747404Romain Guy * The current snapshot *must* be a layer (flag kFlagIsLayer set.) 126e2d345ea67e2960b37bfdc0fc8626d1bfa747404Romain Guy * 127e2d345ea67e2960b37bfdc0fc8626d1bfa747404Romain Guy * @param curent The current snapshot containing the layer to compose 128e2d345ea67e2960b37bfdc0fc8626d1bfa747404Romain Guy * @param previous The previous snapshot to compose the current layer with 129e2d345ea67e2960b37bfdc0fc8626d1bfa747404Romain Guy */ 130e2d345ea67e2960b37bfdc0fc8626d1bfa747404Romain Guy virtual void composeLayer(sp<Snapshot> current, sp<Snapshot> previous); 131694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy 13208ae317c21ec3086b5017672bba87420cc38a407Romain Guyprivate: 1335cbbce535744b89df5ecea95de21ee3733298260Romain Guy /** 1345cbbce535744b89df5ecea95de21ee3733298260Romain Guy * Saves the current state of the renderer as a new snapshot. 1355cbbce535744b89df5ecea95de21ee3733298260Romain Guy * The new snapshot is saved in mSnapshot and the previous snapshot 1365cbbce535744b89df5ecea95de21ee3733298260Romain Guy * is linked from mSnapshot->previous. 1375cbbce535744b89df5ecea95de21ee3733298260Romain Guy * 1388aef54fa17f2a3753d9a8f2027629bc480088f69Romain Guy * @param flags The save flags; see SkCanvas for more information 1398aef54fa17f2a3753d9a8f2027629bc480088f69Romain Guy * 1405cbbce535744b89df5ecea95de21ee3733298260Romain Guy * @return The new save count. This value can be passed to #restoreToCount() 1415cbbce535744b89df5ecea95de21ee3733298260Romain Guy */ 1428aef54fa17f2a3753d9a8f2027629bc480088f69Romain Guy int saveSnapshot(int flags); 1435cbbce535744b89df5ecea95de21ee3733298260Romain Guy 1445cbbce535744b89df5ecea95de21ee3733298260Romain Guy /** 1455cbbce535744b89df5ecea95de21ee3733298260Romain Guy * Restores the current snapshot; mSnapshot becomes mSnapshot->previous. 1465cbbce535744b89df5ecea95de21ee3733298260Romain Guy * 1472542d199745cdf3ec910b8e3e4cff5851ed24e9bRomain Guy * @return True if the clip was modified. 1485cbbce535744b89df5ecea95de21ee3733298260Romain Guy */ 149bb9524b6bdddc7ac77d8628daa8b366b8a7be4a4Romain Guy bool restoreSnapshot(); 150bb9524b6bdddc7ac77d8628daa8b366b8a7be4a4Romain Guy 1515cbbce535744b89df5ecea95de21ee3733298260Romain Guy /** 1525cbbce535744b89df5ecea95de21ee3733298260Romain Guy * Sets the clipping rectangle using glScissor. The clip is defined by 1535cbbce535744b89df5ecea95de21ee3733298260Romain Guy * the current snapshot's clipRect member. 1545cbbce535744b89df5ecea95de21ee3733298260Romain Guy */ 155bb9524b6bdddc7ac77d8628daa8b366b8a7be4a4Romain Guy void setScissorFromClip(); 156bb9524b6bdddc7ac77d8628daa8b366b8a7be4a4Romain Guy 1575cbbce535744b89df5ecea95de21ee3733298260Romain Guy /** 158d55a86120dd1e8ebcc6906c9ffd463f7460348daRomain Guy * Creates a new layer stored in the specified snapshot. 159d55a86120dd1e8ebcc6906c9ffd463f7460348daRomain Guy * 160d55a86120dd1e8ebcc6906c9ffd463f7460348daRomain Guy * @param snapshot The snapshot associated with the new layer 161d55a86120dd1e8ebcc6906c9ffd463f7460348daRomain Guy * @param left The left coordinate of the layer 162d55a86120dd1e8ebcc6906c9ffd463f7460348daRomain Guy * @param top The top coordinate of the layer 163d55a86120dd1e8ebcc6906c9ffd463f7460348daRomain Guy * @param right The right coordinate of the layer 164d55a86120dd1e8ebcc6906c9ffd463f7460348daRomain Guy * @param bottom The bottom coordinate of the layer 165d55a86120dd1e8ebcc6906c9ffd463f7460348daRomain Guy * @param alpha The translucency of the layer 166d55a86120dd1e8ebcc6906c9ffd463f7460348daRomain Guy * @param mode The blending mode of the layer 167d55a86120dd1e8ebcc6906c9ffd463f7460348daRomain Guy * @param flags The layer save flags 168d55a86120dd1e8ebcc6906c9ffd463f7460348daRomain Guy * 169d55a86120dd1e8ebcc6906c9ffd463f7460348daRomain Guy * @return True if the layer was successfully created, false otherwise 170d55a86120dd1e8ebcc6906c9ffd463f7460348daRomain Guy */ 171d55a86120dd1e8ebcc6906c9ffd463f7460348daRomain Guy bool createLayer(sp<Snapshot> snapshot, float left, float top, float right, float bottom, 172d55a86120dd1e8ebcc6906c9ffd463f7460348daRomain Guy int alpha, SkXfermode::Mode mode, int flags); 173d55a86120dd1e8ebcc6906c9ffd463f7460348daRomain Guy 174d55a86120dd1e8ebcc6906c9ffd463f7460348daRomain Guy /** 1758694230ff25fa0a60e480d424843e56b718f0516Romain Guy * Clears all the regions corresponding to the current list of layers. 1768694230ff25fa0a60e480d424843e56b718f0516Romain Guy * This method MUST be invoked before any drawing operation. 1778694230ff25fa0a60e480d424843e56b718f0516Romain Guy */ 1788694230ff25fa0a60e480d424843e56b718f0516Romain Guy void clearLayerRegions(); 1798694230ff25fa0a60e480d424843e56b718f0516Romain Guy 1808694230ff25fa0a60e480d424843e56b718f0516Romain Guy /** 1815cbbce535744b89df5ecea95de21ee3733298260Romain Guy * Draws a colored rectangle with the specified color. The specified coordinates 1825cbbce535744b89df5ecea95de21ee3733298260Romain Guy * are transformed by the current snapshot's transform matrix. 1835cbbce535744b89df5ecea95de21ee3733298260Romain Guy * 1845cbbce535744b89df5ecea95de21ee3733298260Romain Guy * @param left The left coordinate of the rectangle 1855cbbce535744b89df5ecea95de21ee3733298260Romain Guy * @param top The top coordinate of the rectangle 1865cbbce535744b89df5ecea95de21ee3733298260Romain Guy * @param right The right coordinate of the rectangle 1875cbbce535744b89df5ecea95de21ee3733298260Romain Guy * @param bottom The bottom coordinate of the rectangle 1885cbbce535744b89df5ecea95de21ee3733298260Romain Guy * @param color The rectangle's ARGB color, defined as a packed 32 bits word 189026c5e16704e817cac7d9c382914c947e34f87e0Romain Guy * @param mode The Skia xfermode to use 1903d58c03de0d8877b36cdb78b0ca8b5cac7f600e2Romain Guy * @param ignoreTransform True if the current transform should be ignored 191f607bdc167f66b3e7003acaa4736ae46d78c1492Romain Guy * @paran ignoreBlending True if the blending is set by the caller 1925cbbce535744b89df5ecea95de21ee3733298260Romain Guy */ 193026c5e16704e817cac7d9c382914c947e34f87e0Romain Guy void drawColorRect(float left, float top, float right, float bottom, 1941c740bce8a762f02b5283045a0e2de7c8fb41277Romain Guy int color, SkXfermode::Mode mode, bool ignoreTransform = false); 1955cbbce535744b89df5ecea95de21ee3733298260Romain Guy 1965cbbce535744b89df5ecea95de21ee3733298260Romain Guy /** 197c95c8d6bf8fda5c4e8ebd0033b789be7868e6e07Romain Guy * Setups shaders to draw a colored rect. 198c95c8d6bf8fda5c4e8ebd0033b789be7868e6e07Romain Guy */ 199c95c8d6bf8fda5c4e8ebd0033b789be7868e6e07Romain Guy void setupColorRect(float left, float top, float right, float bottom, 200c95c8d6bf8fda5c4e8ebd0033b789be7868e6e07Romain Guy float r, float g, float b, float a, SkXfermode::Mode mode, bool ignoreTransform); 201c95c8d6bf8fda5c4e8ebd0033b789be7868e6e07Romain Guy 202c95c8d6bf8fda5c4e8ebd0033b789be7868e6e07Romain Guy /** 2035cbbce535744b89df5ecea95de21ee3733298260Romain Guy * Draws a textured rectangle with the specified texture. The specified coordinates 2045cbbce535744b89df5ecea95de21ee3733298260Romain Guy * are transformed by the current snapshot's transform matrix. 2055cbbce535744b89df5ecea95de21ee3733298260Romain Guy * 2065cbbce535744b89df5ecea95de21ee3733298260Romain Guy * @param left The left coordinate of the rectangle 2075cbbce535744b89df5ecea95de21ee3733298260Romain Guy * @param top The top coordinate of the rectangle 2085cbbce535744b89df5ecea95de21ee3733298260Romain Guy * @param right The right coordinate of the rectangle 2095cbbce535744b89df5ecea95de21ee3733298260Romain Guy * @param bottom The bottom coordinate of the rectangle 2105cbbce535744b89df5ecea95de21ee3733298260Romain Guy * @param texture The texture name to map onto the rectangle 2115cbbce535744b89df5ecea95de21ee3733298260Romain Guy * @param alpha An additional translucency parameter, between 0.0f and 1.0f 212d55a86120dd1e8ebcc6906c9ffd463f7460348daRomain Guy * @param mode The blending mode 213c1396e93b6a5286a5183c00c781b62e940a12c1fRomain Guy * @param blend True if the texture contains an alpha channel 2145cbbce535744b89df5ecea95de21ee3733298260Romain Guy */ 215bd6b79b40247aea7bfe13d0831c6c0472df6c636Romain Guy void drawTextureRect(float left, float top, float right, float bottom, GLuint texture, 216a979474f15b454c8e2963f239a3770e200bb227cRomain Guy float alpha, SkXfermode::Mode mode, bool blend); 217c7d53494f1fbd9f9d74af89053ff9fdb1ccbac6cRomain Guy 218026c5e16704e817cac7d9c382914c947e34f87e0Romain Guy /** 21982ba814ca0dea659be2cc6523bc0137679d961ceRomain Guy * Draws a textured rectangle with the specified texture. The specified coordinates 22082ba814ca0dea659be2cc6523bc0137679d961ceRomain Guy * are transformed by the current snapshot's transform matrix. 22182ba814ca0dea659be2cc6523bc0137679d961ceRomain Guy * 22282ba814ca0dea659be2cc6523bc0137679d961ceRomain Guy * @param left The left coordinate of the rectangle 22382ba814ca0dea659be2cc6523bc0137679d961ceRomain Guy * @param top The top coordinate of the rectangle 22482ba814ca0dea659be2cc6523bc0137679d961ceRomain Guy * @param right The right coordinate of the rectangle 22582ba814ca0dea659be2cc6523bc0137679d961ceRomain Guy * @param bottom The bottom coordinate of the rectangle 22682ba814ca0dea659be2cc6523bc0137679d961ceRomain Guy * @param texture The texture to use 22782ba814ca0dea659be2cc6523bc0137679d961ceRomain Guy * @param paint The paint containing the alpha, blending mode, etc. 22882ba814ca0dea659be2cc6523bc0137679d961ceRomain Guy */ 229a979474f15b454c8e2963f239a3770e200bb227cRomain Guy void drawTextureRect(float left, float top, float right, float bottom, 230a979474f15b454c8e2963f239a3770e200bb227cRomain Guy const Texture* texture, const SkPaint* paint); 23182ba814ca0dea659be2cc6523bc0137679d961ceRomain Guy 23282ba814ca0dea659be2cc6523bc0137679d961ceRomain Guy /** 23382ba814ca0dea659be2cc6523bc0137679d961ceRomain Guy * Draws a textured mesh with the specified texture. If the indices are omitted, the 23482ba814ca0dea659be2cc6523bc0137679d961ceRomain Guy * mesh is drawn as a simple quad. 23582ba814ca0dea659be2cc6523bc0137679d961ceRomain Guy * 23682ba814ca0dea659be2cc6523bc0137679d961ceRomain Guy * @param left The left coordinate of the rectangle 23782ba814ca0dea659be2cc6523bc0137679d961ceRomain Guy * @param top The top coordinate of the rectangle 23882ba814ca0dea659be2cc6523bc0137679d961ceRomain Guy * @param right The right coordinate of the rectangle 23982ba814ca0dea659be2cc6523bc0137679d961ceRomain Guy * @param bottom The bottom coordinate of the rectangle 24082ba814ca0dea659be2cc6523bc0137679d961ceRomain Guy * @param texture The texture name to map onto the rectangle 24182ba814ca0dea659be2cc6523bc0137679d961ceRomain Guy * @param alpha An additional translucency parameter, between 0.0f and 1.0f 24282ba814ca0dea659be2cc6523bc0137679d961ceRomain Guy * @param mode The blending mode 24382ba814ca0dea659be2cc6523bc0137679d961ceRomain Guy * @param blend True if the texture contains an alpha channel 24482ba814ca0dea659be2cc6523bc0137679d961ceRomain Guy * @param vertices The vertices that define the mesh 24582ba814ca0dea659be2cc6523bc0137679d961ceRomain Guy * @param texCoords The texture coordinates of each vertex 24682ba814ca0dea659be2cc6523bc0137679d961ceRomain Guy * @param indices The indices of the vertices, can be NULL 24782ba814ca0dea659be2cc6523bc0137679d961ceRomain Guy * @param elementsCount The number of elements in the mesh, required by indices 248f607bdc167f66b3e7003acaa4736ae46d78c1492Romain Guy * @param swapSrcDst Whether or not the src and dst blending operations should be swapped 249f607bdc167f66b3e7003acaa4736ae46d78c1492Romain Guy * @param ignoreTransform True if the current transform should be ignored 250f7f93556c8fcc640ab5adef79d021a80a72a645aRomain Guy */ 251f7f93556c8fcc640ab5adef79d021a80a72a645aRomain Guy void drawTextureMesh(float left, float top, float right, float bottom, GLuint texture, 252a979474f15b454c8e2963f239a3770e200bb227cRomain Guy float alpha, SkXfermode::Mode mode, bool blend, 2536820ac8b14b4558f5d8b833dde80895306a3e137Romain Guy GLvoid* vertices, GLvoid* texCoords, GLenum drawMode, GLsizei elementsCount, 254f607bdc167f66b3e7003acaa4736ae46d78c1492Romain Guy bool swapSrcDst = false, bool ignoreTransform = false); 255f7f93556c8fcc640ab5adef79d021a80a72a645aRomain Guy 256f7f93556c8fcc640ab5adef79d021a80a72a645aRomain Guy /** 2570a41749953f35d33f61b3119e3161a82bb5fa59eRomain Guy * Prepares the renderer to draw the specified shadow. 2581e45aae5de003657e5d18f74d34998f5de5db5b7Romain Guy * 2591e45aae5de003657e5d18f74d34998f5de5db5b7Romain Guy * @param texture The shadow texture 2601e45aae5de003657e5d18f74d34998f5de5db5b7Romain Guy * @param x The x coordinate of the shadow 2611e45aae5de003657e5d18f74d34998f5de5db5b7Romain Guy * @param y The y coordinate of the shadow 2621e45aae5de003657e5d18f74d34998f5de5db5b7Romain Guy * @param mode The blending mode 2632542d199745cdf3ec910b8e3e4cff5851ed24e9bRomain Guy * @param alpha The alpha value 2641e45aae5de003657e5d18f74d34998f5de5db5b7Romain Guy */ 2652542d199745cdf3ec910b8e3e4cff5851ed24e9bRomain Guy void setupShadow(const ShadowTexture* texture, float x, float y, SkXfermode::Mode mode, 2662542d199745cdf3ec910b8e3e4cff5851ed24e9bRomain Guy float alpha); 2671e45aae5de003657e5d18f74d34998f5de5db5b7Romain Guy 2681e45aae5de003657e5d18f74d34998f5de5db5b7Romain Guy /** 2690a41749953f35d33f61b3119e3161a82bb5fa59eRomain Guy * Prepares the renderer to draw the specified Alpha8 texture as a rectangle. 2701e45aae5de003657e5d18f74d34998f5de5db5b7Romain Guy * 2711e45aae5de003657e5d18f74d34998f5de5db5b7Romain Guy * @param texture The texture to render with 2721e45aae5de003657e5d18f74d34998f5de5db5b7Romain Guy * @param textureUnit The texture unit to use, may be modified 2731e45aae5de003657e5d18f74d34998f5de5db5b7Romain Guy * @param x The x coordinate of the rectangle to draw 2741e45aae5de003657e5d18f74d34998f5de5db5b7Romain Guy * @param y The y coordinate of the rectangle to draw 2751e45aae5de003657e5d18f74d34998f5de5db5b7Romain Guy * @param r The red component of the color 2761e45aae5de003657e5d18f74d34998f5de5db5b7Romain Guy * @param g The green component of the color 2771e45aae5de003657e5d18f74d34998f5de5db5b7Romain Guy * @param b The blue component of the color 2781e45aae5de003657e5d18f74d34998f5de5db5b7Romain Guy * @param a The alpha component of the color 2791e45aae5de003657e5d18f74d34998f5de5db5b7Romain Guy * @param mode The blending mode 2800a41749953f35d33f61b3119e3161a82bb5fa59eRomain Guy * @param transforms True if the matrix passed to the shader should be multiplied 2810a41749953f35d33f61b3119e3161a82bb5fa59eRomain Guy * by the model-view matrix 2821e45aae5de003657e5d18f74d34998f5de5db5b7Romain Guy * @param applyFilters Whether or not to take color filters and 2831e45aae5de003657e5d18f74d34998f5de5db5b7Romain Guy * shaders into account 2841e45aae5de003657e5d18f74d34998f5de5db5b7Romain Guy */ 2850a41749953f35d33f61b3119e3161a82bb5fa59eRomain Guy void setupTextureAlpha8(const Texture* texture, GLuint& textureUnit, float x, float y, 2860a41749953f35d33f61b3119e3161a82bb5fa59eRomain Guy float r, float g, float b, float a, SkXfermode::Mode mode, bool transforms, 2870a41749953f35d33f61b3119e3161a82bb5fa59eRomain Guy bool applyFilters); 2880a41749953f35d33f61b3119e3161a82bb5fa59eRomain Guy 2890a41749953f35d33f61b3119e3161a82bb5fa59eRomain Guy /** 2900a41749953f35d33f61b3119e3161a82bb5fa59eRomain Guy * Prepares the renderer to draw the specified Alpha8 texture as a rectangle. 2910a41749953f35d33f61b3119e3161a82bb5fa59eRomain Guy * 2920a41749953f35d33f61b3119e3161a82bb5fa59eRomain Guy * @param texture The texture to render with 2930a41749953f35d33f61b3119e3161a82bb5fa59eRomain Guy * @param width The width of the texture 2940a41749953f35d33f61b3119e3161a82bb5fa59eRomain Guy * @param height The height of the texture 2950a41749953f35d33f61b3119e3161a82bb5fa59eRomain Guy * @param textureUnit The texture unit to use, may be modified 2960a41749953f35d33f61b3119e3161a82bb5fa59eRomain Guy * @param x The x coordinate of the rectangle to draw 2970a41749953f35d33f61b3119e3161a82bb5fa59eRomain Guy * @param y The y coordinate of the rectangle to draw 2980a41749953f35d33f61b3119e3161a82bb5fa59eRomain Guy * @param r The red component of the color 2990a41749953f35d33f61b3119e3161a82bb5fa59eRomain Guy * @param g The green component of the color 3000a41749953f35d33f61b3119e3161a82bb5fa59eRomain Guy * @param b The blue component of the color 3010a41749953f35d33f61b3119e3161a82bb5fa59eRomain Guy * @param a The alpha component of the color 3020a41749953f35d33f61b3119e3161a82bb5fa59eRomain Guy * @param mode The blending mode 3030a41749953f35d33f61b3119e3161a82bb5fa59eRomain Guy * @param transforms True if the matrix passed to the shader should be multiplied 3040a41749953f35d33f61b3119e3161a82bb5fa59eRomain Guy * by the model-view matrix 3050a41749953f35d33f61b3119e3161a82bb5fa59eRomain Guy * @param applyFilters Whether or not to take color filters and 3060a41749953f35d33f61b3119e3161a82bb5fa59eRomain Guy * shaders into account 3070a41749953f35d33f61b3119e3161a82bb5fa59eRomain Guy */ 3080a41749953f35d33f61b3119e3161a82bb5fa59eRomain Guy void setupTextureAlpha8(GLuint texture, uint32_t width, uint32_t height, 3090a41749953f35d33f61b3119e3161a82bb5fa59eRomain Guy GLuint& textureUnit, float x, float y, float r, float g, float b, float a, 3100a41749953f35d33f61b3119e3161a82bb5fa59eRomain Guy SkXfermode::Mode mode, bool transforms, bool applyFilters); 3110a41749953f35d33f61b3119e3161a82bb5fa59eRomain Guy 3120a41749953f35d33f61b3119e3161a82bb5fa59eRomain Guy /** 313759ea80dca64ad652110a129e0d8bf93fea79f61Romain Guy * Same as above setupTextureAlpha8() but specifies the mesh's vertices 314759ea80dca64ad652110a129e0d8bf93fea79f61Romain Guy * and texCoords pointers. 315759ea80dca64ad652110a129e0d8bf93fea79f61Romain Guy */ 316759ea80dca64ad652110a129e0d8bf93fea79f61Romain Guy void setupTextureAlpha8(GLuint texture, uint32_t width, uint32_t height, 317759ea80dca64ad652110a129e0d8bf93fea79f61Romain Guy GLuint& textureUnit, float x, float y, float r, float g, float b, float a, 318759ea80dca64ad652110a129e0d8bf93fea79f61Romain Guy SkXfermode::Mode mode, bool transforms, bool applyFilters, 319759ea80dca64ad652110a129e0d8bf93fea79f61Romain Guy GLvoid* vertices, GLvoid* texCoords); 320759ea80dca64ad652110a129e0d8bf93fea79f61Romain Guy 321759ea80dca64ad652110a129e0d8bf93fea79f61Romain Guy /** 3220a41749953f35d33f61b3119e3161a82bb5fa59eRomain Guy * Draws text underline and strike-through if needed. 3230a41749953f35d33f61b3119e3161a82bb5fa59eRomain Guy * 3240a41749953f35d33f61b3119e3161a82bb5fa59eRomain Guy * @param text The text to decor 3250a41749953f35d33f61b3119e3161a82bb5fa59eRomain Guy * @param bytesCount The number of bytes in the text 3260a41749953f35d33f61b3119e3161a82bb5fa59eRomain Guy * @param length The length in pixels of the text, can be <= 0.0f to force a measurement 3270a41749953f35d33f61b3119e3161a82bb5fa59eRomain Guy * @param x The x coordinate where the text will be drawn 3280a41749953f35d33f61b3119e3161a82bb5fa59eRomain Guy * @param y The y coordinate where the text will be drawn 3290a41749953f35d33f61b3119e3161a82bb5fa59eRomain Guy * @param paint The paint to draw the text with 3300a41749953f35d33f61b3119e3161a82bb5fa59eRomain Guy */ 3310a41749953f35d33f61b3119e3161a82bb5fa59eRomain Guy void drawTextDecorations(const char* text, int bytesCount, float length, 3320a41749953f35d33f61b3119e3161a82bb5fa59eRomain Guy float x, float y, SkPaint* paint); 3331e45aae5de003657e5d18f74d34998f5de5db5b7Romain Guy 3341e45aae5de003657e5d18f74d34998f5de5db5b7Romain Guy /** 335ac670c0433d19397d4e36ced2110475b6f54fe26Romain Guy * Resets the texture coordinates stored in mMeshVertices. Setting the values 336026c5e16704e817cac7d9c382914c947e34f87e0Romain Guy * back to default is achieved by calling: 337026c5e16704e817cac7d9c382914c947e34f87e0Romain Guy * 3388ba548f81d1ab5f1750cbf86098c4a14e0b8beadRomain Guy * resetDrawTextureTexCoords(0.0f, 0.0f, 1.0f, 1.0f); 339026c5e16704e817cac7d9c382914c947e34f87e0Romain Guy * 340026c5e16704e817cac7d9c382914c947e34f87e0Romain Guy * @param u1 The left coordinate of the texture 341026c5e16704e817cac7d9c382914c947e34f87e0Romain Guy * @param v1 The bottom coordinate of the texture 342026c5e16704e817cac7d9c382914c947e34f87e0Romain Guy * @param u2 The right coordinate of the texture 343026c5e16704e817cac7d9c382914c947e34f87e0Romain Guy * @param v2 The top coordinate of the texture 344026c5e16704e817cac7d9c382914c947e34f87e0Romain Guy */ 345026c5e16704e817cac7d9c382914c947e34f87e0Romain Guy void resetDrawTextureTexCoords(float u1, float v1, float u2, float v2); 346026c5e16704e817cac7d9c382914c947e34f87e0Romain Guy 3478ba548f81d1ab5f1750cbf86098c4a14e0b8beadRomain Guy /** 3488ba548f81d1ab5f1750cbf86098c4a14e0b8beadRomain Guy * Gets the alpha and xfermode out of a paint object. If the paint is null 3498ba548f81d1ab5f1750cbf86098c4a14e0b8beadRomain Guy * alpha will be 255 and the xfermode will be SRC_OVER. 3508ba548f81d1ab5f1750cbf86098c4a14e0b8beadRomain Guy * 3518ba548f81d1ab5f1750cbf86098c4a14e0b8beadRomain Guy * @param paint The paint to extract values from 3528ba548f81d1ab5f1750cbf86098c4a14e0b8beadRomain Guy * @param alpha Where to store the resulting alpha 3538ba548f81d1ab5f1750cbf86098c4a14e0b8beadRomain Guy * @param mode Where to store the resulting xfermode 3548ba548f81d1ab5f1750cbf86098c4a14e0b8beadRomain Guy */ 3558ba548f81d1ab5f1750cbf86098c4a14e0b8beadRomain Guy inline void getAlphaAndMode(const SkPaint* paint, int* alpha, SkXfermode::Mode* mode); 3568ba548f81d1ab5f1750cbf86098c4a14e0b8beadRomain Guy 357f7f93556c8fcc640ab5adef79d021a80a72a645aRomain Guy /** 358a1db574036c9bc2d397b69f8200594027e1fff16Romain Guy * Binds the specified texture with the specified wrap modes. 359a1db574036c9bc2d397b69f8200594027e1fff16Romain Guy */ 360889f8d1403761d5668115ced6cbb3f767cfe966dRomain Guy inline void bindTexture(GLuint texture, GLenum wrapS, GLenum wrapT, GLuint textureUnit = 0); 361a1db574036c9bc2d397b69f8200594027e1fff16Romain Guy 362a1db574036c9bc2d397b69f8200594027e1fff16Romain Guy /** 36382ba814ca0dea659be2cc6523bc0137679d961ceRomain Guy * Enable or disable blending as necessary. This function sets the appropriate 36482ba814ca0dea659be2cc6523bc0137679d961ceRomain Guy * blend function based on the specified xfermode. 36582ba814ca0dea659be2cc6523bc0137679d961ceRomain Guy */ 366f607bdc167f66b3e7003acaa4736ae46d78c1492Romain Guy inline void chooseBlending(bool blend, SkXfermode::Mode mode, ProgramDescription& description, 367f607bdc167f66b3e7003acaa4736ae46d78c1492Romain Guy bool swapSrcDst = false); 368a5aed0d58962a24c44728ffc46dc9e1ba2f9fda5Romain Guy 369f607bdc167f66b3e7003acaa4736ae46d78c1492Romain Guy /** 370f607bdc167f66b3e7003acaa4736ae46d78c1492Romain Guy * Safely retrieves the mode from the specified xfermode. If the specified 371f607bdc167f66b3e7003acaa4736ae46d78c1492Romain Guy * xfermode is null, the mode is assumed to be SkXfermode::kSrcOver_Mode. 372f607bdc167f66b3e7003acaa4736ae46d78c1492Romain Guy */ 373a5aed0d58962a24c44728ffc46dc9e1ba2f9fda5Romain Guy inline SkXfermode::Mode getXfermode(SkXfermode* mode); 37482ba814ca0dea659be2cc6523bc0137679d961ceRomain Guy 375260e102162322958cf17dbd895cd6bd30dc87e32Romain Guy /** 376d27977d1a91d5a6b3cc9fa7664ac7e835e7bd895Romain Guy * Use the specified program with the current GL context. If the program is already 377d27977d1a91d5a6b3cc9fa7664ac7e835e7bd895Romain Guy * in use, it will not be bound again. If it is not in use, the current program is 378d27977d1a91d5a6b3cc9fa7664ac7e835e7bd895Romain Guy * marked unused and the specified program becomes used and becomes the new 379d27977d1a91d5a6b3cc9fa7664ac7e835e7bd895Romain Guy * current program. 3806926c72e25b8dec3dd4b84af0819fa1937ae7296Romain Guy * 381d27977d1a91d5a6b3cc9fa7664ac7e835e7bd895Romain Guy * @param program The program to use 382d27977d1a91d5a6b3cc9fa7664ac7e835e7bd895Romain Guy * 383d27977d1a91d5a6b3cc9fa7664ac7e835e7bd895Romain Guy * @return true If the specified program was already in use, false otherwise. 384260e102162322958cf17dbd895cd6bd30dc87e32Romain Guy */ 385889f8d1403761d5668115ced6cbb3f767cfe966dRomain Guy inline bool useProgram(Program* program); 386260e102162322958cf17dbd895cd6bd30dc87e32Romain Guy 387bb9524b6bdddc7ac77d8628daa8b366b8a7be4a4Romain Guy // Dimensions of the drawing surface 388bb9524b6bdddc7ac77d8628daa8b366b8a7be4a4Romain Guy int mWidth, mHeight; 389bb9524b6bdddc7ac77d8628daa8b366b8a7be4a4Romain Guy 39085bf02fc16784d935fb9eebfa9cb20fe46ff7951Romain Guy // Matrix used for ortho projection in shaders 391260e102162322958cf17dbd895cd6bd30dc87e32Romain Guy mat4 mOrthoMatrix; 392bb9524b6bdddc7ac77d8628daa8b366b8a7be4a4Romain Guy 393c7d53494f1fbd9f9d74af89053ff9fdb1ccbac6cRomain Guy // Model-view matrix used to position/size objects 394c7d53494f1fbd9f9d74af89053ff9fdb1ccbac6cRomain Guy mat4 mModelView; 395c7d53494f1fbd9f9d74af89053ff9fdb1ccbac6cRomain Guy 396bb9524b6bdddc7ac77d8628daa8b366b8a7be4a4Romain Guy // Number of saved states 397bb9524b6bdddc7ac77d8628daa8b366b8a7be4a4Romain Guy int mSaveCount; 398f6a11b8a9e25ff9861bbba19251bea84d8a5daf2Romain Guy // Base state 399ae5575b3421c8fbe590ab046d7d5f2b36ecfd821Romain Guy sp<Snapshot> mFirstSnapshot; 400bb9524b6bdddc7ac77d8628daa8b366b8a7be4a4Romain Guy // Current state 401bb9524b6bdddc7ac77d8628daa8b366b8a7be4a4Romain Guy sp<Snapshot> mSnapshot; 4029d5316e3f56d138504565ff311145ac01621dff4Romain Guy 4039d5316e3f56d138504565ff311145ac01621dff4Romain Guy // Shaders 40406f96e2652e4855b6520ad9dd70583677605b79aRomain Guy SkiaShader* mShader; 405026c5e16704e817cac7d9c382914c947e34f87e0Romain Guy 406db1938e0e6ef816e228c815adccebd5cb05f2aa8Romain Guy // Color filters 407db1938e0e6ef816e228c815adccebd5cb05f2aa8Romain Guy SkiaColorFilter* mColorFilter; 408db1938e0e6ef816e228c815adccebd5cb05f2aa8Romain Guy 409026c5e16704e817cac7d9c382914c947e34f87e0Romain Guy // Used to draw textured quads 410ac670c0433d19397d4e36ced2110475b6f54fe26Romain Guy TextureVertex mMeshVertices[4]; 411ce0537b80087a6225273040a987414b1dd081aa0Romain Guy 41251769a68a5cb34e9564740c6a854fcb93018789dRomain Guy // GL extensions 41351769a68a5cb34e9564740c6a854fcb93018789dRomain Guy Extensions mExtensions; 41451769a68a5cb34e9564740c6a854fcb93018789dRomain Guy 4151e45aae5de003657e5d18f74d34998f5de5db5b7Romain Guy // Drop shadow 4161e45aae5de003657e5d18f74d34998f5de5db5b7Romain Guy bool mHasShadow; 4171e45aae5de003657e5d18f74d34998f5de5db5b7Romain Guy float mShadowRadius; 4181e45aae5de003657e5d18f74d34998f5de5db5b7Romain Guy float mShadowDx; 4191e45aae5de003657e5d18f74d34998f5de5db5b7Romain Guy float mShadowDy; 4201e45aae5de003657e5d18f74d34998f5de5db5b7Romain Guy int mShadowColor; 4211e45aae5de003657e5d18f74d34998f5de5db5b7Romain Guy 42282ba814ca0dea659be2cc6523bc0137679d961ceRomain Guy // Various caches 423fb8b763f762ae21923c58d64caa729b012f40e05Romain Guy Caches& mCaches; 4248694230ff25fa0a60e480d424843e56b718f0516Romain Guy 4258694230ff25fa0a60e480d424843e56b718f0516Romain Guy // List of rectangles to clear due to calls to saveLayer() 4268694230ff25fa0a60e480d424843e56b718f0516Romain Guy Vector<Rect*> mLayers; 4278694230ff25fa0a60e480d424843e56b718f0516Romain Guy 428759ea80dca64ad652110a129e0d8bf93fea79f61Romain Guy // Misc 429b025b9c8b4efefadb01937db61a1f8ee7d2452bfRomain Guy GLint mMaxTextureSize; 430b025b9c8b4efefadb01937db61a1f8ee7d2452bfRomain Guy 431bb9524b6bdddc7ac77d8628daa8b366b8a7be4a4Romain Guy}; // class OpenGLRenderer 432e4d011201cea40d46cb2b2eef401db8fddc5c9c6Romain Guy 4339d5316e3f56d138504565ff311145ac01621dff4Romain Guy}; // namespace uirenderer 434e4d011201cea40d46cb2b2eef401db8fddc5c9c6Romain Guy}; // namespace android 435e4d011201cea40d46cb2b2eef401db8fddc5c9c6Romain Guy 4369d5316e3f56d138504565ff311145ac01621dff4Romain Guy#endif // ANDROID_UI_OPENGL_RENDERER_H 437