From e1880aed8f81fd9f7cdea2439e7d6d724738647c Mon Sep 17 00:00:00 2001 From: Kevin Lubick Date: Mon, 14 Mar 2022 23:59:15 +0000 Subject: [PATCH] Revert "[includes] Remove link between SkImageEncoder and SkBitmap" This reverts commit 965d9dc9486e56dcd263179a8ef4d2f38757f1e4. Reason for revert: Breaking G3 Original change's description: > [includes] Remove link between SkImageEncoder and SkBitmap > > This cleans up an old TODO and, according to go/chrome-includes > [1] [2], will save 106 MB (0.05%) of build size. > > [1] https://commondatastorage.googleapis.com/chromium-browser-clang/chrome_includes_2022-03-09_114034.html#view=edges&filter=&sort=asize&reverse=&includer=%5Ethird_party%2Fskia%2Finclude%2Fcore%2FSkImageEncoder%5C.h%24&included=&limit=1000 > [2] http://screen/ohtAxmQcnXui47q > > Change-Id: Ic53bfa827964dd5d2d2dbce12f1722e57ea5a9bc > Bug: 242216 > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/518497 > Reviewed-by: Brian Osman > Commit-Queue: Kevin Lubick Bug: 242216 Change-Id: I71d76582f44317f6ad3a4c0152c5ce10c9bbf783 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/c/skia/+/520796 Owners-Override: Kevin Lubick Bot-Commit: Rubber Stamper --- include/core/SkImageEncoder.h | 3 +++ tests/MultiPictureDocumentTest.cpp | 12 +++--------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/include/core/SkImageEncoder.h b/include/core/SkImageEncoder.h index 15796220a5..fd7bc80369 100644 --- a/include/core/SkImageEncoder.h +++ b/include/core/SkImageEncoder.h @@ -8,6 +8,9 @@ #ifndef SkImageEncoder_DEFINED #define SkImageEncoder_DEFINED +// TODO: update clients so we can remove this include, they should IWYU +#include "include/core/SkBitmap.h" + #include "include/core/SkData.h" #include "include/core/SkEncodedImageFormat.h" #include "include/core/SkPixmap.h" diff --git a/tests/MultiPictureDocumentTest.cpp b/tests/MultiPictureDocumentTest.cpp index f8570dbeed..8c4a080e9c 100644 --- a/tests/MultiPictureDocumentTest.cpp +++ b/tests/MultiPictureDocumentTest.cpp @@ -4,22 +4,19 @@ * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. * - * This test confirms that a MultiPictureDocument can be serialized and deserialized without error. + * This test confirms that a MultiPictureDocument can be serialized and deserailzied without error. * And that the pictures within it are re-created accurately */ #include "include/core/SkCanvas.h" -#include "include/core/SkColor.h" +#include "include/core/SkColorPriv.h" +#include "include/core/SkColorSpace.h" #include "include/core/SkDocument.h" #include "include/core/SkFont.h" #include "include/core/SkImage.h" -#include "include/core/SkImageInfo.h" #include "include/core/SkPicture.h" #include "include/core/SkPictureRecorder.h" #include "include/core/SkRRect.h" -#include "include/core/SkRect.h" -#include "include/core/SkSerialProcs.h" -#include "include/core/SkStream.h" #include "include/core/SkString.h" #include "include/core/SkSurface.h" #include "include/core/SkTextBlob.h" @@ -174,9 +171,6 @@ DEF_TEST(SkMultiPictureDocument_Serialize_and_deserialize, reporter) { #if SK_SUPPORT_GPU && defined(SK_BUILD_FOR_ANDROID) && __ANDROID_API__ >= 26 -#include "include/core/SkBitmap.h" -#include "include/core/SkColorSpace.h" -#include "include/core/SkColorType.h" #include "include/gpu/GrDirectContext.h" #include "src/gpu/GrAHardwareBufferUtils.h" #include "src/gpu/GrDirectContextPriv.h"