| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. | 2 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. |
| 3 * | 3 * |
| 4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
| 5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
| 6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
| 7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
| 8 * | 8 * |
| 9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 #include "platform/RuntimeEnabledFeatures.h" | 24 #include "platform/RuntimeEnabledFeatures.h" |
| 25 #include "platform/graphics/BitmapImageMetrics.h" | 25 #include "platform/graphics/BitmapImageMetrics.h" |
| 26 #include "platform/image-decoders/FastSharedBufferReader.h" | 26 #include "platform/image-decoders/FastSharedBufferReader.h" |
| 27 #include "platform/image-decoders/bmp/BMPImageDecoder.h" | 27 #include "platform/image-decoders/bmp/BMPImageDecoder.h" |
| 28 #include "platform/image-decoders/gif/GIFImageDecoder.h" | 28 #include "platform/image-decoders/gif/GIFImageDecoder.h" |
| 29 #include "platform/image-decoders/ico/ICOImageDecoder.h" | 29 #include "platform/image-decoders/ico/ICOImageDecoder.h" |
| 30 #include "platform/image-decoders/jpeg/JPEGImageDecoder.h" | 30 #include "platform/image-decoders/jpeg/JPEGImageDecoder.h" |
| 31 #include "platform/image-decoders/png/PNGImageDecoder.h" | 31 #include "platform/image-decoders/png/PNGImageDecoder.h" |
| 32 #include "platform/image-decoders/webp/WEBPImageDecoder.h" | 32 #include "platform/image-decoders/webp/WEBPImageDecoder.h" |
| 33 #include "platform/instrumentation/PlatformInstrumentation.h" | 33 #include "platform/instrumentation/PlatformInstrumentation.h" |
| 34 #include "wtf/PtrUtil.h" | 34 #include "platform/wtf/PtrUtil.h" |
| 35 | 35 |
| 36 namespace blink { | 36 namespace blink { |
| 37 | 37 |
| 38 inline bool matchesJPEGSignature(const char* contents) { | 38 inline bool matchesJPEGSignature(const char* contents) { |
| 39 return !memcmp(contents, "\xFF\xD8\xFF", 3); | 39 return !memcmp(contents, "\xFF\xD8\xFF", 3); |
| 40 } | 40 } |
| 41 | 41 |
| 42 inline bool matchesPNGSignature(const char* contents) { | 42 inline bool matchesPNGSignature(const char* contents) { |
| 43 return !memcmp(contents, "\x89PNG\r\n\x1A\n", 8); | 43 return !memcmp(contents, "\x89PNG\r\n\x1A\n", 8); |
| 44 } | 44 } |
| (...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 548 sk_sp<SkColorSpace> ImageDecoder::colorSpaceForSkImages() const { | 548 sk_sp<SkColorSpace> ImageDecoder::colorSpaceForSkImages() const { |
| 549 if (!m_colorBehavior.isTag()) | 549 if (!m_colorBehavior.isTag()) |
| 550 return nullptr; | 550 return nullptr; |
| 551 | 551 |
| 552 if (m_embeddedColorSpace) | 552 if (m_embeddedColorSpace) |
| 553 return m_embeddedColorSpace; | 553 return m_embeddedColorSpace; |
| 554 return SkColorSpace::MakeSRGB(); | 554 return SkColorSpace::MakeSRGB(); |
| 555 } | 555 } |
| 556 | 556 |
| 557 } // namespace blink | 557 } // namespace blink |
| OLD | NEW |