| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef OffscreenCanvasRenderingContext2D_h | 5 #ifndef OffscreenCanvasRenderingContext2D_h |
| 6 #define OffscreenCanvasRenderingContext2D_h | 6 #define OffscreenCanvasRenderingContext2D_h |
| 7 | 7 |
| 8 #include "core/html/canvas/CanvasContextCreationAttributes.h" | 8 #include "core/html/canvas/CanvasContextCreationAttributes.h" |
| 9 #include "core/html/canvas/CanvasRenderingContext.h" | 9 #include "core/html/canvas/CanvasRenderingContext.h" |
| 10 #include "core/html/canvas/CanvasRenderingContextFactory.h" | 10 #include "core/html/canvas/CanvasRenderingContextFactory.h" |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 CanvasRenderingContext::NeedsFinalizeFrame(); | 106 CanvasRenderingContext::NeedsFinalizeFrame(); |
| 107 } | 107 } |
| 108 | 108 |
| 109 private: | 109 private: |
| 110 bool needs_matrix_clip_restore_ = false; | 110 bool needs_matrix_clip_restore_ = false; |
| 111 std::unique_ptr<ImageBuffer> image_buffer_; | 111 std::unique_ptr<ImageBuffer> image_buffer_; |
| 112 | 112 |
| 113 bool IsPaintable() const final; | 113 bool IsPaintable() const final; |
| 114 | 114 |
| 115 RefPtr<StaticBitmapImage> TransferToStaticBitmapImage(); | 115 RefPtr<StaticBitmapImage> TransferToStaticBitmapImage(); |
| 116 |
| 117 CanvasColorSpace ColorSpace() const override; |
| 118 String ColorSpaceAsString() const override; |
| 119 CanvasPixelFormat PixelFormat() const override; |
| 116 }; | 120 }; |
| 117 | 121 |
| 118 // TODO(fserb): remove this. | 122 // TODO(fserb): remove this. |
| 119 DEFINE_TYPE_CASTS(OffscreenCanvasRenderingContext2D, | 123 DEFINE_TYPE_CASTS(OffscreenCanvasRenderingContext2D, |
| 120 CanvasRenderingContext, | 124 CanvasRenderingContext, |
| 121 context, | 125 context, |
| 122 context->Is2d() && context->host(), | 126 context->Is2d() && context->host(), |
| 123 context.Is2d() && context.host()); | 127 context.Is2d() && context.host()); |
| 124 | 128 |
| 125 } // namespace blink | 129 } // namespace blink |
| 126 | 130 |
| 127 #endif // OffscreenCanvasRenderingContext2D_h | 131 #endif // OffscreenCanvasRenderingContext2D_h |
| OLD | NEW |