Minor cleanup
Change-Id: Ic042043c54631b5a5c74d20136addb2c08515ea9
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index 19c7ddd..6f6a9bf 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -244,9 +244,6 @@
}
}
-static inline uint16_t pack565(int r, int g, int b) {
- return (r<<11)|(g<<5)|b;
-}
void Layer::onDraw(const Region& clip) const
{
if (CC_UNLIKELY(mActiveBuffer == 0)) {
@@ -260,7 +257,8 @@
// figure out if there is something below us
Region under;
- const SurfaceFlinger::LayerVector& drawingLayers(mFlinger->mDrawingState.layersSortedByZ);
+ const SurfaceFlinger::LayerVector& drawingLayers(
+ mFlinger->mDrawingState.layersSortedByZ);
const size_t count = drawingLayers.size();
for (size_t i=0 ; i<count ; ++i) {
const sp<LayerBase>& layer(drawingLayers[i]);
@@ -276,7 +274,7 @@
return;
}
- GLenum target = mSurfaceTexture->getCurrentTextureTarget();
+ const GLenum target = GL_TEXTURE_EXTERNAL_OES;
glBindTexture(target, mTextureName);
if (getFiltering() || needsFiltering() || isFixedSize() || isCropped()) {
// TODO: we could be more subtle with isFixedSize()
@@ -439,9 +437,8 @@
recomputeVisibleRegions = true;
}
- const GLenum target(mSurfaceTexture->getCurrentTextureTarget());
- glTexParameterx(target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- glTexParameterx(target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+ glTexParameterx(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+ glTexParameterx(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
// update the layer size and release freeze-lock
const Layer::State& front(drawingState());