Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9f85cd3b authored by John Reck's avatar John Reck
Browse files

SilkFX HDR demos

Test: this
Bug: 266628247
Change-Id: Ib41de2de8634e03dd6f7f6b3909e4e109793fa31
parent 01472127
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -48,10 +48,7 @@ void DrawGainmapBitmap(SkCanvas* c, const sk_sp<const SkImage>& image, const SkR
        gainmapSrc.fRight *= sX;
        gainmapSrc.fTop *= sY;
        gainmapSrc.fBottom *= sY;
        // TODO: Temporary workaround for SkGainmapShader::Make not having a const variant
        sk_sp<SkImage> mutImage = sk_ref_sp(const_cast<SkImage*>(image.get()));
        sk_sp<SkImage> mutGainmap = sk_ref_sp(const_cast<SkImage*>(gainmapImage.get()));
        auto shader = SkGainmapShader::Make(mutImage, src, sampling, mutGainmap, gainmapSrc,
        auto shader = SkGainmapShader::Make(image, src, sampling, gainmapImage, gainmapSrc,
                                            sampling, gainmapInfo, dst, targetSdrHdrRatio,
                                            c->imageInfo().refColorSpace());
        gainmapPaint.setShader(shader);
+6 −2
Original line number Diff line number Diff line
@@ -25,7 +25,10 @@ package {

android_test {
    name: "SilkFX",
    srcs: ["**/*.java", "**/*.kt"],
    srcs: [
        "**/*.java",
        "**/*.kt",
    ],
    platform_apis: true,
    certificate: "platform",
    static_libs: [
@@ -33,5 +36,6 @@ android_test {
        "androidx.appcompat_appcompat",
        "com.google.android.material_material",
        "androidx-constraintlayout_constraintlayout",
        "subsampling-scale-image-view",
    ],
}
+10 −0
Original line number Diff line number Diff line
@@ -55,5 +55,15 @@
            android:exported="true">
        </activity>

        <activity android:name=".app.HdrImageViewer"
            android:label="HDR Gainmap Image Viewer"
            android:exported="true">
            <intent-filter>
                <action android:name="android.intent.action.VIEW"/>
                <category android:name="android.intent.category.DEFAULT"/>
                <data android:mimeType="image/*"/>
            </intent-filter>
        </activity>

    </application>
</manifest>
+6.26 MiB
Loading image diff...
+23 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ 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.
  -->

<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <gradient
        android:startColor="#000000"
        android:endColor="#0000FF"
        android:angle="0"/>
</shape>
 No newline at end of file
Loading