OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008, 2009 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 static PassRefPtrWillBeRawPtr<ImageData> create(DOMUint8ClampedArray*, unsig
ned width, unsigned height, ExceptionState&); | 51 static PassRefPtrWillBeRawPtr<ImageData> create(DOMUint8ClampedArray*, unsig
ned width, unsigned height, ExceptionState&); |
52 | 52 |
53 IntSize size() const { return m_size; } | 53 IntSize size() const { return m_size; } |
54 int width() const { return m_size.width(); } | 54 int width() const { return m_size.width(); } |
55 int height() const { return m_size.height(); } | 55 int height() const { return m_size.height(); } |
56 const DOMUint8ClampedArray* data() const { return m_data.get(); } | 56 const DOMUint8ClampedArray* data() const { return m_data.get(); } |
57 DOMUint8ClampedArray* data() { return m_data.get(); } | 57 DOMUint8ClampedArray* data() { return m_data.get(); } |
58 | 58 |
59 DEFINE_INLINE_TRACE() { } | 59 DEFINE_INLINE_TRACE() { } |
60 | 60 |
61 virtual v8::Handle<v8::Object> associateWithWrapper(v8::Isolate*, const Wrap
perTypeInfo*, v8::Handle<v8::Object> wrapper) override; | 61 virtual v8::Local<v8::Object> associateWithWrapper(v8::Isolate*, const Wrapp
erTypeInfo*, v8::Local<v8::Object> wrapper) override; |
62 | 62 |
63 private: | 63 private: |
64 explicit ImageData(const IntSize&); | 64 explicit ImageData(const IntSize&); |
65 ImageData(const IntSize&, PassRefPtr<DOMUint8ClampedArray>); | 65 ImageData(const IntSize&, PassRefPtr<DOMUint8ClampedArray>); |
66 | 66 |
67 static bool validateConstructorArguments(DOMUint8ClampedArray*, unsigned wid
th, unsigned&, ExceptionState&); | 67 static bool validateConstructorArguments(DOMUint8ClampedArray*, unsigned wid
th, unsigned&, ExceptionState&); |
68 | 68 |
69 IntSize m_size; | 69 IntSize m_size; |
70 RefPtr<DOMUint8ClampedArray> m_data; | 70 RefPtr<DOMUint8ClampedArray> m_data; |
71 }; | 71 }; |
72 | 72 |
73 } // namespace blink | 73 } // namespace blink |
74 | 74 |
75 #endif // ImageData_h | 75 #endif // ImageData_h |
OLD | NEW |