| 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/picture_layer_impl.h" | 5 #include "cc/picture_layer_impl.h" |
| 6 | 6 |
| 7 #include "base/time.h" | 7 #include "base/time.h" |
| 8 #include "cc/append_quads_data.h" | 8 #include "cc/append_quads_data.h" |
| 9 #include "cc/checkerboard_draw_quad.h" | 9 #include "cc/checkerboard_draw_quad.h" |
| 10 #include "cc/debug_border_draw_quad.h" | 10 #include "cc/debug_border_draw_quad.h" |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 resource = iter->resource_id(); | 79 resource = iter->resource_id(); |
| 80 | 80 |
| 81 gfx::Rect geometry_rect = iter.geometry_rect(); | 81 gfx::Rect geometry_rect = iter.geometry_rect(); |
| 82 | 82 |
| 83 if (!resource) { | 83 if (!resource) { |
| 84 if (drawCheckerboardForMissingTiles()) { | 84 if (drawCheckerboardForMissingTiles()) { |
| 85 // TODO(enne): Figure out how to show debug "invalidated checker" color | 85 // TODO(enne): Figure out how to show debug "invalidated checker" color |
| 86 scoped_ptr<CheckerboardDrawQuad> quad = CheckerboardDrawQuad::Create(); | 86 scoped_ptr<CheckerboardDrawQuad> quad = CheckerboardDrawQuad::Create(); |
| 87 SkColor color = DebugColors::DefaultCheckerboardColor(); | 87 SkColor color = DebugColors::DefaultCheckerboardColor(); |
| 88 quad->SetNew(sharedQuadState, geometry_rect, color); | 88 quad->SetNew(sharedQuadState, geometry_rect, color); |
| 89 appendQuadsData.hadMissingTiles |= | 89 if (quadSink.append(quad.PassAs<DrawQuad>(), appendQuadsData)) |
| 90 quadSink.append(quad.PassAs<DrawQuad>(), appendQuadsData); | 90 appendQuadsData.numMissingTiles++; |
| 91 } else { | 91 } else { |
| 92 scoped_ptr<SolidColorDrawQuad> quad = SolidColorDrawQuad::Create(); | 92 scoped_ptr<SolidColorDrawQuad> quad = SolidColorDrawQuad::Create(); |
| 93 quad->SetNew(sharedQuadState, geometry_rect, backgroundColor()); | 93 quad->SetNew(sharedQuadState, geometry_rect, backgroundColor()); |
| 94 appendQuadsData.hadMissingTiles |= | 94 if (quadSink.append(quad.PassAs<DrawQuad>(), appendQuadsData)) |
| 95 quadSink.append(quad.PassAs<DrawQuad>(), appendQuadsData); | 95 appendQuadsData.numMissingTiles++; |
| 96 } | 96 } |
| 97 continue; | 97 continue; |
| 98 } | 98 } |
| 99 | 99 |
| 100 gfx::RectF texture_rect = iter.texture_rect(); | 100 gfx::RectF texture_rect = iter.texture_rect(); |
| 101 gfx::Rect opaque_rect = iter->opaque_rect(); | 101 gfx::Rect opaque_rect = iter->opaque_rect(); |
| 102 opaque_rect.Intersect(content_rect); | 102 opaque_rect.Intersect(content_rect); |
| 103 | 103 |
| 104 bool outside_left_edge = geometry_rect.x() == content_rect.x(); | 104 bool outside_left_edge = geometry_rect.x() == content_rect.x(); |
| 105 bool outside_top_edge = geometry_rect.y() == content_rect.y(); | 105 bool outside_top_edge = geometry_rect.y() == content_rect.y(); |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 GL_RGBA, | 171 GL_RGBA, |
| 172 rect, | 172 rect, |
| 173 tiling->contents_scale())); | 173 tiling->contents_scale())); |
| 174 } | 174 } |
| 175 | 175 |
| 176 void PictureLayerImpl::SyncFromActiveLayer(const PictureLayerImpl* other) { | 176 void PictureLayerImpl::SyncFromActiveLayer(const PictureLayerImpl* other) { |
| 177 tilings_.CloneFrom(other->tilings_); | 177 tilings_.CloneFrom(other->tilings_); |
| 178 } | 178 } |
| 179 | 179 |
| 180 } // namespace cc | 180 } // namespace cc |
| OLD | NEW |