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

Side by Side Diff: cc/resources/picture_pile_impl.cc

Issue 733233003: Revert of cc: Toggle LCD text at raster time instead of record time. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « cc/resources/picture_pile_impl.h ('k') | cc/resources/picture_pile_unittest.cc » ('j') | 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 <algorithm> 5 #include <algorithm>
6 #include <limits> 6 #include <limits>
7 7
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "cc/base/region.h" 9 #include "cc/base/region.h"
10 #include "cc/debug/debug_colors.h" 10 #include "cc/debug/debug_colors.h"
(...skipping 11 matching lines...) Expand all
22 22
23 scoped_refptr<PicturePileImpl> PicturePileImpl::CreateFromPicturePile( 23 scoped_refptr<PicturePileImpl> PicturePileImpl::CreateFromPicturePile(
24 const PicturePile* other) { 24 const PicturePile* other) {
25 return make_scoped_refptr(new PicturePileImpl(other)); 25 return make_scoped_refptr(new PicturePileImpl(other));
26 } 26 }
27 27
28 PicturePileImpl::PicturePileImpl() 28 PicturePileImpl::PicturePileImpl()
29 : background_color_(SK_ColorTRANSPARENT), 29 : background_color_(SK_ColorTRANSPARENT),
30 contents_opaque_(false), 30 contents_opaque_(false),
31 contents_fill_bounds_completely_(false), 31 contents_fill_bounds_completely_(false),
32 can_use_lcd_text_(false),
33 is_solid_color_(false), 32 is_solid_color_(false),
34 solid_color_(SK_ColorTRANSPARENT), 33 solid_color_(SK_ColorTRANSPARENT),
35 has_any_recordings_(false), 34 has_any_recordings_(false),
36 is_mask_(false), 35 is_mask_(false),
37 clear_canvas_with_debug_color_(false), 36 clear_canvas_with_debug_color_(false),
38 min_contents_scale_(0.f), 37 min_contents_scale_(0.f),
39 slow_down_raster_scale_factor_for_debug_(0), 38 slow_down_raster_scale_factor_for_debug_(0),
40 should_attempt_to_use_distance_field_text_(false) { 39 should_attempt_to_use_distance_field_text_(false) {
41 } 40 }
42 41
43 PicturePileImpl::PicturePileImpl(const PicturePile* other) 42 PicturePileImpl::PicturePileImpl(const PicturePile* other)
44 : picture_map_(other->picture_map_), 43 : picture_map_(other->picture_map_),
45 tiling_(other->tiling_), 44 tiling_(other->tiling_),
46 background_color_(other->background_color_), 45 background_color_(other->background_color_),
47 contents_opaque_(other->contents_opaque_), 46 contents_opaque_(other->contents_opaque_),
48 contents_fill_bounds_completely_(other->contents_fill_bounds_completely_), 47 contents_fill_bounds_completely_(other->contents_fill_bounds_completely_),
49 can_use_lcd_text_(other->can_use_lcd_text_),
50 is_solid_color_(other->is_solid_color_), 48 is_solid_color_(other->is_solid_color_),
51 solid_color_(other->solid_color_), 49 solid_color_(other->solid_color_),
52 recorded_viewport_(other->recorded_viewport_), 50 recorded_viewport_(other->recorded_viewport_),
53 has_any_recordings_(other->has_any_recordings_), 51 has_any_recordings_(other->has_any_recordings_),
54 is_mask_(other->is_mask_), 52 is_mask_(other->is_mask_),
55 clear_canvas_with_debug_color_(other->clear_canvas_with_debug_color_), 53 clear_canvas_with_debug_color_(other->clear_canvas_with_debug_color_),
56 min_contents_scale_(other->min_contents_scale_), 54 min_contents_scale_(other->min_contents_scale_),
57 slow_down_raster_scale_factor_for_debug_( 55 slow_down_raster_scale_factor_for_debug_(
58 other->slow_down_raster_scale_factor_for_debug_), 56 other->slow_down_raster_scale_factor_for_debug_),
59 should_attempt_to_use_distance_field_text_(false) { 57 should_attempt_to_use_distance_field_text_(false) {
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 appended_pictures.insert(picture); 420 appended_pictures.insert(picture);
423 TracedValue::AppendIDRef(picture, pictures); 421 TracedValue::AppendIDRef(picture, pictures);
424 } 422 }
425 } 423 }
426 } 424 }
427 425
428 bool PicturePileImpl::IsMask() const { 426 bool PicturePileImpl::IsMask() const {
429 return is_mask_; 427 return is_mask_;
430 } 428 }
431 429
432 bool PicturePileImpl::CanUseLCDText() const {
433 return can_use_lcd_text_;
434 }
435
436 PicturePileImpl::PixelRefIterator::PixelRefIterator( 430 PicturePileImpl::PixelRefIterator::PixelRefIterator(
437 const gfx::Rect& content_rect, 431 const gfx::Rect& content_rect,
438 float contents_scale, 432 float contents_scale,
439 const PicturePileImpl* picture_pile) 433 const PicturePileImpl* picture_pile)
440 : picture_pile_(picture_pile), 434 : picture_pile_(picture_pile),
441 layer_rect_( 435 layer_rect_(
442 gfx::ScaleToEnclosingRect(content_rect, 1.f / contents_scale)), 436 gfx::ScaleToEnclosingRect(content_rect, 1.f / contents_scale)),
443 tile_iterator_(&picture_pile_->tiling_, 437 tile_iterator_(&picture_pile_->tiling_,
444 layer_rect_, 438 layer_rect_,
445 false /* include_borders */) { 439 false /* include_borders */) {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 ++it) { 484 ++it) {
491 const Picture* picture = it->second.GetPicture(); 485 const Picture* picture = it->second.GetPicture();
492 if (picture && (processed_pictures.count(picture) == 0)) { 486 if (picture && (processed_pictures.count(picture) == 0)) {
493 picture->EmitTraceSnapshot(); 487 picture->EmitTraceSnapshot();
494 processed_pictures.insert(picture); 488 processed_pictures.insert(picture);
495 } 489 }
496 } 490 }
497 } 491 }
498 492
499 } // namespace cc 493 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/picture_pile_impl.h ('k') | cc/resources/picture_pile_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698