summaryrefslogtreecommitdiffstats
path: root/opengl/libagl
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2009-06-17 21:58:18 -0700
committerMathias Agopian <mathias@google.com>2009-06-17 21:58:18 -0700
commitaa6e88b80854dbcaa12678e77ffd440006faf828 (patch)
tree025255d2f186ba4d5b66dc3f5f9e094aff5b33ac /opengl/libagl
parent6d2cad2c6c5d4355ca362e45de85b5bfcd3337c3 (diff)
downloadframeworks_native-aa6e88b80854dbcaa12678e77ffd440006faf828.zip
frameworks_native-aa6e88b80854dbcaa12678e77ffd440006faf828.tar.gz
frameworks_native-aa6e88b80854dbcaa12678e77ffd440006faf828.tar.bz2
fix/add some comments
Diffstat (limited to 'opengl/libagl')
-rw-r--r--opengl/libagl/copybit.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/opengl/libagl/copybit.cpp b/opengl/libagl/copybit.cpp
index 0736b6b..a663f75 100644
--- a/opengl/libagl/copybit.cpp
+++ b/opengl/libagl/copybit.cpp
@@ -175,21 +175,24 @@ static bool copybit(GLint x, GLint y,
return false;
}
- /*
+ // copybit doesn't say anything about filtering, so we can't
+ // discriminate. On msm7k, copybit will always filter.
+ // the code below handles min/mag filters, we keep it as a reference.
+
+#ifdef MIN_MAG_FILTER
int32_t texelArea = gglMulx(dtdy, dsdx);
if (texelArea < FIXED_ONE && textureObject->mag_filter != GL_LINEAR) {
// Non-linear filtering on a texture enlargement.
LOGD_IF(DEBUG_COPYBIT, "mag filter is not GL_LINEAR");
return false;
}
-
if (texelArea > FIXED_ONE && textureObject->min_filter != GL_LINEAR) {
// Non-linear filtering on an texture shrink.
LOGD_IF(DEBUG_COPYBIT, "min filter is not GL_LINEAR");
return false;
}
- */
-
+#endif
+
const uint32_t enables = c->rasterizer.state.enables;
int planeAlpha = 255;
static const int tmu = 0;
@@ -295,6 +298,11 @@ bool drawTriangleFanWithCopybit_impl(ogles_context_t* c, GLint first, GLsizei co
// we detect if we're dealing with a rectangle, by comparing the
// rectangles {v0,v2} and {v1,v3} which should be identical.
+ // NOTE: we should check that the rectangle is window aligned, however
+ // if we do that, the optimization won't be taken in a lot of cases.
+ // Since this code is intended to be used with SurfaceFlinger only,
+ // so it's okay...
+
const vec4_t& v0 = c->vc.vBuffer[0].window;
const vec4_t& v1 = c->vc.vBuffer[1].window;
const vec4_t& v2 = c->vc.vBuffer[2].window;