summaryrefslogtreecommitdiffstats
path: root/libs/hwui/OpenGLRenderer.h
diff options
context:
space:
mode:
authorChet Haase <chet@google.com>2012-05-31 15:21:51 -0700
committerChet Haase <chet@google.com>2012-05-31 17:22:27 -0700
commit486590963e2207d68eebd6944fec70d50d41116a (patch)
tree7a176c6cda01c64980c5c27f9bf495b64d08c84f /libs/hwui/OpenGLRenderer.h
parent20c15a4271ea3a7fb2210430bfc53f611603cf76 (diff)
downloadframeworks_base-486590963e2207d68eebd6944fec70d50d41116a.zip
frameworks_base-486590963e2207d68eebd6944fec70d50d41116a.tar.gz
frameworks_base-486590963e2207d68eebd6944fec70d50d41116a.tar.bz2
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
Diffstat (limited to 'libs/hwui/OpenGLRenderer.h')
-rw-r--r--libs/hwui/OpenGLRenderer.h42
1 files changed, 21 insertions, 21 deletions
diff --git a/libs/hwui/OpenGLRenderer.h b/libs/hwui/OpenGLRenderer.h
index ad83b31..7703e80 100644
--- a/libs/hwui/OpenGLRenderer.h
+++ b/libs/hwui/OpenGLRenderer.h
@@ -111,34 +111,34 @@ public:
virtual status_t drawDisplayList(DisplayList* displayList, Rect& dirty, int32_t flags,
uint32_t level = 0);
virtual void outputDisplayList(DisplayList* displayList, uint32_t level = 0);
- virtual void drawLayer(Layer* layer, float x, float y, SkPaint* paint);
- virtual void drawBitmap(SkBitmap* bitmap, float left, float top, SkPaint* paint);
- virtual void drawBitmap(SkBitmap* bitmap, SkMatrix* matrix, SkPaint* paint);
- virtual void drawBitmap(SkBitmap* bitmap, float srcLeft, float srcTop,
+ virtual status_t drawLayer(Layer* layer, float x, float y, SkPaint* paint);
+ virtual status_t drawBitmap(SkBitmap* bitmap, float left, float top, SkPaint* paint);
+ virtual status_t drawBitmap(SkBitmap* bitmap, SkMatrix* matrix, SkPaint* paint);
+ virtual status_t drawBitmap(SkBitmap* bitmap, float srcLeft, float srcTop,
float srcRight, float srcBottom, float dstLeft, float dstTop,
float dstRight, float dstBottom, SkPaint* paint);
- virtual void drawBitmapData(SkBitmap* bitmap, float left, float top, SkPaint* paint);
- virtual void drawBitmapMesh(SkBitmap* bitmap, int meshWidth, int meshHeight,
+ virtual status_t drawBitmapData(SkBitmap* bitmap, float left, float top, SkPaint* paint);
+ virtual status_t drawBitmapMesh(SkBitmap* bitmap, int meshWidth, int meshHeight,
float* vertices, int* colors, SkPaint* paint);
- virtual void drawPatch(SkBitmap* bitmap, const int32_t* xDivs, const int32_t* yDivs,
+ virtual status_t drawPatch(SkBitmap* bitmap, const int32_t* xDivs, const int32_t* yDivs,
const uint32_t* colors, uint32_t width, uint32_t height, int8_t numColors,
float left, float top, float right, float bottom, SkPaint* paint);
- virtual void drawColor(int color, SkXfermode::Mode mode);
- virtual void drawRect(float left, float top, float right, float bottom, SkPaint* paint);
- virtual void drawRoundRect(float left, float top, float right, float bottom,
+ virtual status_t drawColor(int color, SkXfermode::Mode mode);
+ virtual status_t drawRect(float left, float top, float right, float bottom, SkPaint* paint);
+ virtual status_t drawRoundRect(float left, float top, float right, float bottom,
float rx, float ry, SkPaint* paint);
- virtual void drawCircle(float x, float y, float radius, SkPaint* paint);
- virtual void drawOval(float left, float top, float right, float bottom, SkPaint* paint);
- virtual void drawArc(float left, float top, float right, float bottom,
+ virtual status_t drawCircle(float x, float y, float radius, SkPaint* paint);
+ virtual status_t drawOval(float left, float top, float right, float bottom, SkPaint* paint);
+ virtual status_t drawArc(float left, float top, float right, float bottom,
float startAngle, float sweepAngle, bool useCenter, SkPaint* paint);
- virtual void drawPath(SkPath* path, SkPaint* paint);
- virtual void drawLines(float* points, int count, SkPaint* paint);
- virtual void drawPoints(float* points, int count, SkPaint* paint);
- virtual void drawText(const char* text, int bytesCount, int count, float x, float y,
+ virtual status_t drawPath(SkPath* path, SkPaint* paint);
+ virtual status_t drawLines(float* points, int count, SkPaint* paint);
+ virtual status_t drawPoints(float* points, int count, SkPaint* paint);
+ virtual status_t drawText(const char* text, int bytesCount, int count, float x, float y,
SkPaint* paint, float length = -1.0f);
- virtual void drawTextOnPath(const char* text, int bytesCount, int count, SkPath* path,
+ virtual status_t drawTextOnPath(const char* text, int bytesCount, int count, SkPath* path,
float hOffset, float vOffset, SkPaint* paint);
- virtual void drawPosText(const char* text, int bytesCount, int count,
+ virtual status_t drawPosText(const char* text, int bytesCount, int count,
const float* positions, SkPaint* paint);
virtual void resetShader();
@@ -336,7 +336,7 @@ private:
* @param texture The texture reprsenting the shape
* @param paint The paint to draw the shape with
*/
- void drawShape(float left, float top, const PathTexture* texture, SkPaint* paint);
+ status_t drawShape(float left, float top, const PathTexture* texture, SkPaint* paint);
/**
* Renders the rect defined by the specified bounds as a shape.
@@ -349,7 +349,7 @@ private:
* @param bottom The bottom coordinate of the rect to draw
* @param p The paint to draw the rect with
*/
- void drawRectAsShape(float left, float top, float right, float bottom, SkPaint* p);
+ status_t drawRectAsShape(float left, float top, float right, float bottom, SkPaint* p);
/**
* Draws the specified texture as an alpha bitmap. Alpha bitmaps obey