Files
Sally Qi 587fb57aab Support gainmap HW copy.
- for Bitmap::allocateHardwareBitmap to create and upload a hardware
  version of the gainmap.

Bug: 267216439
Test: android.graphics.cts.BitmapFactoryTest,
android.graphics.cts.BitmapRegionDecoderTest,
android.graphics.cts.ImageDecoderTest, android.graphics.cts.GainmapTest

Change-Id: Ie080896425dc82a605b2bc41e97ddc2420f5328a
2023-03-07 11:23:49 -08:00

34 lines
998 B
C++

/*
* Copyright (C) 2023 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
#include <SkGainmapInfo.h>
#include <SkImage.h>
#include <hwui/Bitmap.h>
#include <utils/LightRefBase.h>
namespace android::uirenderer {
class Gainmap : public LightRefBase<Gainmap> {
public:
SkGainmapInfo info;
sk_sp<Bitmap> bitmap;
static sp<Gainmap> allocateHardwareGainmap(const sp<Gainmap>& srcGainmap);
};
} // namespace android::uirenderer