Naseer Ahmed | 31da0b1 | 2012-07-31 18:55:33 -0700 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (C) 2010 The Android Open Source Project |
| 3 | * Copyright (C) 2012, Code Aurora Forum. All rights reserved. |
| 4 | * |
| 5 | * Not a Contribution, Apache license notifications and license are retained |
| 6 | * for attribution purposes only. |
| 7 | * |
| 8 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 9 | * you may not use this file except in compliance with the License. |
| 10 | * You may obtain a copy of the License at |
| 11 | * |
| 12 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 13 | * |
| 14 | * Unless required by applicable law or agreed to in writing, software |
| 15 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 17 | * See the License for the specific language governing permissions and |
| 18 | * limitations under the License. |
| 19 | */ |
| 20 | #ifndef HWC_COPYBIT_ENGINE_H |
| 21 | #define HWC_COPYBIT_ENGINE_H |
| 22 | |
| 23 | namespace qhwc { |
| 24 | class CopybitEngine { |
| 25 | public: |
| 26 | ~CopybitEngine(); |
| 27 | // API to get copybit engine(non static) |
| 28 | struct copybit_device_t *getEngine(); |
| 29 | // API to get singleton |
| 30 | static CopybitEngine* getInstance(); |
| 31 | |
| 32 | private: |
| 33 | CopybitEngine(); |
| 34 | struct copybit_device_t *sEngine; |
| 35 | static CopybitEngine* sInstance; // singleton |
| 36 | }; |
| 37 | |
| 38 | }; //namespace qhwc |
| 39 | |
| 40 | #endif //HWC_COPYBIT_ENGINE_H |