| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 | 71 |
| 72 class PLATFORM_EXPORT ImageBuffer { | 72 class PLATFORM_EXPORT ImageBuffer { |
| 73 WTF_MAKE_NONCOPYABLE(ImageBuffer); | 73 WTF_MAKE_NONCOPYABLE(ImageBuffer); |
| 74 USING_FAST_MALLOC(ImageBuffer); | 74 USING_FAST_MALLOC(ImageBuffer); |
| 75 | 75 |
| 76 public: | 76 public: |
| 77 static std::unique_ptr<ImageBuffer> Create( | 77 static std::unique_ptr<ImageBuffer> Create( |
| 78 const IntSize&, | 78 const IntSize&, |
| 79 OpacityMode = kNonOpaque, | 79 OpacityMode = kNonOpaque, |
| 80 ImageInitializationMode = kInitializeImagePixels, | 80 ImageInitializationMode = kInitializeImagePixels, |
| 81 sk_sp<SkColorSpace> = nullptr); | 81 const CanvasColorParams& = CanvasColorParams()); |
| 82 static std::unique_ptr<ImageBuffer> Create( | 82 static std::unique_ptr<ImageBuffer> Create( |
| 83 std::unique_ptr<ImageBufferSurface>); | 83 std::unique_ptr<ImageBufferSurface>); |
| 84 | 84 |
| 85 virtual ~ImageBuffer(); | 85 virtual ~ImageBuffer(); |
| 86 | 86 |
| 87 void SetClient(ImageBufferClient* client) { client_ = client; } | 87 void SetClient(ImageBufferClient* client) { client_ = client; } |
| 88 | 88 |
| 89 static bool CanCreateImageBuffer(const IntSize&); | 89 static bool CanCreateImageBuffer(const IntSize&); |
| 90 const IntSize& size() const { return surface_->size(); } | 90 const IntSize& size() const { return surface_->size(); } |
| 91 bool IsAccelerated() const { return surface_->IsAccelerated(); } | 91 bool IsAccelerated() const { return surface_->IsAccelerated(); } |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 int Height() const { return size_.Height(); } | 213 int Height() const { return size_.Height(); } |
| 214 int Width() const { return size_.Width(); } | 214 int Width() const { return size_.Width(); } |
| 215 | 215 |
| 216 const unsigned char* data_; | 216 const unsigned char* data_; |
| 217 const IntSize size_; | 217 const IntSize size_; |
| 218 }; | 218 }; |
| 219 | 219 |
| 220 } // namespace blink | 220 } // namespace blink |
| 221 | 221 |
| 222 #endif // ImageBuffer_h | 222 #endif // ImageBuffer_h |
| OLD | NEW |