| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org> |
| 3 * Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved. | 3 * Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved. |
| 4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. | 4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 class WebGraphicsContext3D; | 63 class WebGraphicsContext3D; |
| 64 | 64 |
| 65 enum Multiply { | 65 enum Multiply { |
| 66 Premultiplied, | 66 Premultiplied, |
| 67 Unmultiplied | 67 Unmultiplied |
| 68 }; | 68 }; |
| 69 | 69 |
| 70 class PLATFORM_EXPORT ImageBuffer { | 70 class PLATFORM_EXPORT ImageBuffer { |
| 71 WTF_MAKE_NONCOPYABLE(ImageBuffer); WTF_MAKE_FAST_ALLOCATED(ImageBuffer); | 71 WTF_MAKE_NONCOPYABLE(ImageBuffer); WTF_MAKE_FAST_ALLOCATED(ImageBuffer); |
| 72 public: | 72 public: |
| 73 static PassOwnPtr<ImageBuffer> create(const IntSize&, OpacityMode = NonOpaqu
e); | 73 static PassOwnPtr<ImageBuffer> create(const IntSize&, OpacityMode = NonOpaqu
e, ImageInitializationMode = InitializeImagePixels); |
| 74 static PassOwnPtr<ImageBuffer> create(PassOwnPtr<ImageBufferSurface>); | 74 static PassOwnPtr<ImageBuffer> create(PassOwnPtr<ImageBufferSurface>); |
| 75 | 75 |
| 76 ~ImageBuffer(); | 76 ~ImageBuffer(); |
| 77 | 77 |
| 78 void setClient(ImageBufferClient* client) { m_client = client; } | 78 void setClient(ImageBufferClient* client) { m_client = client; } |
| 79 | 79 |
| 80 const IntSize& size() const { return m_surface->size(); } | 80 const IntSize& size() const { return m_surface->size(); } |
| 81 bool isAccelerated() const { return m_surface->isAccelerated(); } | 81 bool isAccelerated() const { return m_surface->isAccelerated(); } |
| 82 bool isRecording() const { return m_surface->isRecording(); } | 82 bool isRecording() const { return m_surface->isRecording(); } |
| 83 void setHasExpensiveOp() { m_surface->setHasExpensiveOp(); } | 83 void setHasExpensiveOp() { m_surface->setHasExpensiveOp(); } |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 int height() const { return m_size.height(); } | 160 int height() const { return m_size.height(); } |
| 161 int width() const { return m_size.width(); } | 161 int width() const { return m_size.width(); } |
| 162 | 162 |
| 163 const unsigned char* m_data; | 163 const unsigned char* m_data; |
| 164 const IntSize m_size; | 164 const IntSize m_size; |
| 165 }; | 165 }; |
| 166 | 166 |
| 167 } // namespace blink | 167 } // namespace blink |
| 168 | 168 |
| 169 #endif // ImageBuffer_h | 169 #endif // ImageBuffer_h |
| OLD | NEW |