| OLD | NEW |
| 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/playback/raster_source.h" | 5 #include "cc/playback/raster_source.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/trace_event/trace_event.h" | 9 #include "base/trace_event/trace_event.h" |
| 10 #include "cc/base/math_util.h" | 10 #include "cc/base/math_util.h" |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 return false; | 247 return false; |
| 248 gfx::Rect bounded_rect = layer_rect; | 248 gfx::Rect bounded_rect = layer_rect; |
| 249 bounded_rect.Intersect(gfx::Rect(size_)); | 249 bounded_rect.Intersect(gfx::Rect(size_)); |
| 250 return recorded_viewport_.Contains(bounded_rect); | 250 return recorded_viewport_.Contains(bounded_rect); |
| 251 } | 251 } |
| 252 | 252 |
| 253 gfx::Size RasterSource::GetSize() const { | 253 gfx::Size RasterSource::GetSize() const { |
| 254 return size_; | 254 return size_; |
| 255 } | 255 } |
| 256 | 256 |
| 257 bool RasterSource::HasImpliedColorSpace() const { |
| 258 return display_list_->HasImpliedColorSpace(); |
| 259 } |
| 260 |
| 261 const gfx::ColorSpace& RasterSource::GetImpliedColorSpace() const { |
| 262 return display_list_->GetImpliedColorSpace(); |
| 263 } |
| 264 |
| 257 bool RasterSource::IsSolidColor() const { | 265 bool RasterSource::IsSolidColor() const { |
| 258 return is_solid_color_; | 266 return is_solid_color_; |
| 259 } | 267 } |
| 260 | 268 |
| 261 SkColor RasterSource::GetSolidColor() const { | 269 SkColor RasterSource::GetSolidColor() const { |
| 262 DCHECK(IsSolidColor()); | 270 DCHECK(IsSolidColor()); |
| 263 return solid_color_; | 271 return solid_color_; |
| 264 } | 272 } |
| 265 | 273 |
| 266 bool RasterSource::HasRecordings() const { | 274 bool RasterSource::HasRecordings() const { |
| (...skipping 30 matching lines...) Expand all Loading... |
| 297 bool can_use_lcd_text = false; | 305 bool can_use_lcd_text = false; |
| 298 return scoped_refptr<RasterSource>(new RasterSource(this, can_use_lcd_text)); | 306 return scoped_refptr<RasterSource>(new RasterSource(this, can_use_lcd_text)); |
| 299 } | 307 } |
| 300 | 308 |
| 301 RasterSource::PlaybackSettings::PlaybackSettings() | 309 RasterSource::PlaybackSettings::PlaybackSettings() |
| 302 : playback_to_shared_canvas(false), | 310 : playback_to_shared_canvas(false), |
| 303 skip_images(false), | 311 skip_images(false), |
| 304 use_image_hijack_canvas(true) {} | 312 use_image_hijack_canvas(true) {} |
| 305 | 313 |
| 306 } // namespace cc | 314 } // namespace cc |
| OLD | NEW |