Android-x86
Fork

  • R/O
  • HTTP
  • SSH
  • HTTPS

hardware-intel-hwcomposer: コミット

hardware/intel/hwcomposer


コミットメタ情報

リビジョン27054419aeca9cf475d8418a29c315427331a1fc (tree)
日時2013-03-07 16:14:39
作者Tapani Pälli <tapani.palli@inte...>
コミッターTapani Pälli

ログメッセージ

Update hwc and existing hooks to hwcomposer api version 1.0

Change-Id: Id0196ba03c0a33c0f86da4a3abeb6bcff5972b52
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>

変更サマリ

差分

--- a/hwcomposer.cpp
+++ b/hwcomposer.cpp
@@ -32,8 +32,10 @@
3232
3333 #include <EGL/egl.h>
3434
35+#define HWC_REMOVE_DEPRECATED_VERSIONS 1
36+
3537 struct hwc_context_t {
36- hwc_composer_device_t device;
38+ hwc_composer_device_1 device;
3739 struct drm_module_t *gralloc_module;
3840 };
3941
@@ -57,40 +59,40 @@ hwc_module_t HAL_MODULE_INFO_SYM = {
5759 };
5860
5961
60-static int hwc_prepare(hwc_composer_device_t *dev, hwc_layer_list_t* list)
62+static int hwc_prepare(hwc_composer_device_1 *dev, size_t numDisplays,
63+ hwc_display_contents_1_t** displays)
6164 {
6265 struct hwc_context_t* ctx = (struct hwc_context_t *) &dev->common;
6366
6467 // SurfaceFlinger wants to handle the complete composition
65- if (!list || list->numHwLayers == 0)
68+ if (!displays[0]->hwLayers || displays[0]->numHwLayers == 0)
6669 return 0;
6770
68- int topmost = list->numHwLayers;
69- if (list->numHwLayers > 0)
71+ int topmost = displays[0]->numHwLayers;
72+ if (displays[0]->numHwLayers > 0)
7073 topmost--;
7174
72- if (list->flags & HWC_GEOMETRY_CHANGED) {
75+ if (displays[0]->hwLayers->flags & HWC_GEOMETRY_CHANGED) {
7376 for (int i=topmost; i>=0; i--) {
74- list->hwLayers[i].compositionType = HWC_FRAMEBUFFER;
77+ displays[0]->hwLayers[i].compositionType = HWC_FRAMEBUFFER;
7578 }
7679 }
7780 return 0;
7881 }
7982
8083
81-static int hwc_set(hwc_composer_device_t *dev,
82- hwc_display_t dpy,
83- hwc_surface_t sur,
84- hwc_layer_list_t* list)
84+static int hwc_set(hwc_composer_device_1 *dev,
85+ size_t numDisplays, hwc_display_contents_1_t** displays)
8586 {
8687 struct hwc_context_t* ctx = (struct hwc_context_t*)dev;
8788 EGLBoolean success;
8889
8990 // display is turning off
90- if (!dpy && !sur && !list)
91+ if (!displays[0]->dpy)
9192 return 0;
9293
93- success = eglSwapBuffers((EGLDisplay)dpy, (EGLSurface)sur);
94+ success = eglSwapBuffers((EGLDisplay)displays[0]->dpy,
95+ (EGLSurface)displays[0]->sur);
9496
9597 if (!success)
9698 return HWC_EGL_ERROR;
旧リポジトリブラウザで表示