1 /* 2 * Copyright (c) 2022-2023 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef ROSEN_RENDER_SERVICE_BASE_RS_OCCLUSION_DATA_H 17 #define ROSEN_RENDER_SERVICE_BASE_RS_OCCLUSION_DATA_H 18 19 #include <vector> 20 #include <parcel.h> 21 22 #include "common/rs_macros.h" 23 24 namespace OHOS { 25 namespace Rosen { 26 using VisibleData = std::vector<uint64_t>; 27 class RSB_EXPORT RSOcclusionData : public Parcelable { 28 public: 29 RSOcclusionData() = default; RSOcclusionData(VisibleData & vec)30 RSOcclusionData(VisibleData& vec) 31 { 32 std::copy(vec.begin(), vec.end(), std::back_inserter(visibleData_)); 33 } RSOcclusionData(RSOcclusionData && other)34 RSOcclusionData(RSOcclusionData&& other) : visibleData_(std::move(other.visibleData_)) {} 35 ~RSOcclusionData() noexcept; 36 GetVisibleData()37 VisibleData& GetVisibleData() 38 { 39 return visibleData_; 40 } 41 static RSOcclusionData* Unmarshalling(Parcel& parcel); 42 bool Marshalling(Parcel& parcel) const override; 43 44 private: 45 VisibleData visibleData_; 46 }; 47 } // namespace Rosen 48 } // namespace OHOS 49 50 #endif 51