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_GANESH_SURFACE_H_ |
| 6 #define SKY_SHELL_GPU_GANESH_SURFACE_H_ |
| 7 |
| 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "skia/ext/refptr.h" |
| 10 #include "sky/shell/gpu/ganesh_context.h" |
| 11 #include "third_party/skia/include/core/SkSurface.h" |
| 12 #include "ui/gfx/geometry/size.h" |
| 13 |
| 14 namespace sky { |
| 15 namespace shell { |
| 16 |
| 17 class GaneshSurface { |
| 18 public: |
| 19 GaneshSurface(GaneshContext* context, const gfx::Size& size); |
| 20 ~GaneshSurface(); |
| 21 |
| 22 SkCanvas* canvas() const { return surface_->getCanvas(); } |
| 23 gfx::Size size() const { |
| 24 return gfx::Size(surface_->width(), surface_->height()); |
| 25 } |
| 26 |
| 27 private: |
| 28 skia::RefPtr<SkSurface> surface_; |
| 29 |
| 30 DISALLOW_COPY_AND_ASSIGN(GaneshSurface); |
| 31 }; |
| 32 |
| 33 } // namespace shell |
| 34 } // namespace sky |
| 35 |
| 36 #endif // SKY_SHELL_GPU_GANESH_SURFACE_H_ |
OLD | NEW |