summaryrefslogtreecommitdiffstats
path: root/services/surfaceflinger/SurfaceFlinger.cpp
diff options
context:
space:
mode:
authorMichael Lentine <mlentine@google.com>2015-05-21 13:48:24 -0700
committerMichael Lentine <mlentine@google.com>2015-05-22 13:14:57 -0700
commit5a16a62950de06d48769e29f0c68a154ed7a7a89 (patch)
treeb2b2e851b06b34732f2639ef1fe80d6100f0e6c2 /services/surfaceflinger/SurfaceFlinger.cpp
parentd8ead0ccd4b700e43a78efe9b140d4a069dc343d (diff)
downloadframeworks_native-5a16a62950de06d48769e29f0c68a154ed7a7a89.zip
frameworks_native-5a16a62950de06d48769e29f0c68a154ed7a7a89.tar.gz
frameworks_native-5a16a62950de06d48769e29f0c68a154ed7a7a89.tar.bz2
Fix surfaceflinger tests.
Update the screenshot code and add correct return values to surface flinger's capturescreenshot function. Buf: 18138368 Change-Id: Ieb42d289088589f941502fbd69da7aa939265e07
Diffstat (limited to 'services/surfaceflinger/SurfaceFlinger.cpp')
-rw-r--r--services/surfaceflinger/SurfaceFlinger.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 0d57ae5..c612026 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -3337,8 +3337,8 @@ status_t SurfaceFlinger::captureScreenImplLocked(
sp<Surface> sur = new Surface(producer, false);
ANativeWindow* window = sur.get();
- status_t result = NO_ERROR;
- if (native_window_api_connect(window, NATIVE_WINDOW_API_EGL) == NO_ERROR) {
+ status_t result = native_window_api_connect(window, NATIVE_WINDOW_API_EGL);
+ if (result == NO_ERROR) {
uint32_t usage = GRALLOC_USAGE_SW_READ_OFTEN | GRALLOC_USAGE_SW_WRITE_OFTEN |
GRALLOC_USAGE_HW_RENDER | GRALLOC_USAGE_HW_TEXTURE;
@@ -3428,7 +3428,7 @@ status_t SurfaceFlinger::captureScreenImplLocked(
result = BAD_VALUE;
}
// queueBuffer takes ownership of syncFd
- window->queueBuffer(window, buffer, syncFd);
+ result = window->queueBuffer(window, buffer, syncFd);
}
} else {
result = BAD_VALUE;