OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CONTENT_BROWSER_COMPOSITOR_SOFTWARE_OUTPUT_DEVICE_MAC_H_ | 5 #ifndef CONTENT_BROWSER_COMPOSITOR_SOFTWARE_OUTPUT_DEVICE_MAC_H_ |
6 #define CONTENT_BROWSER_COMPOSITOR_SOFTWARE_OUTPUT_DEVICE_MAC_H_ | 6 #define CONTENT_BROWSER_COMPOSITOR_SOFTWARE_OUTPUT_DEVICE_MAC_H_ |
7 | 7 |
8 #include <IOSurface/IOSurface.h> | 8 #include <IOSurface/IOSurface.h> |
9 | 9 |
10 #include "base/mac/scoped_cftyperef.h" | 10 #include "base/mac/scoped_cftyperef.h" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "cc/output/software_output_device.h" | 12 #include "cc/output/software_output_device.h" |
| 13 #include "third_party/skia/include/core/SkCanvas.h" |
| 14 #include "third_party/skia/include/core/SkRefCnt.h" |
13 #include "third_party/skia/include/core/SkRegion.h" | 15 #include "third_party/skia/include/core/SkRegion.h" |
14 #include "ui/gfx/vsync_provider.h" | 16 #include "ui/gfx/vsync_provider.h" |
15 | 17 |
16 namespace gfx { | 18 namespace gfx { |
17 class Canvas; | 19 class Canvas; |
18 } | 20 } |
19 | 21 |
20 namespace ui { | 22 namespace ui { |
21 class Compositor; | 23 class Compositor; |
22 } | 24 } |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 // and the index of the current buffer is |current_buffer_|. | 58 // and the index of the current buffer is |current_buffer_|. |
57 base::ScopedCFTypeRef<IOSurfaceRef> io_surfaces_[2]; | 59 base::ScopedCFTypeRef<IOSurfaceRef> io_surfaces_[2]; |
58 int current_index_; | 60 int current_index_; |
59 | 61 |
60 // The previous frame's damage rectangle. Used to copy unchanged content | 62 // The previous frame's damage rectangle. Used to copy unchanged content |
61 // between buffers in CopyPreviousBufferDamage. | 63 // between buffers in CopyPreviousBufferDamage. |
62 SkRegion previous_buffer_damage_region_; | 64 SkRegion previous_buffer_damage_region_; |
63 | 65 |
64 // The SkCanvas wrapps the mapped current IOSurface. It is valid only between | 66 // The SkCanvas wrapps the mapped current IOSurface. It is valid only between |
65 // BeginPaint and EndPaint. | 67 // BeginPaint and EndPaint. |
66 skia::RefPtr<SkCanvas> canvas_; | 68 sk_sp<SkCanvas> canvas_; |
67 | 69 |
68 gfx::VSyncProvider::UpdateVSyncCallback update_vsync_callback_; | 70 gfx::VSyncProvider::UpdateVSyncCallback update_vsync_callback_; |
69 | 71 |
70 DISALLOW_COPY_AND_ASSIGN(SoftwareOutputDeviceMac); | 72 DISALLOW_COPY_AND_ASSIGN(SoftwareOutputDeviceMac); |
71 }; | 73 }; |
72 | 74 |
73 } // namespace content | 75 } // namespace content |
74 | 76 |
75 #endif // CONTENT_BROWSER_COMPOSITOR_SOFTWARE_OUTPUT_DEVICE_MAC_H_ | 77 #endif // CONTENT_BROWSER_COMPOSITOR_SOFTWARE_OUTPUT_DEVICE_MAC_H_ |
OLD | NEW |