Skip to content

Commit

Permalink
Add decoder #includes to implementation files
Browse files Browse the repository at this point in the history
Without these, the various Sk*Decoder::Decode functions were not properly
being marked with SK_API and were not visible to Chromium.

Change-Id: I29b5bb630e54a26205a8f562d61929d61bc4aaec
Bug: skia:13983
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/714237
Commit-Queue: Kevin Lubick <[email protected]>
Auto-Submit: Kevin Lubick <[email protected]>
Reviewed-by: Florin Malita <[email protected]>
  • Loading branch information
kjlubick authored and TomEdwardsEnscape committed Sep 25, 2024
1 parent e9d4ecc commit 1d71931
Show file tree
Hide file tree
Showing 21 changed files with 23 additions and 3 deletions.
1 change: 1 addition & 0 deletions include/codec/SkAvifDecoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

#include "include/codec/SkCodec.h"
#include "include/core/SkRefCnt.h"
#include "include/private/base/SkAPI.h"

class SkData;
class SkStream;
Expand Down
1 change: 1 addition & 0 deletions include/codec/SkBmpDecoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

#include "include/codec/SkCodec.h"
#include "include/core/SkRefCnt.h"
#include "include/private/base/SkAPI.h"

class SkData;
class SkStream;
Expand Down
4 changes: 2 additions & 2 deletions include/codec/SkCodec.h
Original file line number Diff line number Diff line change
Expand Up @@ -1021,7 +1021,7 @@ using MakeFromStreamCallback = std::unique_ptr<SkCodec> (*)(std::unique_ptr<SkSt
SkCodec::Result*,
DecodeContext);

struct Decoder {
struct SK_API Decoder {
// By convention, we use all lowercase letters and go with the primary filename extension.
// For example "png", "jpg", "ico", "webp", etc
std::string id;
Expand All @@ -1033,7 +1033,7 @@ struct Decoder {
// SkCodec::MakeFromStream. If a decoder with the same id already exists, this new decoder
// will replace the existing one (in the same position). This is not thread-safe, so make sure all
// initialization is done before the first call.
void Register(Decoder d);
void SK_API Register(Decoder d);
}

#endif // SkCodec_DEFINED
1 change: 1 addition & 0 deletions include/codec/SkGifDecoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

#include "include/codec/SkCodec.h"
#include "include/core/SkRefCnt.h"
#include "include/private/base/SkAPI.h"

class SkData;
class SkStream;
Expand Down
1 change: 1 addition & 0 deletions include/codec/SkIcoDecoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

#include "include/codec/SkCodec.h"
#include "include/core/SkRefCnt.h"
#include "include/private/base/SkAPI.h"

class SkData;
class SkStream;
Expand Down
1 change: 1 addition & 0 deletions include/codec/SkJpegDecoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

#include "include/codec/SkCodec.h"
#include "include/core/SkRefCnt.h"
#include "include/private/base/SkAPI.h"

class SkData;
class SkStream;
Expand Down
1 change: 1 addition & 0 deletions include/codec/SkJpegxlDecoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

#include "include/codec/SkCodec.h"
#include "include/core/SkRefCnt.h"
#include "include/private/base/SkAPI.h"

class SkData;
class SkStream;
Expand Down
1 change: 1 addition & 0 deletions include/codec/SkPngDecoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

#include "include/codec/SkCodec.h"
#include "include/core/SkRefCnt.h"
#include "include/private/base/SkAPI.h"

class SkData;
class SkStream;
Expand Down
1 change: 1 addition & 0 deletions include/codec/SkRawDecoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

#include "include/codec/SkCodec.h"
#include "include/core/SkRefCnt.h"
#include "include/private/base/SkAPI.h"

class SkData;
class SkStream;
Expand Down
1 change: 1 addition & 0 deletions include/codec/SkWbmpDecoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

#include "include/codec/SkCodec.h"
#include "include/core/SkRefCnt.h"
#include "include/private/base/SkAPI.h"

class SkData;
class SkStream;
Expand Down
1 change: 1 addition & 0 deletions include/codec/SkWebpDecoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

#include "include/codec/SkCodec.h"
#include "include/core/SkRefCnt.h"
#include "include/private/base/SkAPI.h"

class SkData;
class SkStream;
Expand Down
1 change: 1 addition & 0 deletions src/codec/SkAvifCodec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#include "src/codec/SkAvifCodec.h"

#include "include/codec/SkAvifDecoder.h"
#include "include/codec/SkCodec.h"
#include "include/codec/SkCodecAnimation.h"
#include "include/core/SkColorType.h"
Expand Down
1 change: 1 addition & 0 deletions src/codec/SkBmpCodec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#include "src/codec/SkBmpCodec.h"

#include "include/codec/SkBmpDecoder.h"
#include "include/core/SkData.h"
#include "include/core/SkImageInfo.h"
#include "include/core/SkRefCnt.h"
Expand Down
1 change: 1 addition & 0 deletions src/codec/SkIcoCodec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#include "src/codec/SkIcoCodec.h"

#include "include/codec/SkIcoDecoder.h"
#include "include/core/SkData.h"
#include "include/core/SkImageInfo.h"
#include "include/core/SkRefCnt.h"
Expand Down
1 change: 1 addition & 0 deletions src/codec/SkJpegCodec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "src/codec/SkJpegCodec.h"

#include "include/codec/SkCodec.h"
#include "include/codec/SkJpegDecoder.h"
#include "include/core/SkAlphaType.h"
#include "include/core/SkColorType.h"
#include "include/core/SkData.h"
Expand Down
3 changes: 2 additions & 1 deletion src/codec/SkJpegxlCodec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "src/codec/SkJpegxlCodec.h"

#include "include/codec/SkCodec.h"
#include "include/codec/SkJpegxlDecoder.h"
#include "include/core/SkColorType.h"
#include "include/core/SkData.h"
#include "include/core/SkImageInfo.h"
Expand Down Expand Up @@ -465,7 +466,7 @@ const SkFrameHolder* SkJpegxlCodec::getFrameHolder() const {
// TODO(eustas): implement
// SkSampler* SkJpegxlCodec::getSampler(bool /*createIfNecessary*/) { return nullptr; }

namespace SkJpegDecoder {
namespace SkJpegxlDecoder {
bool IsJpegxl(const void* data, size_t len) {
return SkJpegxlCodec::IsJpegxl(data, len);
}
Expand Down
1 change: 1 addition & 0 deletions src/codec/SkPngCodec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "src/codec/SkPngCodec.h"

#include "include/codec/SkPngChunkReader.h"
#include "include/codec/SkPngDecoder.h"
#include "include/core/SkAlphaType.h"
#include "include/core/SkColor.h"
#include "include/core/SkColorType.h"
Expand Down
1 change: 1 addition & 0 deletions src/codec/SkRawCodec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "src/codec/SkRawCodec.h"

#include "include/codec/SkCodec.h"
#include "include/codec/SkRawDecoder.h"
#include "include/core/SkColorSpace.h"
#include "include/core/SkData.h"
#include "include/core/SkImageInfo.h"
Expand Down
1 change: 1 addition & 0 deletions src/codec/SkWbmpCodec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "src/codec/SkWbmpCodec.h"

#include "include/codec/SkCodec.h"
#include "include/codec/SkWbmpDecoder.h"
#include "include/codec/SkEncodedImageFormat.h"
#include "include/core/SkColorType.h"
#include "include/core/SkData.h"
Expand Down
1 change: 1 addition & 0 deletions src/codec/SkWebpCodec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

#include "include/codec/SkCodec.h"
#include "include/codec/SkCodecAnimation.h"
#include "include/codec/SkWebpDecoder.h"
#include "include/core/SkAlphaType.h"
#include "include/core/SkBitmap.h"
#include "include/core/SkColorType.h"
Expand Down
1 change: 1 addition & 0 deletions src/codec/SkWuffsCodec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "include/codec/SkCodec.h"
#include "include/codec/SkCodecAnimation.h"
#include "include/codec/SkEncodedImageFormat.h"
#include "include/codec/SkGifDecoder.h"
#include "include/core/SkAlphaType.h"
#include "include/core/SkBitmap.h"
#include "include/core/SkBlendMode.h"
Expand Down

0 comments on commit 1d71931

Please sign in to comment.