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

Side by Side Diff: sky/shell/gpu/rasterizer.h

Issue 936883002: Connect Sky and Ganesh in SkyShell (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Address review comments Created 5 years, 10 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/shell/gpu/ganesh_surface.cc ('k') | sky/shell/gpu/rasterizer.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 SKY_SHELL_GPU_RASTERIZER_H_ 5 #ifndef SKY_SHELL_GPU_RASTERIZER_H_
6 #define SKY_SHELL_GPU_RASTERIZER_H_ 6 #define SKY_SHELL_GPU_RASTERIZER_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "skia/ext/refptr.h" 10 #include "skia/ext/refptr.h"
(...skipping 16 matching lines...) Expand all
27 27
28 class Rasterizer : public GPUDelegate { 28 class Rasterizer : public GPUDelegate {
29 public: 29 public:
30 explicit Rasterizer(); 30 explicit Rasterizer();
31 ~Rasterizer(); 31 ~Rasterizer();
32 32
33 base::WeakPtr<Rasterizer> GetWeakPtr(); 33 base::WeakPtr<Rasterizer> GetWeakPtr();
34 34
35 void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget) override; 35 void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget) override;
36 void OnOutputSurfaceDestroyed() override; 36 void OnOutputSurfaceDestroyed() override;
37 37 void Draw(skia::RefPtr<SkPicture> picture) override;
38 void Draw(skia::RefPtr<SkPicture> picture);
39 38
40 private: 39 private:
41 bool CreateGLContext(); 40 void EnsureGLContext();
42 void EnsureGaneshSurface(const gfx::Size& size); 41 void EnsureGaneshSurface(const gfx::Size& size);
43 42
44 scoped_refptr<gfx::GLShareGroup> share_group_; 43 scoped_refptr<gfx::GLShareGroup> share_group_;
45 scoped_refptr<gfx::GLSurface> surface_; 44 scoped_refptr<gfx::GLSurface> surface_;
46 scoped_refptr<gfx::GLContext> context_; 45 scoped_refptr<gfx::GLContext> context_;
47 46
48 scoped_ptr<GaneshContext> ganesh_context_; 47 scoped_ptr<GaneshContext> ganesh_context_;
49 scoped_ptr<GaneshSurface> ganesh_surface_; 48 scoped_ptr<GaneshSurface> ganesh_surface_;
50 49
51 base::WeakPtrFactory<Rasterizer> weak_factory_; 50 base::WeakPtrFactory<Rasterizer> weak_factory_;
52 51
53 DISALLOW_COPY_AND_ASSIGN(Rasterizer); 52 DISALLOW_COPY_AND_ASSIGN(Rasterizer);
54 }; 53 };
55 54
56 } // namespace shell 55 } // namespace shell
57 } // namespace sky 56 } // namespace sky
58 57
59 #endif // SKY_SHELL_GPU_RASTERIZER_H_ 58 #endif // SKY_SHELL_GPU_RASTERIZER_H_
OLDNEW
« no previous file with comments | « sky/shell/gpu/ganesh_surface.cc ('k') | sky/shell/gpu/rasterizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698