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/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 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 501 | 501 |
| 502 if (tiling->contents_scale() < min_acceptable_scale) | 502 if (tiling->contents_scale() < min_acceptable_scale) |
| 503 continue; | 503 continue; |
| 504 | 504 |
| 505 for (PictureLayerTiling::Iterator iter(tiling, | 505 for (PictureLayerTiling::Iterator iter(tiling, |
| 506 contentsScaleX(), | 506 contentsScaleX(), |
| 507 rect, | 507 rect, |
| 508 PictureLayerTiling::LayerDeviceAlignm entUnknown); | 508 PictureLayerTiling::LayerDeviceAlignm entUnknown); |
| 509 iter; | 509 iter; |
| 510 ++iter) { | 510 ++iter) { |
| 511 if (iter) | |
| 512 layerTreeImpl()->tile_manager()->FlushPendingTileUploadIfNeeded(*iter); | |
|
reveman
2013/03/07 20:31:58
We should avoid this when in "smoothness takes pri
Sami
2013/03/08 18:01:10
Agreed, let's be careful about this. I've added a
| |
| 511 // A null tile (i.e. no recording) is considered "ready". | 513 // A null tile (i.e. no recording) is considered "ready". |
| 512 if (!*iter || iter->GetResourceId()) | 514 if (!*iter || iter->GetResourceId()) |
| 513 missing_region.Subtract(iter.geometry_rect()); | 515 missing_region.Subtract(iter.geometry_rect()); |
| 514 } | 516 } |
| 515 } | 517 } |
| 516 | 518 |
| 517 return missing_region.IsEmpty(); | 519 return missing_region.IsEmpty(); |
| 518 } | 520 } |
| 519 | 521 |
| 520 PictureLayerTiling* PictureLayerImpl::AddTiling(float contents_scale) { | 522 PictureLayerTiling* PictureLayerImpl::AddTiling(float contents_scale) { |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 780 scoped_ptr<base::Value> PictureLayerImpl::AsValue() const { | 782 scoped_ptr<base::Value> PictureLayerImpl::AsValue() const { |
| 781 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); | 783 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); |
| 782 LayerImpl::AsValueInto(state.get()); | 784 LayerImpl::AsValueInto(state.get()); |
| 783 | 785 |
| 784 state->SetDouble("ideal_contents_scale", ideal_contents_scale_); | 786 state->SetDouble("ideal_contents_scale", ideal_contents_scale_); |
| 785 state->Set("tilings", tilings_->AsValue().release()); | 787 state->Set("tilings", tilings_->AsValue().release()); |
| 786 return state.PassAs<base::Value>(); | 788 return state.PassAs<base::Value>(); |
| 787 } | 789 } |
| 788 | 790 |
| 789 } // namespace cc | 791 } // namespace cc |
| OLD | NEW |