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/output_surface.h" | 8 #include "cc/output/output_surface.h" |
9 #include "cc/quads/io_surface_draw_quad.h" | 9 #include "cc/quads/io_surface_draw_quad.h" |
10 #include "cc/trees/layer_tree_impl.h" | 10 #include "cc/trees/layer_tree_impl.h" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 render_pass, content_bounds(), shared_quad_state, append_quads_data); | 70 render_pass, content_bounds(), shared_quad_state, append_quads_data); |
71 | 71 |
72 gfx::Rect quad_rect(content_bounds()); | 72 gfx::Rect quad_rect(content_bounds()); |
73 gfx::Rect opaque_rect(contents_opaque() ? quad_rect : gfx::Rect()); | 73 gfx::Rect opaque_rect(contents_opaque() ? quad_rect : gfx::Rect()); |
74 gfx::Rect visible_quad_rect = | 74 gfx::Rect visible_quad_rect = |
75 draw_properties().occlusion_in_content_space.GetUnoccludedContentRect( | 75 draw_properties().occlusion_in_content_space.GetUnoccludedContentRect( |
76 quad_rect); | 76 quad_rect); |
77 if (visible_quad_rect.IsEmpty()) | 77 if (visible_quad_rect.IsEmpty()) |
78 return; | 78 return; |
79 | 79 |
| 80 // TODO(danakj): crbug.com/455931 |
| 81 layer_tree_impl()->resource_provider()->ValidateResource( |
| 82 io_surface_resource_id_); |
80 IOSurfaceDrawQuad* quad = | 83 IOSurfaceDrawQuad* quad = |
81 render_pass->CreateAndAppendDrawQuad<IOSurfaceDrawQuad>(); | 84 render_pass->CreateAndAppendDrawQuad<IOSurfaceDrawQuad>(); |
82 quad->SetNew(shared_quad_state, | 85 quad->SetNew(shared_quad_state, |
83 quad_rect, | 86 quad_rect, |
84 opaque_rect, | 87 opaque_rect, |
85 visible_quad_rect, | 88 visible_quad_rect, |
86 io_surface_size_, | 89 io_surface_size_, |
87 io_surface_resource_id_, | 90 io_surface_resource_id_, |
88 IOSurfaceDrawQuad::FLIPPED); | 91 IOSurfaceDrawQuad::FLIPPED); |
89 } | 92 } |
(...skipping 12 matching lines...) Expand all Loading... |
102 | 105 |
103 io_surface_id_ = io_surface_id; | 106 io_surface_id_ = io_surface_id; |
104 io_surface_size_ = size; | 107 io_surface_size_ = size; |
105 } | 108 } |
106 | 109 |
107 const char* IOSurfaceLayerImpl::LayerTypeAsString() const { | 110 const char* IOSurfaceLayerImpl::LayerTypeAsString() const { |
108 return "cc::IOSurfaceLayerImpl"; | 111 return "cc::IOSurfaceLayerImpl"; |
109 } | 112 } |
110 | 113 |
111 } // namespace cc | 114 } // namespace cc |
OLD | NEW |