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 ANN_CUR_PLANE_H 18 #define ANN_CUR_PLANE_H 19 20 #include <utils/KeyedVector.h> 21 #include <hal_public.h> 22 #include <Hwcomposer.h> 23 #include <common/buffers/BufferCache.h> 24 #include <DisplayPlane.h> 25 26 #include <linux/psb_drm.h> 27 28 namespace android { 29 namespace intel { 30 31 class AnnCursorPlane : public DisplayPlane { 32 public: 33 AnnCursorPlane(int index, int disp); 34 virtual ~AnnCursorPlane(); 35 public: 36 // hardware operations 37 bool enable(); 38 bool disable(); 39 bool reset(); 40 bool isDisabled(); 41 void postFlip(); 42 43 void* getContext() const; 44 void setZOrderConfig(ZOrderConfig& config, void *nativeConfig); 45 46 bool setDataBuffer(uint32_t handle); 47 protected: 48 bool setDataBuffer(BufferMapper& mapper); 49 bool enablePlane(bool enabled); 50 51 protected: 52 struct intel_dc_plane_ctx mContext; 53 crop_t mCrop; 54 }; 55 56 } // namespace intel 57 } // namespace android 58 59 #endif /* ANN_RGB_PLANE_H */ 60