| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 CC_OUTPUT_SOFTWARE_OUTPUT_DEVICE_H_ | 5 #ifndef CC_OUTPUT_SOFTWARE_OUTPUT_DEVICE_H_ |
| 6 #define CC_OUTPUT_SOFTWARE_OUTPUT_DEVICE_H_ | 6 #define CC_OUTPUT_SOFTWARE_OUTPUT_DEVICE_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 9 |
| 8 #include "base/macros.h" | 10 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" | |
| 10 #include "cc/base/cc_export.h" | 11 #include "cc/base/cc_export.h" |
| 11 #include "third_party/skia/include/core/SkSurface.h" | 12 #include "third_party/skia/include/core/SkSurface.h" |
| 12 #include "ui/gfx/geometry/rect.h" | 13 #include "ui/gfx/geometry/rect.h" |
| 13 #include "ui/gfx/geometry/size.h" | 14 #include "ui/gfx/geometry/size.h" |
| 14 #include "ui/gfx/geometry/vector2d.h" | 15 #include "ui/gfx/geometry/vector2d.h" |
| 15 | 16 |
| 16 class SkBitmap; | 17 class SkBitmap; |
| 17 class SkCanvas; | 18 class SkCanvas; |
| 18 | 19 |
| 19 namespace gfx { | 20 namespace gfx { |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 | 54 |
| 54 // VSyncProvider used to update the timer used to schedule draws with the | 55 // VSyncProvider used to update the timer used to schedule draws with the |
| 55 // hardware vsync. Return NULL if a provider doesn't exist. | 56 // hardware vsync. Return NULL if a provider doesn't exist. |
| 56 virtual gfx::VSyncProvider* GetVSyncProvider(); | 57 virtual gfx::VSyncProvider* GetVSyncProvider(); |
| 57 | 58 |
| 58 protected: | 59 protected: |
| 59 gfx::Size viewport_pixel_size_; | 60 gfx::Size viewport_pixel_size_; |
| 60 float scale_factor_; | 61 float scale_factor_; |
| 61 gfx::Rect damage_rect_; | 62 gfx::Rect damage_rect_; |
| 62 sk_sp<SkSurface> surface_; | 63 sk_sp<SkSurface> surface_; |
| 63 scoped_ptr<gfx::VSyncProvider> vsync_provider_; | 64 std::unique_ptr<gfx::VSyncProvider> vsync_provider_; |
| 64 | 65 |
| 65 private: | 66 private: |
| 66 DISALLOW_COPY_AND_ASSIGN(SoftwareOutputDevice); | 67 DISALLOW_COPY_AND_ASSIGN(SoftwareOutputDevice); |
| 67 }; | 68 }; |
| 68 | 69 |
| 69 } // namespace cc | 70 } // namespace cc |
| 70 | 71 |
| 71 #endif // CC_OUTPUT_SOFTWARE_OUTPUT_DEVICE_H_ | 72 #endif // CC_OUTPUT_SOFTWARE_OUTPUT_DEVICE_H_ |
| OLD | NEW |