summaryrefslogtreecommitdiffstats
path: root/include/surfaceflinger
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2010-04-15 18:48:26 -0700
committerMathias Agopian <mathias@google.com>2010-04-20 13:36:29 -0700
commit16a86ee30b70aea8c254b836c708f54a608d25f3 (patch)
tree9e30bb72015eeaedcc5c7d9f8303cebd2cc3e07f /include/surfaceflinger
parent6bb5ebaa0305a30b5037f6533b3b989e0437d26c (diff)
downloadframeworks_base-16a86ee30b70aea8c254b836c708f54a608d25f3.zip
frameworks_base-16a86ee30b70aea8c254b836c708f54a608d25f3.tar.gz
frameworks_base-16a86ee30b70aea8c254b836c708f54a608d25f3.tar.bz2
added setCrop() to android_native_window_t
hooked up the new method up to Surface.cpp the actual crop is not implemented in SF yet Change-Id: Ic6e313c98fd880f127a051a0ccc71808bd689751
Diffstat (limited to 'include/surfaceflinger')
-rw-r--r--include/surfaceflinger/ISurfaceFlingerClient.h9
-rw-r--r--include/surfaceflinger/Surface.h3
2 files changed, 12 insertions, 0 deletions
diff --git a/include/surfaceflinger/ISurfaceFlingerClient.h b/include/surfaceflinger/ISurfaceFlingerClient.h
index d257645..c96432f 100644
--- a/include/surfaceflinger/ISurfaceFlingerClient.h
+++ b/include/surfaceflinger/ISurfaceFlingerClient.h
@@ -59,6 +59,9 @@ public:
virtual sp<IMemoryHeap> getControlBlock() const = 0;
+ /*
+ * Requires ACCESS_SURFACE_FLINGER permission
+ */
virtual sp<ISurface> createSurface( surface_data_t* data,
int pid,
const String8& name,
@@ -68,8 +71,14 @@ public:
PixelFormat format,
uint32_t flags) = 0;
+ /*
+ * Requires ACCESS_SURFACE_FLINGER permission
+ */
virtual status_t destroySurface(SurfaceID sid) = 0;
+ /*
+ * Requires ACCESS_SURFACE_FLINGER permission
+ */
virtual status_t setState(int32_t count, const layer_state_t* states) = 0;
};
diff --git a/include/surfaceflinger/Surface.h b/include/surfaceflinger/Surface.h
index 4c8d023..68809a9 100644
--- a/include/surfaceflinger/Surface.h
+++ b/include/surfaceflinger/Surface.h
@@ -215,10 +215,12 @@ private:
void dispatch_setUsage(va_list args);
int dispatch_connect(va_list args);
int dispatch_disconnect(va_list args);
+ int dispatch_crop(va_list args);
void setUsage(uint32_t reqUsage);
int connect(int api);
int disconnect(int api);
+ int crop(Rect const* rect);
uint32_t getUsage() const;
int getConnectedApi() const;
@@ -237,6 +239,7 @@ private:
Rect mSwapRectangle;
uint32_t mUsage;
int mConnected;
+ Rect mNextBufferCrop;
// protected by mSurfaceLock. These are also used from lock/unlock
// but in that case, they must be called form the same thread.