| 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" |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 // and the index of the current buffer is |current_buffer_|. | 59 // and the index of the current buffer is |current_buffer_|. |
| 60 base::ScopedCFTypeRef<IOSurfaceRef> io_surfaces_[2]; | 60 base::ScopedCFTypeRef<IOSurfaceRef> io_surfaces_[2]; |
| 61 int current_index_; | 61 int current_index_; |
| 62 | 62 |
| 63 // The previous frame's damage rectangle. Used to copy unchanged content | 63 // The previous frame's damage rectangle. Used to copy unchanged content |
| 64 // between buffers in CopyPreviousBufferDamage. | 64 // between buffers in CopyPreviousBufferDamage. |
| 65 SkRegion previous_buffer_damage_region_; | 65 SkRegion previous_buffer_damage_region_; |
| 66 | 66 |
| 67 // The SkCanvas wrapps the mapped current IOSurface. It is valid only between | 67 // The SkCanvas wrapps the mapped current IOSurface. It is valid only between |
| 68 // BeginPaint and EndPaint. | 68 // BeginPaint and EndPaint. |
| 69 std::unique_ptr<SkCanvas> canvas_; | 69 sk_sp<SkCanvas> canvas_; |
| 70 | 70 |
| 71 gfx::VSyncProvider::UpdateVSyncCallback update_vsync_callback_; | 71 gfx::VSyncProvider::UpdateVSyncCallback update_vsync_callback_; |
| 72 | 72 |
| 73 DISALLOW_COPY_AND_ASSIGN(SoftwareOutputDeviceMac); | 73 DISALLOW_COPY_AND_ASSIGN(SoftwareOutputDeviceMac); |
| 74 }; | 74 }; |
| 75 | 75 |
| 76 } // namespace content | 76 } // namespace content |
| 77 | 77 |
| 78 #endif // CONTENT_BROWSER_COMPOSITOR_SOFTWARE_OUTPUT_DEVICE_MAC_H_ | 78 #endif // CONTENT_BROWSER_COMPOSITOR_SOFTWARE_OUTPUT_DEVICE_MAC_H_ |
| OLD | NEW |