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