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/stringprintf.h" | 7 #include "base/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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 io_surface_changed_ = false; | 93 io_surface_changed_ = false; |
94 } | 94 } |
95 } | 95 } |
96 | 96 |
97 void IOSurfaceLayerImpl::AppendQuads(QuadSink* quad_sink, | 97 void IOSurfaceLayerImpl::AppendQuads(QuadSink* quad_sink, |
98 AppendQuadsData* append_quads_data) { | 98 AppendQuadsData* append_quads_data) { |
99 SharedQuadState* shared_quad_state = | 99 SharedQuadState* shared_quad_state = |
100 quad_sink->UseSharedQuadState(CreateSharedQuadState()); | 100 quad_sink->UseSharedQuadState(CreateSharedQuadState()); |
101 AppendDebugBorderQuad(quad_sink, shared_quad_state, append_quads_data); | 101 AppendDebugBorderQuad(quad_sink, shared_quad_state, append_quads_data); |
102 | 102 |
103 gfx::Rect quad_rect(gfx::Point(), content_bounds()); | 103 gfx::Rect quad_rect(content_bounds()); |
104 gfx::Rect opaque_rect(contents_opaque() ? quad_rect : gfx::Rect()); | 104 gfx::Rect opaque_rect(contents_opaque() ? quad_rect : gfx::Rect()); |
105 scoped_ptr<IOSurfaceDrawQuad> quad = IOSurfaceDrawQuad::Create(); | 105 scoped_ptr<IOSurfaceDrawQuad> quad = IOSurfaceDrawQuad::Create(); |
106 quad->SetNew(shared_quad_state, | 106 quad->SetNew(shared_quad_state, |
107 quad_rect, | 107 quad_rect, |
108 opaque_rect, | 108 opaque_rect, |
109 io_surface_size_, | 109 io_surface_size_, |
110 io_surface_texture_id_, | 110 io_surface_texture_id_, |
111 IOSurfaceDrawQuad::FLIPPED); | 111 IOSurfaceDrawQuad::FLIPPED); |
112 quad_sink->Append(quad.PassAs<DrawQuad>(), append_quads_data); | 112 quad_sink->Append(quad.PassAs<DrawQuad>(), append_quads_data); |
113 } | 113 } |
(...skipping 22 matching lines...) Expand all Loading... |
136 | 136 |
137 io_surface_id_ = io_surface_id; | 137 io_surface_id_ = io_surface_id; |
138 io_surface_size_ = size; | 138 io_surface_size_ = size; |
139 } | 139 } |
140 | 140 |
141 const char* IOSurfaceLayerImpl::LayerTypeAsString() const { | 141 const char* IOSurfaceLayerImpl::LayerTypeAsString() const { |
142 return "IOSurfaceLayer"; | 142 return "IOSurfaceLayer"; |
143 } | 143 } |
144 | 144 |
145 } // namespace cc | 145 } // namespace cc |
OLD | NEW |