| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013, Google Inc. All rights reserved. | 2 * Copyright (c) 2013, Google 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 namespace blink { | 41 namespace blink { |
| 42 | 42 |
| 43 class PLATFORM_EXPORT AcceleratedImageBufferSurface | 43 class PLATFORM_EXPORT AcceleratedImageBufferSurface |
| 44 : public ImageBufferSurface { | 44 : public ImageBufferSurface { |
| 45 WTF_MAKE_NONCOPYABLE(AcceleratedImageBufferSurface); | 45 WTF_MAKE_NONCOPYABLE(AcceleratedImageBufferSurface); |
| 46 USING_FAST_MALLOC(AcceleratedImageBufferSurface); | 46 USING_FAST_MALLOC(AcceleratedImageBufferSurface); |
| 47 | 47 |
| 48 public: | 48 public: |
| 49 AcceleratedImageBufferSurface(const IntSize&, | 49 AcceleratedImageBufferSurface(const IntSize&, |
| 50 OpacityMode = kNonOpaque, | 50 OpacityMode = kNonOpaque, |
| 51 sk_sp<SkColorSpace> = nullptr, | 51 const CanvasColorParams& = CanvasColorParams()); |
| 52 SkColorType = kN32_SkColorType); | |
| 53 ~AcceleratedImageBufferSurface() override {} | 52 ~AcceleratedImageBufferSurface() override {} |
| 54 | 53 |
| 55 PaintCanvas* Canvas() override { return canvas_.get(); } | 54 PaintCanvas* Canvas() override { return canvas_.get(); } |
| 56 bool IsValid() const override; | 55 bool IsValid() const override; |
| 57 bool IsAccelerated() const override { return true; } | 56 bool IsAccelerated() const override { return true; } |
| 58 sk_sp<SkImage> NewImageSnapshot(AccelerationHint, SnapshotReason) override; | 57 sk_sp<SkImage> NewImageSnapshot(AccelerationHint, SnapshotReason) override; |
| 59 GLuint GetBackingTextureHandleForOverwrite() override; | 58 GLuint GetBackingTextureHandleForOverwrite() override; |
| 60 | 59 |
| 61 private: | 60 private: |
| 62 unsigned context_id_; | 61 unsigned context_id_; |
| 63 sk_sp<SkSurface> surface_; // Uses m_contextProvider. | 62 sk_sp<SkSurface> surface_; // Uses m_contextProvider. |
| 64 std::unique_ptr<PaintCanvas> canvas_; | 63 std::unique_ptr<PaintCanvas> canvas_; |
| 65 }; | 64 }; |
| 66 | 65 |
| 67 } // namespace blink | 66 } // namespace blink |
| 68 | 67 |
| 69 #endif | 68 #endif |
| OLD | NEW |