| 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/output/gl_renderer.h" // For the GLC() macro. | 8 #include "cc/output/gl_renderer.h" // For the GLC() macro. |
| 9 #include "cc/output/output_surface.h" | 9 #include "cc/output/output_surface.h" |
| 10 #include "cc/quads/io_surface_draw_quad.h" | 10 #include "cc/quads/io_surface_draw_quad.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 if (io_surface_resource_id_) { | 31 if (io_surface_resource_id_) { |
| 32 ResourceProvider* resource_provider = | 32 ResourceProvider* resource_provider = |
| 33 layer_tree_impl()->resource_provider(); | 33 layer_tree_impl()->resource_provider(); |
| 34 resource_provider->DeleteResource(io_surface_resource_id_); | 34 resource_provider->DeleteResource(io_surface_resource_id_); |
| 35 io_surface_resource_id_ = 0; | 35 io_surface_resource_id_ = 0; |
| 36 } | 36 } |
| 37 } | 37 } |
| 38 | 38 |
| 39 scoped_ptr<LayerImpl> IOSurfaceLayerImpl::CreateLayerImpl( | 39 scoped_ptr<LayerImpl> IOSurfaceLayerImpl::CreateLayerImpl( |
| 40 LayerTreeImpl* tree_impl) { | 40 LayerTreeImpl* tree_impl) { |
| 41 return IOSurfaceLayerImpl::Create(tree_impl, id()).PassAs<LayerImpl>(); | 41 return IOSurfaceLayerImpl::Create(tree_impl, id()); |
| 42 } | 42 } |
| 43 | 43 |
| 44 void IOSurfaceLayerImpl::PushPropertiesTo(LayerImpl* layer) { | 44 void IOSurfaceLayerImpl::PushPropertiesTo(LayerImpl* layer) { |
| 45 LayerImpl::PushPropertiesTo(layer); | 45 LayerImpl::PushPropertiesTo(layer); |
| 46 | 46 |
| 47 IOSurfaceLayerImpl* io_surface_layer = | 47 IOSurfaceLayerImpl* io_surface_layer = |
| 48 static_cast<IOSurfaceLayerImpl*>(layer); | 48 static_cast<IOSurfaceLayerImpl*>(layer); |
| 49 io_surface_layer->SetIOSurfaceProperties(io_surface_id_, io_surface_size_); | 49 io_surface_layer->SetIOSurfaceProperties(io_surface_id_, io_surface_size_); |
| 50 } | 50 } |
| 51 | 51 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 | 109 |
| 110 io_surface_id_ = io_surface_id; | 110 io_surface_id_ = io_surface_id; |
| 111 io_surface_size_ = size; | 111 io_surface_size_ = size; |
| 112 } | 112 } |
| 113 | 113 |
| 114 const char* IOSurfaceLayerImpl::LayerTypeAsString() const { | 114 const char* IOSurfaceLayerImpl::LayerTypeAsString() const { |
| 115 return "cc::IOSurfaceLayerImpl"; | 115 return "cc::IOSurfaceLayerImpl"; |
| 116 } | 116 } |
| 117 | 117 |
| 118 } // namespace cc | 118 } // namespace cc |
| OLD | NEW |