OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
3 * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. 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 17 matching lines...) Expand all Loading... |
28 #include "platform/graphics/FrameData.h" | 28 #include "platform/graphics/FrameData.h" |
29 | 29 |
30 namespace blink { | 30 namespace blink { |
31 | 31 |
32 FrameData::FrameData() | 32 FrameData::FrameData() |
33 : m_orientation(DefaultImageOrientation) | 33 : m_orientation(DefaultImageOrientation) |
34 , m_duration(0) | 34 , m_duration(0) |
35 , m_haveMetadata(false) | 35 , m_haveMetadata(false) |
36 , m_isComplete(false) | 36 , m_isComplete(false) |
37 , m_hasAlpha(true) | 37 , m_hasAlpha(true) |
38 , m_isLazyDecoded(false) | |
39 , m_frameBytes(0) | 38 , m_frameBytes(0) |
40 { | 39 { |
41 } | 40 } |
42 | 41 |
43 FrameData::~FrameData() | 42 FrameData::~FrameData() |
44 { | 43 { |
45 clear(true); | 44 clear(true); |
46 } | 45 } |
47 | 46 |
48 bool FrameData::clear(bool clearMetadata) | 47 bool FrameData::clear(bool clearMetadata) |
49 { | 48 { |
50 if (clearMetadata) | 49 if (clearMetadata) |
51 m_haveMetadata = false; | 50 m_haveMetadata = false; |
52 | 51 |
53 m_orientation = DefaultImageOrientation; | 52 m_orientation = DefaultImageOrientation; |
54 m_isLazyDecoded = false; | |
55 m_frameBytes = 0; | 53 m_frameBytes = 0; |
56 | 54 |
57 if (m_frame) { | 55 if (m_frame) { |
58 m_frame.clear(); | 56 m_frame.clear(); |
59 return true; | 57 return true; |
60 } | 58 } |
61 return false; | 59 return false; |
62 } | 60 } |
63 | 61 |
64 } // namespace blink | 62 } // namespace blink |
OLD | NEW |