Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/test/fake_recording_source.h" | 5 #include "cc/test/fake_recording_source.h" |
| 6 | 6 |
| 7 #include "cc/test/fake_raster_source.h" | 7 #include "cc/test/fake_raster_source.h" |
| 8 #include "cc/test/skia_common.h" | 8 #include "cc/test/skia_common.h" |
| 9 | 9 |
| 10 namespace cc { | 10 namespace cc { |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 21 | 21 |
| 22 scoped_refptr<RasterSource> FakeRecordingSource::CreateRasterSource( | 22 scoped_refptr<RasterSource> FakeRecordingSource::CreateRasterSource( |
| 23 bool can_use_lcd) const { | 23 bool can_use_lcd) const { |
| 24 return FakeRasterSource::CreateFromRecordingSourceWithWaitable( | 24 return FakeRasterSource::CreateFromRecordingSourceWithWaitable( |
| 25 this, can_use_lcd, playback_allowed_event_); | 25 this, can_use_lcd, playback_allowed_event_); |
| 26 } | 26 } |
| 27 | 27 |
| 28 bool FakeRecordingSource::EqualsTo(const FakeRecordingSource& other) { | 28 bool FakeRecordingSource::EqualsTo(const FakeRecordingSource& other) { |
| 29 // The DisplayItemLists are equal if they are both null or they are both not | 29 // The DisplayItemLists are equal if they are both null or they are both not |
| 30 // null and render to the same thing. | 30 // null and render to the same thing. |
| 31 bool display_lists_equal = !display_list_ && !other.display_list_; | 31 bool display_lists_equal = |
| 32 if (display_list_ && other.display_list_) { | 32 !clc_data_.display_list && !other.clc_data_.display_list; |
| 33 if (clc_data_.display_list && other.clc_data_.display_list) { | |
|
Menglin
2016/07/19 22:56:37
Oh I think you don't have to look into the change
| |
| 33 display_lists_equal = AreDisplayListDrawingResultsSame( | 34 display_lists_equal = AreDisplayListDrawingResultsSame( |
| 34 recorded_viewport_, display_list_.get(), other.display_list_.get()); | 35 clc_data_.recorded_viewport, clc_data_.display_list.get(), |
| 36 other.clc_data_.display_list.get()); | |
| 35 } | 37 } |
| 36 | 38 |
| 37 return recorded_viewport_ == other.recorded_viewport_ && | 39 return clc_data_.recorded_viewport == other.clc_data_.recorded_viewport && |
| 38 size_ == other.size_ && | 40 pl_data_.size == other.pl_data_.size && |
| 39 slow_down_raster_scale_factor_for_debug_ == | 41 pl_data_.slow_down_raster_scale_factor_for_debug == |
| 40 other.slow_down_raster_scale_factor_for_debug_ && | 42 other.pl_data_.slow_down_raster_scale_factor_for_debug && |
| 41 generate_discardable_images_metadata_ == | 43 pl_data_.generate_discardable_images_metadata == |
| 42 other.generate_discardable_images_metadata_ && | 44 other.pl_data_.generate_discardable_images_metadata && |
| 43 requires_clear_ == other.requires_clear_ && | 45 pl_data_.requires_clear == other.pl_data_.requires_clear && |
| 44 is_solid_color_ == other.is_solid_color_ && | 46 pl_data_.is_solid_color == other.pl_data_.is_solid_color && |
| 45 clear_canvas_with_debug_color_ == | 47 pl_data_.clear_canvas_with_debug_color == |
| 46 other.clear_canvas_with_debug_color_ && | 48 other.pl_data_.clear_canvas_with_debug_color && |
| 47 solid_color_ == other.solid_color_ && | 49 pl_data_.solid_color == other.pl_data_.solid_color && |
| 48 background_color_ == other.background_color_ && display_lists_equal; | 50 pl_data_.background_color == other.pl_data_.background_color && |
| 51 display_lists_equal; | |
| 49 } | 52 } |
| 50 | 53 |
| 51 } // namespace cc | 54 } // namespace cc |
| OLD | NEW |