Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Unified Diff: src/codec/SkGifCodec.cpp

Issue 2450753003: Fix more namespace conflicts in SkGifImageReader (Closed)
Patch Set: Fix macros Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/gif/SkGifImageReader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkGifCodec.cpp
diff --git a/src/codec/SkGifCodec.cpp b/src/codec/SkGifCodec.cpp
index 1c250fcccb6cb1dbc354d1b321b05525df12945e..263004b6cdea084ba93004dbc2fa4d0a71804a1c 100644
--- a/src/codec/SkGifCodec.cpp
+++ b/src/codec/SkGifCodec.cpp
@@ -73,7 +73,7 @@ static SkCodec::Result gif_error(const char* msg, SkCodec::Result result = SkCod
*/
SkCodec* SkGifCodec::NewFromStream(SkStream* stream) {
std::unique_ptr<SkGifImageReader> reader(new SkGifImageReader(stream));
- if (!reader->parse(SkGifImageReader::GIFSizeQuery)) {
+ if (!reader->parse(SkGifImageReader::SkGIFSizeQuery)) {
// Not enough data to determine the size.
return nullptr;
}
@@ -127,11 +127,11 @@ SkGifCodec::SkGifCodec(const SkEncodedInfo& encodedInfo, const SkImageInfo& imag
}
std::vector<SkCodec::FrameInfo> SkGifCodec::onGetFrameInfo() {
- fReader->parse(SkGifImageReader::GIFFrameCountQuery);
+ fReader->parse(SkGifImageReader::SkGIFFrameCountQuery);
const size_t size = fReader->imagesCount();
std::vector<FrameInfo> result(size);
for (size_t i = 0; i < size; i++) {
- const GIFFrameContext* frameContext = fReader->frameContext(i);
+ const SkGIFFrameContext* frameContext = fReader->frameContext(i);
result[i].fDuration = frameContext->delayTime();
result[i].fRequiredFrame = frameContext->getRequiredFrame();
}
@@ -184,7 +184,7 @@ SkCodec::Result SkGifCodec::prepareToDecode(const SkImageInfo& dstInfo, SkPMColo
kInvalidConversion);
}
- fReader->parse((SkGifImageReader::GIFParseQuery) frameIndex);
+ fReader->parse((SkGifImageReader::SkGIFParseQuery) frameIndex);
if (frameIndex >= fReader->imagesCount()) {
return gif_error("frame index out of range!\n", kIncompleteInput);
@@ -199,7 +199,7 @@ SkCodec::Result SkGifCodec::prepareToDecode(const SkImageInfo& dstInfo, SkPMColo
}
void SkGifCodec::initializeSwizzler(const SkImageInfo& dstInfo, size_t frameIndex) {
- const GIFFrameContext* frame = fReader->frameContext(frameIndex);
+ const SkGIFFrameContext* frame = fReader->frameContext(frameIndex);
// This is only called by prepareToDecode, which ensures frameIndex is in range.
SkASSERT(frame);
@@ -269,7 +269,7 @@ SkCodec::Result SkGifCodec::onIncrementalDecode(int* rowsDecoded) {
// It is possible the client has appended more data. Parse, if needed.
const auto& options = this->options();
const size_t frameIndex = options.fFrameIndex;
- fReader->parse((SkGifImageReader::GIFParseQuery) frameIndex);
+ fReader->parse((SkGifImageReader::SkGIFParseQuery) frameIndex);
const bool firstCallToIncrementalDecode = fFirstCallToIncrementalDecode;
fFirstCallToIncrementalDecode = false;
@@ -280,7 +280,7 @@ SkCodec::Result SkGifCodec::decodeFrame(bool firstAttempt, const Options& opts,
const SkImageInfo& dstInfo = this->dstInfo();
const size_t frameIndex = opts.fFrameIndex;
SkASSERT(frameIndex < fReader->imagesCount());
- const GIFFrameContext* frameContext = fReader->frameContext(frameIndex);
+ const SkGIFFrameContext* frameContext = fReader->frameContext(frameIndex);
if (firstAttempt) {
// rowsDecoded reports how many rows have been initialized, so a layer above
// can fill the rest. In some cases, we fill the background before decoding
@@ -299,7 +299,7 @@ SkCodec::Result SkGifCodec::decodeFrame(bool firstAttempt, const Options& opts,
// afterwards for an incomplete image. (FIXME: Does the first pass
// cover all rows? If so, we do not have to fill here.)
if (frameContext->frameRect() != this->getInfo().bounds()
- || frameContext->transparentPixel() < MAX_COLORS
+ || frameContext->transparentPixel() < SK_MAX_COLORS
|| frameContext->interlaced()) {
// fill ignores the width (replaces it with the actual, scaled width).
// But we need to scale in Y.
@@ -406,7 +406,7 @@ uint64_t SkGifCodec::onGetFillValue(const SkImageInfo& dstInfo) const {
bool SkGifCodec::haveDecodedRow(size_t frameIndex, const unsigned char* rowBegin,
size_t rowNumber, unsigned repeatCount, bool writeTransparentPixels)
{
- const GIFFrameContext* frameContext = fReader->frameContext(frameIndex);
+ const SkGIFFrameContext* frameContext = fReader->frameContext(frameIndex);
// The pixel data and coordinates supplied to us are relative to the frame's
// origin within the entire image size, i.e.
// (frameContext->xOffset, frameContext->yOffset). There is no guarantee
« no previous file with comments | « no previous file | third_party/gif/SkGifImageReader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698