| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 SKY_ENGINE_CORE_PAINTING_PAINTINGCONTEXT_H_ | 5 #ifndef SKY_ENGINE_CORE_PAINTING_PAINTINGCONTEXT_H_ |
| 6 #define SKY_ENGINE_CORE_PAINTING_PAINTINGCONTEXT_H_ | 6 #define SKY_ENGINE_CORE_PAINTING_PAINTINGCONTEXT_H_ |
| 7 | 7 |
| 8 #include "sky/engine/core/painting/Canvas.h" | 8 #include "sky/engine/core/painting/Canvas.h" |
| 9 #include "sky/engine/wtf/Vector.h" |
| 9 | 10 |
| 10 namespace blink { | 11 namespace blink { |
| 11 class Element; | 12 class Element; |
| 12 | 13 |
| 13 class PaintingContext : public Canvas { | 14 class PaintingContext : public Canvas { |
| 14 DEFINE_WRAPPERTYPEINFO(); | 15 DEFINE_WRAPPERTYPEINFO(); |
| 15 public: | 16 public: |
| 16 ~PaintingContext() override; | 17 ~PaintingContext() override; |
| 17 static PassRefPtr<PaintingContext> create(PassRefPtr<Element> element, const
FloatSize& size); | 18 static PassRefPtr<PaintingContext> create(PassRefPtr<Element> element, const
FloatSize& size); |
| 18 | 19 |
| 19 void commit(); | 20 void commit(); |
| 20 | 21 |
| 21 private: | 22 private: |
| 22 PaintingContext(PassRefPtr<Element> element, const FloatSize& size); | 23 PaintingContext(PassRefPtr<Element> element, const FloatSize& size); |
| 23 | 24 |
| 24 RefPtr<Element> m_element; | 25 RefPtr<Element> m_element; |
| 25 }; | 26 }; |
| 26 | 27 |
| 27 } // namespace blink | 28 } // namespace blink |
| 28 | 29 |
| 29 #endif // SKY_ENGINE_CORE_PAINTING_PAINTINGCONTEXT_H_ | 30 #endif // SKY_ENGINE_CORE_PAINTING_PAINTINGCONTEXT_H_ |
| OLD | NEW |