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

Commit 12497579 authored by Leon Scroggins III's avatar Leon Scroggins III
Browse files

Remove references to ANDROID_ENABLE_LINEAR_BLENDING

Test: make

There is no longer any intent to turn on linear blending.

Change-Id: Ia1016f31833212da6ad4b4c6ebe03d16a509746d
parent a170a5a5
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -27,10 +27,6 @@ cc_library_shared {
        "-Wno-error=deprecated-declarations",
        "-Wunused",
        "-Wunreachable-code",

        // TODO: Linear blending should be enabled by default, but we are
        // TODO: making it an opt-in while it's a work in progress
        //"-DANDROID_ENABLE_LINEAR_BLENDING",
    ],

    cppflags: ["-Wno-conversion-null"],
+0 −4
Original line number Diff line number Diff line
@@ -28,10 +28,6 @@ cc_defaults {

        // clang's warning is broken, see: https://llvm.org/bugs/show_bug.cgi?id=21629
        "-Wno-missing-braces",

        // TODO: Linear blending should be enabled by default, but we are
        // TODO: making it an opt-in while it's a work in progress
        //"-DANDROID_ENABLE_LINEAR_BLENDING",
    ],

    include_dirs: [
+0 −1
Original line number Diff line number Diff line
@@ -116,7 +116,6 @@ struct FormatInfo {

static FormatInfo determineFormat(const SkBitmap& skBitmap) {
    FormatInfo formatInfo;
    // TODO: add support for linear blending (when ANDROID_ENABLE_LINEAR_BLENDING is defined)
    switch (skBitmap.info().colorType()) {
        case kRGBA_8888_SkColorType:
            formatInfo.isSupported = true;
+1 −6
Original line number Diff line number Diff line
@@ -606,12 +606,7 @@ void Tree::updateBitmapCache(Bitmap& bitmap, bool useStagingData) {

bool Tree::allocateBitmapIfNeeded(Cache& cache, int width, int height) {
    if (!canReuseBitmap(cache.bitmap.get(), width, height)) {
#ifndef ANDROID_ENABLE_LINEAR_BLENDING
        sk_sp<SkColorSpace> colorSpace = nullptr;
#else
        sk_sp<SkColorSpace> colorSpace = SkColorSpace::MakeSRGB();
#endif
        SkImageInfo info = SkImageInfo::MakeN32(width, height, kPremul_SkAlphaType, colorSpace);
        SkImageInfo info = SkImageInfo::MakeN32(width, height, kPremul_SkAlphaType);
        cache.bitmap = Bitmap::allocateHeapBitmap(info);
        return true;
    }
+1 −6
Original line number Diff line number Diff line
@@ -262,12 +262,7 @@ void VectorDrawableAtlas::delayedReleaseEntries() {
}

sk_sp<SkSurface> VectorDrawableAtlas::createSurface(int width, int height, GrContext* context) {
#ifndef ANDROID_ENABLE_LINEAR_BLENDING
    sk_sp<SkColorSpace> colorSpace = nullptr;
#else
    sk_sp<SkColorSpace> colorSpace = SkColorSpace::MakeSRGB();
#endif
    SkImageInfo info = SkImageInfo::MakeN32(width, height, kPremul_SkAlphaType, colorSpace);
    SkImageInfo info = SkImageInfo::MakeN32(width, height, kPremul_SkAlphaType);
    // This must have a top-left origin so that calls to surface->canvas->writePixels
    // performs a basic texture upload instead of a more complex drawing operation
    return SkSurface::MakeRenderTarget(context, SkBudgeted::kYes, info, 0, kTopLeft_GrSurfaceOrigin,
Loading