diff options
| author | Mathias Agopian <mathias@google.com> | 2009-06-17 21:58:18 -0700 |
|---|---|---|
| committer | Mathias Agopian <mathias@google.com> | 2009-06-17 21:58:18 -0700 |
| commit | 42bf621e801183028066e6947fdd22eae8693a02 (patch) | |
| tree | a9f2dc439845138ba19c50872ac1781b9d9e5107 /opengl/libagl | |
| parent | 03a1b0116b115c214c16fa1a02a46999312fd0f2 (diff) | |
| download | frameworks_base-42bf621e801183028066e6947fdd22eae8693a02.zip frameworks_base-42bf621e801183028066e6947fdd22eae8693a02.tar.gz frameworks_base-42bf621e801183028066e6947fdd22eae8693a02.tar.bz2 | |
fix/add some comments
Diffstat (limited to 'opengl/libagl')
| -rw-r--r-- | opengl/libagl/copybit.cpp | 16 |
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; |
