Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(121)

Side by Side Diff: cc/picture_layer_impl.cc

Issue 12209103: cc: Fix PostiveRatio crash by checking raster scale (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 552 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 // a throttled rate. Possibly make use of invalidation_.IsEmpty() on pending 563 // a throttled rate. Possibly make use of invalidation_.IsEmpty() on pending
564 // tree. This will allow CSS scale changes to get re-rastered at an 564 // tree. This will allow CSS scale changes to get re-rastered at an
565 // appropriate rate. 565 // appropriate rate.
566 566
567 if (is_active_layer) { 567 if (is_active_layer) {
568 if (raster_source_scale_was_animating_ && !animating_transform_to_screen) 568 if (raster_source_scale_was_animating_ && !animating_transform_to_screen)
569 change_target_tiling = true; 569 change_target_tiling = true;
570 raster_source_scale_was_animating_ = animating_transform_to_screen; 570 raster_source_scale_was_animating_ = animating_transform_to_screen;
571 } 571 }
572 572
573 if (is_active_layer && is_pinching) { 573 if (is_active_layer && is_pinching && raster_page_scale_) {
danakj 2013/02/11 23:11:35 I guess all of these if()s could be guarded by (..
enne (OOO) 2013/02/12 02:18:20 Or put it all in a helper function? Anyway, I'm ju
574 // If the page scale diverges too far during pinch, change raster target to 574 // If the page scale diverges too far during pinch, change raster target to
575 // the current page scale. 575 // the current page scale.
576 float ratio = PositiveRatio(ideal_page_scale_, raster_page_scale_); 576 float ratio = PositiveRatio(ideal_page_scale_, raster_page_scale_);
577 if (ratio >= kMaxScaleRatioDuringPinch) 577 if (ratio >= kMaxScaleRatioDuringPinch)
578 change_target_tiling = true; 578 change_target_tiling = true;
579 } 579 }
580 580
581 if (!is_pinching) { 581 if (!is_pinching) {
582 // When not pinching, match the ideal page scale factor. 582 // When not pinching, match the ideal page scale factor.
583 if (raster_page_scale_ != ideal_page_scale_) 583 if (raster_page_scale_ != ideal_page_scale_)
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 return twin; 713 return twin;
714 } 714 }
715 715
716 void PictureLayerImpl::getDebugBorderProperties( 716 void PictureLayerImpl::getDebugBorderProperties(
717 SkColor* color, float* width) const { 717 SkColor* color, float* width) const {
718 *color = DebugColors::TiledContentLayerBorderColor(); 718 *color = DebugColors::TiledContentLayerBorderColor();
719 *width = DebugColors::TiledContentLayerBorderWidth(layerTreeImpl()); 719 *width = DebugColors::TiledContentLayerBorderWidth(layerTreeImpl());
720 } 720 }
721 721
722 } // namespace cc 722 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698