| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "sky/engine/core/painting/Drawable.h" |
| 6 #include "sky/engine/core/painting/Picture.h" |
| 7 |
| 8 namespace blink { |
| 9 |
| 10 PassRefPtr<Drawable> Drawable::create(PassRefPtr<SkDrawable> skDrawable) |
| 11 { |
| 12 ASSERT(skDrawable); |
| 13 return adoptRef(new Drawable(skDrawable)); |
| 14 } |
| 15 |
| 16 Drawable::Drawable(PassRefPtr<SkDrawable> skDrawable) |
| 17 : m_drawable(skDrawable) |
| 18 { |
| 19 } |
| 20 |
| 21 PassRefPtr<Picture> Drawable::newPictureSnapshot() |
| 22 { |
| 23 if (!m_drawable) |
| 24 return nullptr; |
| 25 return Picture::create( |
| 26 adoptRef(m_drawable->newPictureSnapshot())); |
| 27 } |
| 28 |
| 29 Drawable::~Drawable() |
| 30 { |
| 31 } |
| 32 |
| 33 } // namespace blink |
| OLD | NEW |