diff options
author | Dan Stoza <stoza@google.com> | 2014-05-22 15:59:05 -0700 |
---|---|---|
committer | Dan Stoza <stoza@google.com> | 2014-05-23 09:19:03 -0700 |
commit | c18790018be5d7ea7061ccbc81f3044e74adc823 (patch) | |
tree | d03920775e72b284447202d109996002ce5e1784 /services/surfaceflinger/DisplayDevice.cpp | |
parent | 9bf29a81df0eaf923f3a9821655c663290a0a854 (diff) | |
download | frameworks_native-c18790018be5d7ea7061ccbc81f3044e74adc823.zip frameworks_native-c18790018be5d7ea7061ccbc81f3044e74adc823.tar.gz frameworks_native-c18790018be5d7ea7061ccbc81f3044e74adc823.tar.bz2 |
SurfaceFlinger: Add sourceCrop to screenshot
Adds a sourceCrop Rect parameter to screenshot commands, which allows
clients to capture only a portion of the screen instead of the whole
screen.
Bug: 15137922
Change-Id: I629447573cd34ffb96334cde7ba02490b9ea06d8
Diffstat (limited to 'services/surfaceflinger/DisplayDevice.cpp')
-rw-r--r-- | services/surfaceflinger/DisplayDevice.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/services/surfaceflinger/DisplayDevice.cpp b/services/surfaceflinger/DisplayDevice.cpp index 42993b9..4ebe291 100644 --- a/services/surfaceflinger/DisplayDevice.cpp +++ b/services/surfaceflinger/DisplayDevice.cpp @@ -283,7 +283,8 @@ EGLBoolean DisplayDevice::makeCurrent(EGLDisplay dpy, EGLContext ctx) const { void DisplayDevice::setViewportAndProjection() const { size_t w = mDisplayWidth; size_t h = mDisplayHeight; - mFlinger->getRenderEngine().setViewportAndProjection(w, h, w, h, false); + Rect sourceCrop(0, 0, w, h); + mFlinger->getRenderEngine().setViewportAndProjection(w, h, sourceCrop, h, false); } // ---------------------------------------------------------------------------- |