OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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/tiled_layer_impl.h" | 5 #include "cc/layers/tiled_layer_impl.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/stringprintf.h" | 8 #include "base/stringprintf.h" |
9 #include "cc/base/math_util.h" | 9 #include "cc/base/math_util.h" |
10 #include "cc/debug/debug_colors.h" | 10 #include "cc/debug/debug_colors.h" |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 DrawableTile* tile = static_cast<DrawableTile*>(iter->second); | 148 DrawableTile* tile = static_cast<DrawableTile*>(iter->second); |
149 | 149 |
150 tiled_layer->PushTileProperties(i, | 150 tiled_layer->PushTileProperties(i, |
151 j, | 151 j, |
152 tile->resource_id(), | 152 tile->resource_id(), |
153 tile->opaque_rect(), | 153 tile->opaque_rect(), |
154 tile->contents_swizzled()); | 154 tile->contents_swizzled()); |
155 } | 155 } |
156 } | 156 } |
157 | 157 |
| 158 bool TiledLayerImpl::WillDraw(DrawMode draw_mode, |
| 159 ResourceProvider* resource_provider) { |
| 160 if (draw_mode == DRAW_MODE_RESOURCELESS_SOFTWARE) |
| 161 return false; |
| 162 return LayerImpl::WillDraw(draw_mode, resource_provider); |
| 163 } |
| 164 |
158 void TiledLayerImpl::AppendQuads(QuadSink* quad_sink, | 165 void TiledLayerImpl::AppendQuads(QuadSink* quad_sink, |
159 AppendQuadsData* append_quads_data) { | 166 AppendQuadsData* append_quads_data) { |
160 gfx::Rect content_rect = visible_content_rect(); | 167 gfx::Rect content_rect = visible_content_rect(); |
161 | 168 |
162 if (!tiler_ || tiler_->has_empty_bounds() || content_rect.IsEmpty()) | 169 if (!tiler_ || tiler_->has_empty_bounds() || content_rect.IsEmpty()) |
163 return; | 170 return; |
164 | 171 |
165 SharedQuadState* shared_quad_state = | 172 SharedQuadState* shared_quad_state = |
166 quad_sink->UseSharedQuadState(CreateSharedQuadState()); | 173 quad_sink->UseSharedQuadState(CreateSharedQuadState()); |
167 AppendDebugBorderQuad(quad_sink, shared_quad_state, append_quads_data); | 174 AppendDebugBorderQuad(quad_sink, shared_quad_state, append_quads_data); |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
309 CHECK(tiler_); | 316 CHECK(tiler_); |
310 tiler_->reset(); | 317 tiler_->reset(); |
311 s_safe_to_delete_drawable_tile = false; | 318 s_safe_to_delete_drawable_tile = false; |
312 } | 319 } |
313 | 320 |
314 const char* TiledLayerImpl::LayerTypeAsString() const { | 321 const char* TiledLayerImpl::LayerTypeAsString() const { |
315 return "cc::TiledLayerImpl"; | 322 return "cc::TiledLayerImpl"; |
316 } | 323 } |
317 | 324 |
318 } // namespace cc | 325 } // namespace cc |
OLD | NEW |