1 /* 2 // Copyright (c) 2014 Intel Corporation 3 // 4 // Licensed under the Apache License, Version 2.0 (the "License"); 5 // you may not use this file except in compliance with the License. 6 // You may obtain a copy of the License at 7 // 8 // http://www.apache.org/licenses/LICENSE-2.0 9 // 10 // Unless required by applicable law or agreed to in writing, software 11 // distributed under the License is distributed on an "AS IS" BASIS, 12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 // See the License for the specific language governing permissions and 14 // limitations under the License. 15 */ 16 17 #ifndef TNG_CUR_PLANE_H 18 #define TNG_CUR_PLANE_H 19 20 #include <utils/KeyedVector.h> 21 #include <hal_public.h> 22 #include <Hwcomposer.h> 23 #include <BufferCache.h> 24 #include <DisplayPlane.h> 25 26 #include <linux/psb_drm.h> 27 28 namespace android { 29 namespace intel { 30 31 class TngCursorPlane : public DisplayPlane { 32 public: 33 TngCursorPlane(int index, int disp); 34 virtual ~TngCursorPlane(); 35 public: 36 // hardware operations 37 bool enable(); 38 bool disable(); 39 bool isDisabled(); 40 void postFlip(); 41 42 void* getContext() const; 43 void setZOrderConfig(ZOrderConfig& config, void *nativeConfig); 44 45 bool setDataBuffer(buffer_handle_t handle); 46 protected: 47 bool setDataBuffer(BufferMapper& mapper); 48 bool enablePlane(bool enabled); 49 50 protected: 51 struct intel_dc_plane_ctx mContext; 52 crop_t mCrop; 53 }; 54 55 } // namespace intel 56 } // namespace android 57 58 #endif /* TNG_CUR_PLANE_H */ 59