summaryrefslogtreecommitdiffstats
path: root/libs/hwui/OpenGLRenderer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/hwui/OpenGLRenderer.cpp')
-rwxr-xr-xlibs/hwui/OpenGLRenderer.cpp29
1 files changed, 12 insertions, 17 deletions
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp
index 075f2c5..86821e8 100755
--- a/libs/hwui/OpenGLRenderer.cpp
+++ b/libs/hwui/OpenGLRenderer.cpp
@@ -344,7 +344,7 @@ void OpenGLRenderer::resumeAfterLayer() {
dirtyClip();
}
-status_t OpenGLRenderer::callDrawGLFunction(Functor* functor, Rect& dirty) {
+status_t OpenGLRenderer::callDrawGLFunction(Functor* functor, Rect& /* dirty */) {
if (currentSnapshot()->isIgnored()) return DrawGlInfo::kStatusDone;
Rect clip(*currentClipRect());
@@ -397,6 +397,8 @@ void OpenGLRenderer::eventMarkDEBUG(const char* fmt, ...) const {
va_end(ap);
eventMark(buf);
+#else
+ (void)fmt;
#endif
}
@@ -452,7 +454,6 @@ void OpenGLRenderer::renderOverdraw() {
bool OpenGLRenderer::updateLayer(Layer* layer, bool inFrame) {
if (layer->deferredUpdateScheduled && layer->renderer
&& layer->renderNode.get() && layer->renderNode->isRenderable()) {
- Rect& dirty = layer->dirtyRect;
if (inFrame) {
endTiling();
@@ -731,8 +732,10 @@ int OpenGLRenderer::saveLayerDeferred(float left, float top, float right, float
*/
bool OpenGLRenderer::createLayer(float left, float top, float right, float bottom,
const SkPaint* paint, int flags, const SkPath* convexMask) {
- LAYER_LOGD("Requesting layer %.2fx%.2f", right - left, bottom - top);
- LAYER_LOGD("Layer cache size = %d", mCaches.layerCache.getSize());
+ if (kDebugLayers) {
+ ALOGD("Requesting layer %.2fx%.2f", right - left, bottom - top);
+ ALOGD("Layer cache size = %d", mCaches.layerCache.getSize());
+ }
const bool fboLayer = flags & SkCanvas::kClipToLayer_SaveFlag;
@@ -910,7 +913,9 @@ void OpenGLRenderer::composeLayer(const Snapshot& removed, const Snapshot& resto
// Failing to add the layer to the cache should happen only if the layer is too large
layer->setConvexMask(NULL);
if (!mCaches.layerCache.put(layer)) {
- LAYER_LOGD("Deleting layer");
+ if (kDebugLayers) {
+ ALOGD("Deleting layer");
+ }
layer->decStrong(0);
}
}
@@ -1040,7 +1045,7 @@ public:
}
protected:
- virtual void shadeSpan(int x, int y, SkPMColor[], int count) {
+ virtual void shadeSpan(int /* x */, int /* y */, SkPMColor[], int /* count */) {
LOG_ALWAYS_FATAL("LayerShader should never be drawn with raster backend.");
}
@@ -1923,8 +1928,6 @@ status_t OpenGLRenderer::drawRenderNode(RenderNode* renderNode, Rect& dirty, int
}
void OpenGLRenderer::drawAlphaBitmap(Texture* texture, float left, float top, const SkPaint* paint) {
- int color = paint != NULL ? paint->getColor() : 0;
-
float x = left;
float y = top;
@@ -2346,7 +2349,7 @@ status_t OpenGLRenderer::drawVertexBuffer(float translateX, float translateY,
setupDrawShaderUniforms(getShader(paint));
const void* vertices = vertexBuffer.getBuffer();
- bool force = mCaches.unbindMeshBuffer();
+ mCaches.unbindMeshBuffer();
mCaches.bindPositionVertexPointer(true, vertices, isAA ? gAlphaVertexStride : gVertexStride);
mCaches.resetTexCoordsVertexPointer();
@@ -3121,14 +3124,6 @@ status_t OpenGLRenderer::drawRects(const float* rects, int count, const SkPaint*
return drawColorRects(rects, count, paint, false, true, true);
}
-static void mapPointFakeZ(Vector3& point, const mat4& transformXY, const mat4& transformZ) {
- // map z coordinate with true 3d matrix
- point.z = transformZ.mapZ(point);
-
- // map x,y coordinates with draw/Skia matrix
- transformXY.mapPoint(point.x, point.y);
-}
-
status_t OpenGLRenderer::drawShadow(float casterAlpha,
const VertexBuffer* ambientShadowVertexBuffer, const VertexBuffer* spotShadowVertexBuffer) {
if (currentSnapshot()->isIgnored()) return DrawGlInfo::kStatusDone;