Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(882)

Side by Side Diff: sky/engine/core/painting/Drawable.cpp

Issue 1221583003: Add APIs for dynamic display lists, using SkDrawable and SkPictureRecorder::endRecordingAsDrawable. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sky/engine/core/painting/Drawable.h ('k') | sky/engine/core/painting/Drawable.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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
OLDNEW
« no previous file with comments | « sky/engine/core/painting/Drawable.h ('k') | sky/engine/core/painting/Drawable.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698