| 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 #include "cc/layers/io_surface_layer_impl.h" | 5 #include "cc/layers/io_surface_layer_impl.h" |
| 6 | 6 |
| 7 #include "base/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
| 8 #include "cc/layers/quad_sink.h" | 8 #include "cc/layers/quad_sink.h" |
| 9 #include "cc/output/gl_renderer.h" // For the GLC() macro. | 9 #include "cc/output/gl_renderer.h" // For the GLC() macro. |
| 10 #include "cc/output/output_surface.h" | 10 #include "cc/output/output_surface.h" |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 } | 124 } |
| 125 | 125 |
| 126 void IOSurfaceLayerImpl::ReleaseResources() { | 126 void IOSurfaceLayerImpl::ReleaseResources() { |
| 127 // We don't have a valid texture ID in the new context; however, | 127 // We don't have a valid texture ID in the new context; however, |
| 128 // the IOSurface is still valid. | 128 // the IOSurface is still valid. |
| 129 DestroyTexture(); | 129 DestroyTexture(); |
| 130 io_surface_changed_ = true; | 130 io_surface_changed_ = true; |
| 131 } | 131 } |
| 132 | 132 |
| 133 void IOSurfaceLayerImpl::SetIOSurfaceProperties(unsigned io_surface_id, | 133 void IOSurfaceLayerImpl::SetIOSurfaceProperties(unsigned io_surface_id, |
| 134 gfx::Size size) { | 134 const gfx::Size& size) { |
| 135 if (io_surface_id_ != io_surface_id) | 135 if (io_surface_id_ != io_surface_id) |
| 136 io_surface_changed_ = true; | 136 io_surface_changed_ = true; |
| 137 | 137 |
| 138 io_surface_id_ = io_surface_id; | 138 io_surface_id_ = io_surface_id; |
| 139 io_surface_size_ = size; | 139 io_surface_size_ = size; |
| 140 } | 140 } |
| 141 | 141 |
| 142 const char* IOSurfaceLayerImpl::LayerTypeAsString() const { | 142 const char* IOSurfaceLayerImpl::LayerTypeAsString() const { |
| 143 return "cc::IOSurfaceLayerImpl"; | 143 return "cc::IOSurfaceLayerImpl"; |
| 144 } | 144 } |
| 145 | 145 |
| 146 } // namespace cc | 146 } // namespace cc |
| OLD | NEW |