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

Side by Side Diff: examples/ui/noodles/frame.h

Issue 2011713003: Roll skia to 8cc209111876b7c78b5ec577c9221d8ed5e21024 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 years, 6 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 | « examples/ui/jank/jank.cc ('k') | examples/ui/noodles/frame.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 EXAMPLES_UI_NOODLES_FRAME_H_ 5 #ifndef EXAMPLES_UI_NOODLES_FRAME_H_
6 #define EXAMPLES_UI_NOODLES_FRAME_H_ 6 #define EXAMPLES_UI_NOODLES_FRAME_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "mojo/services/geometry/interfaces/geometry.mojom.h" 9 #include "mojo/services/geometry/interfaces/geometry.mojom.h"
10 #include "mojo/services/gfx/composition/interfaces/scenes.mojom.h" 10 #include "mojo/services/gfx/composition/interfaces/scenes.mojom.h"
11 #include "skia/ext/refptr.h" 11 #include "third_party/skia/include/core/SkRefCnt.h"
12 12
13 class SkCanvas; 13 class SkCanvas;
14 class SkPicture; 14 class SkPicture;
15 15
16 namespace examples { 16 namespace examples {
17 17
18 // A frame of content to be rasterized. 18 // A frame of content to be rasterized.
19 // Instances of this object are created by the view's thread and sent to 19 // Instances of this object are created by the view's thread and sent to
20 // the rasterizer's thread to be drawn. 20 // the rasterizer's thread to be drawn.
21 class Frame { 21 class Frame {
22 public: 22 public:
23 Frame(const mojo::Size& size, 23 Frame(const mojo::Size& size,
24 skia::RefPtr<SkPicture> picture, 24 sk_sp<SkPicture> picture,
25 mojo::gfx::composition::SceneMetadataPtr scene_metadata); 25 mojo::gfx::composition::SceneMetadataPtr scene_metadata);
26 ~Frame(); 26 ~Frame();
27 27
28 const mojo::Size& size() { return size_; } 28 const mojo::Size& size() { return size_; }
29 29
30 mojo::gfx::composition::SceneMetadataPtr TakeSceneMetadata() { 30 mojo::gfx::composition::SceneMetadataPtr TakeSceneMetadata() {
31 return scene_metadata_.Pass(); 31 return scene_metadata_.Pass();
32 } 32 }
33 33
34 void Paint(SkCanvas* canvas); 34 void Paint(SkCanvas* canvas);
35 35
36 private: 36 private:
37 mojo::Size size_; 37 mojo::Size size_;
38 skia::RefPtr<SkPicture> picture_; 38 sk_sp<SkPicture> picture_;
39 mojo::gfx::composition::SceneMetadataPtr scene_metadata_; 39 mojo::gfx::composition::SceneMetadataPtr scene_metadata_;
40 40
41 DISALLOW_COPY_AND_ASSIGN(Frame); 41 DISALLOW_COPY_AND_ASSIGN(Frame);
42 }; 42 };
43 43
44 } // namespace examples 44 } // namespace examples
45 45
46 #endif // EXAMPLES_UI_NOODLES_FRAME_H_ 46 #endif // EXAMPLES_UI_NOODLES_FRAME_H_
OLDNEW
« no previous file with comments | « examples/ui/jank/jank.cc ('k') | examples/ui/noodles/frame.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698