Chromium Code Reviews| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 #include <limits> | 9 #include <limits> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 175 if (current_draw_mode_ == DRAW_MODE_RESOURCELESS_SOFTWARE) { | 175 if (current_draw_mode_ == DRAW_MODE_RESOURCELESS_SOFTWARE) { |
| 176 AppendDebugBorderQuad( | 176 AppendDebugBorderQuad( |
| 177 render_pass, shared_quad_state->quad_layer_bounds, shared_quad_state, | 177 render_pass, shared_quad_state->quad_layer_bounds, shared_quad_state, |
| 178 append_quads_data, DebugColors::DirectPictureBorderColor(), | 178 append_quads_data, DebugColors::DirectPictureBorderColor(), |
| 179 DebugColors::DirectPictureBorderWidth(layer_tree_impl())); | 179 DebugColors::DirectPictureBorderWidth(layer_tree_impl())); |
| 180 | 180 |
| 181 gfx::Rect geometry_rect = shared_quad_state->visible_quad_layer_rect; | 181 gfx::Rect geometry_rect = shared_quad_state->visible_quad_layer_rect; |
| 182 gfx::Rect opaque_rect = contents_opaque() ? geometry_rect : gfx::Rect(); | 182 gfx::Rect opaque_rect = contents_opaque() ? geometry_rect : gfx::Rect(); |
| 183 gfx::Rect visible_geometry_rect = | 183 gfx::Rect visible_geometry_rect = |
| 184 scaled_occlusion.GetUnoccludedContentRect(geometry_rect); | 184 scaled_occlusion.GetUnoccludedContentRect(geometry_rect); |
| 185 if (visible_geometry_rect.IsEmpty()) | 185 if (visible_geometry_rect.IsEmpty() || !raster_source_->HasRecordings()) |
|
vmpstr
2015/09/01 20:26:38
Can you leave a comment here explaining why this c
danakj
2015/09/01 20:42:30
If it's a workaround, can you leave a TODO pointin
| |
| 186 return; | 186 return; |
| 187 | 187 |
| 188 gfx::Rect quad_content_rect = shared_quad_state->visible_quad_layer_rect; | 188 gfx::Rect quad_content_rect = shared_quad_state->visible_quad_layer_rect; |
| 189 gfx::Size texture_size = quad_content_rect.size(); | 189 gfx::Size texture_size = quad_content_rect.size(); |
| 190 gfx::RectF texture_rect = gfx::RectF(texture_size); | 190 gfx::RectF texture_rect = gfx::RectF(texture_size); |
| 191 | 191 |
| 192 PictureDrawQuad* quad = | 192 PictureDrawQuad* quad = |
| 193 render_pass->CreateAndAppendDrawQuad<PictureDrawQuad>(); | 193 render_pass->CreateAndAppendDrawQuad<PictureDrawQuad>(); |
| 194 quad->SetNew(shared_quad_state, geometry_rect, opaque_rect, | 194 quad->SetNew(shared_quad_state, geometry_rect, opaque_rect, |
| 195 visible_geometry_rect, texture_rect, texture_size, | 195 visible_geometry_rect, texture_rect, texture_size, |
| (...skipping 1040 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1236 | 1236 |
| 1237 bool PictureLayerImpl::IsOnActiveOrPendingTree() const { | 1237 bool PictureLayerImpl::IsOnActiveOrPendingTree() const { |
| 1238 return !layer_tree_impl()->IsRecycleTree(); | 1238 return !layer_tree_impl()->IsRecycleTree(); |
| 1239 } | 1239 } |
| 1240 | 1240 |
| 1241 bool PictureLayerImpl::HasValidTilePriorities() const { | 1241 bool PictureLayerImpl::HasValidTilePriorities() const { |
| 1242 return IsOnActiveOrPendingTree() && IsDrawnRenderSurfaceLayerListMember(); | 1242 return IsOnActiveOrPendingTree() && IsDrawnRenderSurfaceLayerListMember(); |
| 1243 } | 1243 } |
| 1244 | 1244 |
| 1245 } // namespace cc | 1245 } // namespace cc |
| OLD | NEW |