OLD | NEW |
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 20 matching lines...) Expand all Loading... |
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 void Draw(skia::RefPtr<SkPicture> picture) override; | 37 void Draw(skia::RefPtr<SkPicture> picture) override; |
38 | 38 |
39 private: | 39 private: |
40 void EnsureGLContext(); | 40 void EnsureGLContext(); |
41 void EnsureGaneshSurface(const gfx::Size& size); | 41 void EnsureGaneshSurface(intptr_t window_fbo, const gfx::Size& size); |
42 void DrawPicture(SkPicture* picture); | 42 void DrawPicture(SkPicture* picture); |
43 | 43 |
44 scoped_refptr<gfx::GLShareGroup> share_group_; | 44 scoped_refptr<gfx::GLShareGroup> share_group_; |
45 scoped_refptr<gfx::GLSurface> surface_; | 45 scoped_refptr<gfx::GLSurface> surface_; |
46 scoped_refptr<gfx::GLContext> context_; | 46 scoped_refptr<gfx::GLContext> context_; |
47 | 47 |
48 scoped_ptr<GaneshContext> ganesh_context_; | 48 scoped_ptr<GaneshContext> ganesh_context_; |
49 scoped_ptr<GaneshSurface> ganesh_surface_; | 49 scoped_ptr<GaneshSurface> ganesh_surface_; |
50 | 50 |
51 base::WeakPtrFactory<Rasterizer> weak_factory_; | 51 base::WeakPtrFactory<Rasterizer> weak_factory_; |
52 | 52 |
53 DISALLOW_COPY_AND_ASSIGN(Rasterizer); | 53 DISALLOW_COPY_AND_ASSIGN(Rasterizer); |
54 }; | 54 }; |
55 | 55 |
56 } // namespace shell | 56 } // namespace shell |
57 } // namespace sky | 57 } // namespace sky |
58 | 58 |
59 #endif // SKY_SHELL_GPU_RASTERIZER_H_ | 59 #endif // SKY_SHELL_GPU_RASTERIZER_H_ |
OLD | NEW |