| 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/raster/raster_source.h" | 5 #include "cc/raster/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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 void RasterSource::GetDiscardableImagesInRect( | 258 void RasterSource::GetDiscardableImagesInRect( |
| 259 const gfx::Rect& layer_rect, | 259 const gfx::Rect& layer_rect, |
| 260 float contents_scale, | 260 float contents_scale, |
| 261 const gfx::ColorSpace& target_color_space, | 261 const gfx::ColorSpace& target_color_space, |
| 262 std::vector<DrawImage>* images) const { | 262 std::vector<DrawImage>* images) const { |
| 263 DCHECK_EQ(0u, images->size()); | 263 DCHECK_EQ(0u, images->size()); |
| 264 display_list_->GetDiscardableImagesInRect(layer_rect, contents_scale, | 264 display_list_->GetDiscardableImagesInRect(layer_rect, contents_scale, |
| 265 target_color_space, images); | 265 target_color_space, images); |
| 266 } | 266 } |
| 267 | 267 |
| 268 gfx::Rect RasterSource::GetRectForImage(ImageId image_id) const { | 268 gfx::Rect RasterSource::GetRectForImage(PaintImage::Id image_id) const { |
| 269 if (!display_list_) | 269 if (!display_list_) |
| 270 return gfx::Rect(); | 270 return gfx::Rect(); |
| 271 return display_list_->GetRectForImage(image_id); | 271 return display_list_->GetRectForImage(image_id); |
| 272 } | 272 } |
| 273 | 273 |
| 274 bool RasterSource::CoversRect(const gfx::Rect& layer_rect) const { | 274 bool RasterSource::CoversRect(const gfx::Rect& layer_rect) const { |
| 275 if (size_.IsEmpty()) | 275 if (size_.IsEmpty()) |
| 276 return false; | 276 return false; |
| 277 gfx::Rect bounded_rect = layer_rect; | 277 gfx::Rect bounded_rect = layer_rect; |
| 278 bounded_rect.Intersect(gfx::Rect(size_)); | 278 bounded_rect.Intersect(gfx::Rect(size_)); |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 use_image_hijack_canvas(true) {} | 325 use_image_hijack_canvas(true) {} |
| 326 | 326 |
| 327 RasterSource::PlaybackSettings::PlaybackSettings(const PlaybackSettings&) = | 327 RasterSource::PlaybackSettings::PlaybackSettings(const PlaybackSettings&) = |
| 328 default; | 328 default; |
| 329 | 329 |
| 330 RasterSource::PlaybackSettings::PlaybackSettings(PlaybackSettings&&) = default; | 330 RasterSource::PlaybackSettings::PlaybackSettings(PlaybackSettings&&) = default; |
| 331 | 331 |
| 332 RasterSource::PlaybackSettings::~PlaybackSettings() = default; | 332 RasterSource::PlaybackSettings::~PlaybackSettings() = default; |
| 333 | 333 |
| 334 } // namespace cc | 334 } // namespace cc |
| OLD | NEW |