diff options
author | Mathias Agopian <mathias@google.com> | 2011-01-25 14:46:31 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-01-25 14:46:31 -0800 |
commit | 6b72702f305cf3aad80ed6e9f962280be745b588 (patch) | |
tree | dc0c88645e3246728d26dfe3d20164765e95e2eb /services/surfaceflinger | |
parent | 2d665dd37a6677a1e8f3f753e1656780286cfa29 (diff) | |
parent | d0441f921b2b1879fb44041f521d9bfaa5a547d0 (diff) | |
download | frameworks_base-6b72702f305cf3aad80ed6e9f962280be745b588.zip frameworks_base-6b72702f305cf3aad80ed6e9f962280be745b588.tar.gz frameworks_base-6b72702f305cf3aad80ed6e9f962280be745b588.tar.bz2 |
am d0441f92: Merge "fix a small bug that caused screenshot to show garbage in some cases (DO NOT MERGE)" into gingerbread
* commit 'd0441f921b2b1879fb44041f521d9bfaa5a547d0':
fix a small bug that caused screenshot to show garbage in some cases (DO NOT MERGE)
Diffstat (limited to 'services/surfaceflinger')
-rw-r--r-- | services/surfaceflinger/SurfaceFlinger.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index 664e5ad..50f4914 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -2114,6 +2114,7 @@ status_t SurfaceFlinger::captureScreenImplLocked(DisplayID dpy, // invert everything, b/c glReadPixel() below will invert the FB glViewport(0, 0, sw, sh); + glScissor(0, 0, sw, sh); glMatrixMode(GL_PROJECTION); glPushMatrix(); glLoadIdentity(); @@ -2123,6 +2124,7 @@ status_t SurfaceFlinger::captureScreenImplLocked(DisplayID dpy, // redraw the screen entirely... glClearColor(0,0,0,1); glClear(GL_COLOR_BUFFER_BIT); + const Vector< sp<LayerBase> >& layers(mVisibleLayersSortedByZ); const size_t count = layers.size(); for (size_t i=0 ; i<count ; ++i) { @@ -2157,7 +2159,6 @@ status_t SurfaceFlinger::captureScreenImplLocked(DisplayID dpy, result = NO_MEMORY; } } - glEnable(GL_SCISSOR_TEST); glViewport(0, 0, hw_w, hw_h); glMatrixMode(GL_PROJECTION); |