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

Side by Side Diff: mojo/skia/ganesh_framebuffer_surface.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 | « mojo/skia/ganesh_context.cc ('k') | mojo/skia/ganesh_framebuffer_surface.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 MOJO_SKIA_GANESH_FRAMEBUFFER_SURFACE_H_ 5 #ifndef MOJO_SKIA_GANESH_FRAMEBUFFER_SURFACE_H_
6 #define MOJO_SKIA_GANESH_FRAMEBUFFER_SURFACE_H_ 6 #define MOJO_SKIA_GANESH_FRAMEBUFFER_SURFACE_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "mojo/skia/ganesh_context.h" 9 #include "mojo/skia/ganesh_context.h"
10 #include "skia/ext/refptr.h" 10 #include "third_party/skia/include/core/SkRefCnt.h"
11 #include "third_party/skia/include/core/SkSurface.h" 11 #include "third_party/skia/include/core/SkSurface.h"
12 12
13 namespace mojo { 13 namespace mojo {
14 namespace skia { 14 namespace skia {
15 15
16 // This class represents an SkSurface backed by a GL framebuffer, which is 16 // This class represents an SkSurface backed by a GL framebuffer, which is
17 // appropriate for use with Ganesh. This is useful for rendering Skia 17 // appropriate for use with Ganesh. This is useful for rendering Skia
18 // commands directly to the display framebuffer. 18 // commands directly to the display framebuffer.
19 class GaneshFramebufferSurface { 19 class GaneshFramebufferSurface {
20 public: 20 public:
21 // Creates a surface that wraps the currently bound GL framebuffer. 21 // Creates a surface that wraps the currently bound GL framebuffer.
22 // The size of the surface is determined by querying the current viewport. 22 // The size of the surface is determined by querying the current viewport.
23 explicit GaneshFramebufferSurface(const GaneshContext::Scope& scope); 23 explicit GaneshFramebufferSurface(const GaneshContext::Scope& scope);
24 ~GaneshFramebufferSurface(); 24 ~GaneshFramebufferSurface();
25 25
26 SkSurface* surface() const { return surface_.get(); } 26 SkSurface* surface() const { return surface_.get(); }
27 SkCanvas* canvas() const { return surface_->getCanvas(); } 27 SkCanvas* canvas() const { return surface_->getCanvas(); }
28 28
29 private: 29 private:
30 ::skia::RefPtr<SkSurface> surface_; 30 sk_sp<SkSurface> surface_;
31 31
32 DISALLOW_COPY_AND_ASSIGN(GaneshFramebufferSurface); 32 DISALLOW_COPY_AND_ASSIGN(GaneshFramebufferSurface);
33 }; 33 };
34 34
35 } // namespace skia 35 } // namespace skia
36 } // namespace mojo 36 } // namespace mojo
37 37
38 #endif // MOJO_SKIA_GANESH_FRAMEBUFFER_SURFACE_H_ 38 #endif // MOJO_SKIA_GANESH_FRAMEBUFFER_SURFACE_H_
OLDNEW
« no previous file with comments | « mojo/skia/ganesh_context.cc ('k') | mojo/skia/ganesh_framebuffer_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698