OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. |
3 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. | 3 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 Platform::kNoDecodedImageByteLimit; | 86 Platform::kNoDecodedImageByteLimit; |
87 | 87 |
88 enum AlphaOption { kAlphaPremultiplied, kAlphaNotPremultiplied }; | 88 enum AlphaOption { kAlphaPremultiplied, kAlphaNotPremultiplied }; |
89 | 89 |
90 virtual ~ImageDecoder() {} | 90 virtual ~ImageDecoder() {} |
91 | 91 |
92 // Returns a caller-owned decoder of the appropriate type. Returns nullptr if | 92 // Returns a caller-owned decoder of the appropriate type. Returns nullptr if |
93 // we can't sniff a supported type from the provided data (possibly | 93 // we can't sniff a supported type from the provided data (possibly |
94 // because there isn't enough data yet). | 94 // because there isn't enough data yet). |
95 // Sets m_maxDecodedBytes to Platform::maxImageDecodedBytes(). | 95 // Sets m_maxDecodedBytes to Platform::maxImageDecodedBytes(). |
96 static std::unique_ptr<ImageDecoder> Create(PassRefPtr<SegmentReader> data, | 96 static std::unique_ptr<ImageDecoder> Create(RefPtr<SegmentReader> data, |
97 bool data_complete, | 97 bool data_complete, |
98 AlphaOption, | 98 AlphaOption, |
99 const ColorBehavior&); | 99 const ColorBehavior&); |
100 static std::unique_ptr<ImageDecoder> Create( | 100 static std::unique_ptr<ImageDecoder> Create( |
101 PassRefPtr<SharedBuffer> data, | 101 PassRefPtr<SharedBuffer> data, |
102 bool data_complete, | 102 bool data_complete, |
103 AlphaOption alphaoption, | 103 AlphaOption alphaoption, |
104 const ColorBehavior& color_behavior) { | 104 const ColorBehavior& color_behavior) { |
105 return Create(SegmentReader::CreateFromSharedBuffer(std::move(data)), | 105 return Create(SegmentReader::CreateFromSharedBuffer(std::move(data)), |
106 data_complete, alphaoption, color_behavior); | 106 data_complete, alphaoption, color_behavior); |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
424 bool has_histogrammed_color_space_ = false; | 424 bool has_histogrammed_color_space_ = false; |
425 | 425 |
426 sk_sp<SkColorSpace> embedded_color_space_ = nullptr; | 426 sk_sp<SkColorSpace> embedded_color_space_ = nullptr; |
427 bool source_to_target_color_transform_needs_update_ = false; | 427 bool source_to_target_color_transform_needs_update_ = false; |
428 std::unique_ptr<SkColorSpaceXform> source_to_target_color_transform_; | 428 std::unique_ptr<SkColorSpaceXform> source_to_target_color_transform_; |
429 }; | 429 }; |
430 | 430 |
431 } // namespace blink | 431 } // namespace blink |
432 | 432 |
433 #endif | 433 #endif |
OLD | NEW |