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

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

Issue 935333002: Update from https://crrev.com/316786 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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
« no previous file with comments | « cc/resources/display_list_raster_source.h ('k') | cc/resources/display_list_recording_source.h » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/resources/display_list_raster_source.h" 5 #include "cc/resources/display_list_raster_source.h"
6 6
7 #include "base/trace_event/trace_event.h" 7 #include "base/trace_event/trace_event.h"
8 #include "cc/base/region.h" 8 #include "cc/base/region.h"
9 #include "cc/debug/debug_colors.h" 9 #include "cc/debug/debug_colors.h"
10 #include "cc/resources/display_item_list.h" 10 #include "cc/resources/display_item_list.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 is_solid_color_(false), 43 is_solid_color_(false),
44 solid_color_(SK_ColorTRANSPARENT), 44 solid_color_(SK_ColorTRANSPARENT),
45 clear_canvas_with_debug_color_(kDefaultClearCanvasSetting), 45 clear_canvas_with_debug_color_(kDefaultClearCanvasSetting),
46 slow_down_raster_scale_factor_for_debug_(0), 46 slow_down_raster_scale_factor_for_debug_(0),
47 should_attempt_to_use_distance_field_text_(false) { 47 should_attempt_to_use_distance_field_text_(false) {
48 } 48 }
49 49
50 DisplayListRasterSource::DisplayListRasterSource( 50 DisplayListRasterSource::DisplayListRasterSource(
51 const DisplayListRecordingSource* other) 51 const DisplayListRecordingSource* other)
52 : display_list_(other->display_list_), 52 : display_list_(other->display_list_),
53 background_color_(SK_ColorTRANSPARENT), 53 background_color_(other->background_color_),
54 requires_clear_(true), 54 requires_clear_(other->requires_clear_),
55 can_use_lcd_text_(other->can_use_lcd_text_), 55 can_use_lcd_text_(other->can_use_lcd_text_),
56 is_solid_color_(other->is_solid_color_), 56 is_solid_color_(other->is_solid_color_),
57 solid_color_(other->solid_color_), 57 solid_color_(other->solid_color_),
58 recorded_viewport_(other->recorded_viewport_), 58 recorded_viewport_(other->recorded_viewport_),
59 size_(other->size_), 59 size_(other->size_),
60 clear_canvas_with_debug_color_(kDefaultClearCanvasSetting), 60 clear_canvas_with_debug_color_(kDefaultClearCanvasSetting),
61 slow_down_raster_scale_factor_for_debug_( 61 slow_down_raster_scale_factor_for_debug_(
62 other->slow_down_raster_scale_factor_for_debug_), 62 other->slow_down_raster_scale_factor_for_debug_),
63 should_attempt_to_use_distance_field_text_(false) { 63 should_attempt_to_use_distance_field_text_(false) {
64 } 64 }
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 } 171 }
172 172
173 bool DisplayListRasterSource::HasRecordings() const { 173 bool DisplayListRasterSource::HasRecordings() const {
174 return !!display_list_.get(); 174 return !!display_list_.get();
175 } 175 }
176 176
177 void DisplayListRasterSource::SetShouldAttemptToUseDistanceFieldText() { 177 void DisplayListRasterSource::SetShouldAttemptToUseDistanceFieldText() {
178 should_attempt_to_use_distance_field_text_ = true; 178 should_attempt_to_use_distance_field_text_ = true;
179 } 179 }
180 180
181 void DisplayListRasterSource::SetBackgoundColor(SkColor background_color) {
182 background_color_ = background_color;
183 }
184
185 void DisplayListRasterSource::SetRequiresClear(bool requires_clear) {
186 requires_clear_ = requires_clear;
187 }
188
189 bool DisplayListRasterSource::ShouldAttemptToUseDistanceFieldText() const { 181 bool DisplayListRasterSource::ShouldAttemptToUseDistanceFieldText() const {
190 return should_attempt_to_use_distance_field_text_; 182 return should_attempt_to_use_distance_field_text_;
191 } 183 }
192 184
193 void DisplayListRasterSource::AsValueInto( 185 void DisplayListRasterSource::AsValueInto(
194 base::debug::TracedValue* array) const { 186 base::trace_event::TracedValue* array) const {
195 if (display_list_.get()) 187 if (display_list_.get())
196 TracedValue::AppendIDRef(display_list_.get(), array); 188 TracedValue::AppendIDRef(display_list_.get(), array);
197 } 189 }
198 190
199 void DisplayListRasterSource::DidBeginTracing() { 191 void DisplayListRasterSource::DidBeginTracing() {
200 if (display_list_.get()) 192 if (display_list_.get())
201 display_list_->EmitTraceSnapshot(); 193 display_list_->EmitTraceSnapshot();
202 } 194 }
203 195
204 bool DisplayListRasterSource::CanUseLCDText() const { 196 bool DisplayListRasterSource::CanUseLCDText() const {
205 return can_use_lcd_text_; 197 return can_use_lcd_text_;
206 } 198 }
207 199
208 } // namespace cc 200 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/display_list_raster_source.h ('k') | cc/resources/display_list_recording_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698