| 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 #include "content/common/gpu/image_transport_surface_iosurface_mac.h" | 5 #include "content/common/gpu/image_transport_surface_iosurface_mac.h" |
| 6 | 6 |
| 7 #include "content/common/gpu/gpu_messages.h" | 7 #include "content/common/gpu/gpu_messages.h" |
| 8 #include "content/common/gpu/surface_handle_types_mac.h" | 8 #include "ui/compositor/mac/surface_handle_types_mac.h" |
| 9 | 9 |
| 10 namespace content { | 10 namespace content { |
| 11 namespace { | 11 namespace { |
| 12 | 12 |
| 13 // IOSurface dimensions will be rounded up to a multiple of this value in order | 13 // IOSurface dimensions will be rounded up to a multiple of this value in order |
| 14 // to reduce memory thrashing during resize. This must be a power of 2. | 14 // to reduce memory thrashing during resize. This must be a power of 2. |
| 15 const uint32 kIOSurfaceDimensionRoundup = 64; | 15 const uint32 kIOSurfaceDimensionRoundup = 64; |
| 16 | 16 |
| 17 int RoundUpSurfaceDimension(int number) { | 17 int RoundUpSurfaceDimension(int number) { |
| 18 DCHECK(number >= 0); | 18 DCHECK(number >= 0); |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 void IOSurfaceStorageProvider::DiscardBackbuffer() { | 124 void IOSurfaceStorageProvider::DiscardBackbuffer() { |
| 125 } | 125 } |
| 126 | 126 |
| 127 void IOSurfaceStorageProvider::SwapBuffersAckedByBrowser( | 127 void IOSurfaceStorageProvider::SwapBuffersAckedByBrowser( |
| 128 bool disable_throttling) { | 128 bool disable_throttling) { |
| 129 DCHECK(!pending_swapped_surfaces_.empty()); | 129 DCHECK(!pending_swapped_surfaces_.empty()); |
| 130 pending_swapped_surfaces_.pop_front(); | 130 pending_swapped_surfaces_.pop_front(); |
| 131 } | 131 } |
| 132 | 132 |
| 133 } // namespace content | 133 } // namespace content |
| OLD | NEW |