| 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/picture_layer_impl.h" | 5 #include "cc/layers/picture_layer_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 visible_geometry_rect, texture_rect, texture_size, | 246 visible_geometry_rect, texture_rect, texture_size, |
| 247 nearest_neighbor_, RGBA_8888, quad_content_rect, | 247 nearest_neighbor_, RGBA_8888, quad_content_rect, |
| 248 max_contents_scale, raster_source_); | 248 max_contents_scale, raster_source_); |
| 249 ValidateQuadResources(quad); | 249 ValidateQuadResources(quad); |
| 250 return; | 250 return; |
| 251 } | 251 } |
| 252 | 252 |
| 253 AppendDebugBorderQuad(render_pass, shared_quad_state->quad_layer_bounds, | 253 AppendDebugBorderQuad(render_pass, shared_quad_state->quad_layer_bounds, |
| 254 shared_quad_state, append_quads_data); | 254 shared_quad_state, append_quads_data); |
| 255 | 255 |
| 256 if (ShowDebugBorders()) { | 256 if (ShowDebugBorders(DebugBorderType::LAYER)) { |
| 257 for (PictureLayerTilingSet::CoverageIterator iter( | 257 for (PictureLayerTilingSet::CoverageIterator iter( |
| 258 tilings_.get(), max_contents_scale, | 258 tilings_.get(), max_contents_scale, |
| 259 shared_quad_state->visible_quad_layer_rect, ideal_contents_scale_); | 259 shared_quad_state->visible_quad_layer_rect, ideal_contents_scale_); |
| 260 iter; ++iter) { | 260 iter; ++iter) { |
| 261 SkColor color; | 261 SkColor color; |
| 262 float width; | 262 float width; |
| 263 if (*iter && iter->draw_info().IsReadyToDraw()) { | 263 if (*iter && iter->draw_info().IsReadyToDraw()) { |
| 264 TileDrawInfo::Mode mode = iter->draw_info().mode(); | 264 TileDrawInfo::Mode mode = iter->draw_info().mode(); |
| 265 if (mode == TileDrawInfo::SOLID_COLOR_MODE) { | 265 if (mode == TileDrawInfo::SOLID_COLOR_MODE) { |
| 266 color = DebugColors::SolidColorTileBorderColor(); | 266 color = DebugColors::SolidColorTileBorderColor(); |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 break; | 371 break; |
| 372 } | 372 } |
| 373 case TileDrawInfo::OOM_MODE: | 373 case TileDrawInfo::OOM_MODE: |
| 374 break; // Checkerboard. | 374 break; // Checkerboard. |
| 375 } | 375 } |
| 376 } | 376 } |
| 377 | 377 |
| 378 if (!has_draw_quad) { | 378 if (!has_draw_quad) { |
| 379 // Checkerboard. | 379 // Checkerboard. |
| 380 SkColor color = SafeOpaqueBackgroundColor(); | 380 SkColor color = SafeOpaqueBackgroundColor(); |
| 381 if (ShowDebugBorders()) { | 381 if (ShowDebugBorders(DebugBorderType::LAYER)) { |
| 382 // Fill the whole tile with the missing tile color. | 382 // Fill the whole tile with the missing tile color. |
| 383 color = DebugColors::OOMTileBorderColor(); | 383 color = DebugColors::OOMTileBorderColor(); |
| 384 } | 384 } |
| 385 SolidColorDrawQuad* quad = | 385 SolidColorDrawQuad* quad = |
| 386 render_pass->CreateAndAppendDrawQuad<SolidColorDrawQuad>(); | 386 render_pass->CreateAndAppendDrawQuad<SolidColorDrawQuad>(); |
| 387 quad->SetNew(shared_quad_state, geometry_rect, visible_geometry_rect, | 387 quad->SetNew(shared_quad_state, geometry_rect, visible_geometry_rect, |
| 388 color, false); | 388 color, false); |
| 389 ValidateQuadResources(quad); | 389 ValidateQuadResources(quad); |
| 390 | 390 |
| 391 if (geometry_rect.Intersects(scaled_viewport_for_tile_priority)) { | 391 if (geometry_rect.Intersects(scaled_viewport_for_tile_priority)) { |
| (...skipping 1014 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1406 } | 1406 } |
| 1407 | 1407 |
| 1408 invalidation_.Union(invalidation); | 1408 invalidation_.Union(invalidation); |
| 1409 tilings_->UpdateTilingsForImplSideInvalidation(invalidation); | 1409 tilings_->UpdateTilingsForImplSideInvalidation(invalidation); |
| 1410 SetNeedsPushProperties(); | 1410 SetNeedsPushProperties(); |
| 1411 TRACE_EVENT_END1("cc", "PictureLayerImpl::InvalidateRegionForImages", | 1411 TRACE_EVENT_END1("cc", "PictureLayerImpl::InvalidateRegionForImages", |
| 1412 "Invalidation", invalidation.ToString()); | 1412 "Invalidation", invalidation.ToString()); |
| 1413 } | 1413 } |
| 1414 | 1414 |
| 1415 } // namespace cc | 1415 } // namespace cc |
| OLD | NEW |