OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef SKY_SHELL_GPU_DRIVER_H_ |
| 6 #define SKY_SHELL_GPU_DRIVER_H_ |
| 7 |
| 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/memory/weak_ptr.h" |
| 10 #include "ui/gfx/native_widget_types.h" |
| 11 |
| 12 namespace gfx { |
| 13 class GLContext; |
| 14 class GLShareGroup; |
| 15 class GLSurface; |
| 16 } |
| 17 |
| 18 namespace sky { |
| 19 namespace shell { |
| 20 |
| 21 class GPUDriver { |
| 22 public: |
| 23 explicit GPUDriver(); |
| 24 ~GPUDriver(); |
| 25 |
| 26 base::WeakPtr<GPUDriver> GetWeakPtr(); |
| 27 |
| 28 void Init(gfx::AcceleratedWidget widget); |
| 29 |
| 30 private: |
| 31 scoped_refptr<gfx::GLShareGroup> share_group_; |
| 32 scoped_refptr<gfx::GLSurface> surface_; |
| 33 scoped_refptr<gfx::GLContext> context_; |
| 34 |
| 35 base::WeakPtrFactory<GPUDriver> weak_factory_; |
| 36 |
| 37 DISALLOW_COPY_AND_ASSIGN(GPUDriver); |
| 38 }; |
| 39 |
| 40 } // namespace shell |
| 41 } // namespace sky |
| 42 |
| 43 #endif // SKY_SHELL_GPU_DRIVER_H_ |
OLD | NEW |