From 9c51d07b50544dff993f498fdc2addd26267d94b Mon Sep 17 00:00:00 2001 From: Lida Wang Date: Fri, 24 Mar 2017 18:11:28 -0700 Subject: msm8996-common: camera: HAL1: fix HAL1 callback cookie 1. fix HAL1 memory callback cookie for Treble change 2. remove checking for VANILLA_HAL definition for O upgrade now for initial bring up, until the removal of the TARGET_USE_AOSP flag in devie mkfile. Change-Id: Iedf5a97e9890bc7216a3008373ddef5005836a01 --- camera/QCamera2/HAL/QCameraMem.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'camera/QCamera2/HAL/QCameraMem.h') diff --git a/camera/QCamera2/HAL/QCameraMem.h b/camera/QCamera2/HAL/QCameraMem.h index a20e29a..ec75e51 100644 --- a/camera/QCamera2/HAL/QCameraMem.h +++ b/camera/QCamera2/HAL/QCameraMem.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved. +/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -192,6 +192,7 @@ public: class QCameraStreamMemory : public QCameraMemory { public: QCameraStreamMemory(camera_request_memory getMemory, + void* cbCookie, bool cached, QCameraMemoryPool *pool = NULL, cam_stream_type_t streamType = CAM_STREAM_TYPE_DEFAULT, @@ -210,13 +211,14 @@ public: protected: camera_request_memory mGetMemory; camera_memory_t *mCameraMemory[MM_CAMERA_MAX_NUM_FRAMES]; + void* mCallbackCookie; }; // Externel heap memory is used for memories shared with // framework. They are allocated from /dev/ion or gralloc. class QCameraVideoMemory : public QCameraStreamMemory { public: - QCameraVideoMemory(camera_request_memory getMemory, bool cached, + QCameraVideoMemory(camera_request_memory getMemory, void* cbCookie, bool cached, QCameraMemType bufType = QCAMERA_MEM_TYPE_DEFAULT); virtual ~QCameraVideoMemory(); @@ -248,7 +250,7 @@ class QCameraGrallocMemory : public QCameraMemory { BUFFER_OWNED, }; public: - QCameraGrallocMemory(camera_request_memory getMemory); + QCameraGrallocMemory(camera_request_memory getMemory, void* cbCookie); void setNativeWindow(preview_stream_ops_t *anw); virtual ~QCameraGrallocMemory(); @@ -282,6 +284,7 @@ private: preview_stream_ops_t *mWindow; int mWidth, mHeight, mFormat, mStride, mScanline, mUsage, mMaxFPS; camera_request_memory mGetMemory; + void* mCallbackCookie; camera_memory_t *mCameraMemory[MM_CAMERA_MAX_NUM_FRAMES]; int mMinUndequeuedBuffers; enum ColorSpace_t mColorSpace; -- cgit v1.2.3