From 597c7f67b5f2491c6098a1de241a3f0fd274688a Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Wed, 29 Sep 2010 13:02:36 -0700 Subject: refactored screenshot code the core screenshot function now can capture the screen at any lower resolution performing bilinear filtering. we also now have some client code to interface with the screenshot service. it's now possible to request a screenshot at a lower resolution. Change-Id: I33689bba98507ab928d0898b21596d0d2fe4b953 --- services/surfaceflinger/Layer.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'services/surfaceflinger/Layer.cpp') diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp index 695cbfa0a80d..a060d316ddc9 100644 --- a/services/surfaceflinger/Layer.cpp +++ b/services/surfaceflinger/Layer.cpp @@ -214,6 +214,17 @@ slowpath: } } +void Layer::drawForSreenShot() const +{ + bool currentFixedSize = mFixedSize; + bool currentBlending = mNeedsBlending; + const_cast(this)->mFixedSize = false; + const_cast(this)->mFixedSize = true; + LayerBase::drawForSreenShot(); + const_cast(this)->mFixedSize = currentFixedSize; + const_cast(this)->mNeedsBlending = currentBlending; +} + void Layer::onDraw(const Region& clip) const { Texture tex(mBufferManager.getActiveTexture()); -- cgit v1.2.3-59-g8ed1b