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 14 matching lines...) Expand all Loading... |
25 */ | 25 */ |
26 | 26 |
27 #include "platform/graphics/FrameData.h" | 27 #include "platform/graphics/FrameData.h" |
28 | 28 |
29 namespace blink { | 29 namespace blink { |
30 | 30 |
31 FrameData::FrameData() | 31 FrameData::FrameData() |
32 : m_orientation(DefaultImageOrientation) | 32 : m_orientation(DefaultImageOrientation) |
33 , m_duration(0) | 33 , m_duration(0) |
34 , m_haveMetadata(false) | 34 , m_haveMetadata(false) |
35 , m_isComplete(false) | 35 , m_isFullyReceived(false) |
36 , m_hasAlpha(true) | 36 , m_hasAlpha(true) |
37 , m_frameBytes(0) | 37 , m_frameBytes(0) |
38 { | 38 { |
39 } | 39 } |
40 | 40 |
41 FrameData::~FrameData() | 41 FrameData::~FrameData() |
42 { | 42 { |
43 clear(true); | 43 clear(true); |
44 } | 44 } |
45 | 45 |
46 bool FrameData::clear(bool clearMetadata) | 46 bool FrameData::clear(bool clearMetadata) |
47 { | 47 { |
48 if (clearMetadata) | 48 if (clearMetadata) |
49 m_haveMetadata = false; | 49 m_haveMetadata = false; |
50 | 50 |
51 m_orientation = DefaultImageOrientation; | 51 m_orientation = DefaultImageOrientation; |
52 m_frameBytes = 0; | 52 m_frameBytes = 0; |
53 | 53 |
54 if (m_frame) { | 54 if (m_frame) { |
55 m_frame.clear(); | 55 m_frame.clear(); |
56 return true; | 56 return true; |
57 } | 57 } |
58 return false; | 58 return false; |
59 } | 59 } |
60 | 60 |
61 } // namespace blink | 61 } // namespace blink |
OLD | NEW |