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

Side by Side Diff: cc/test/fake_recording_source.cc

Issue 1982893002: [blimp] Add SkPicture caching support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments from vmpstr, including adding //cc/blimp Created 4 years, 6 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/test/fake_layer_tree_host.h ('k') | cc/test/layer_tree_test.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 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 13 matching lines...) Expand all
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 = !display_list_ && !other.display_list_;
32 if (display_list_ && other.display_list_) { 32 if (display_list_ && other.display_list_) {
33 display_lists_equal = AreDisplayListDrawingResultsSame( 33 display_lists_equal = AreDisplayListDrawingResultsSame(
34 recorded_viewport_, display_list_, other.display_list_); 34 recorded_viewport_, display_list_.get(), other.display_list_.get());
35 } 35 }
36 36
37 return recorded_viewport_ == other.recorded_viewport_ && 37 return recorded_viewport_ == other.recorded_viewport_ &&
38 size_ == other.size_ && 38 size_ == other.size_ &&
39 slow_down_raster_scale_factor_for_debug_ == 39 slow_down_raster_scale_factor_for_debug_ ==
40 other.slow_down_raster_scale_factor_for_debug_ && 40 other.slow_down_raster_scale_factor_for_debug_ &&
41 generate_discardable_images_metadata_ == 41 generate_discardable_images_metadata_ ==
42 other.generate_discardable_images_metadata_ && 42 other.generate_discardable_images_metadata_ &&
43 requires_clear_ == other.requires_clear_ && 43 requires_clear_ == other.requires_clear_ &&
44 is_solid_color_ == other.is_solid_color_ && 44 is_solid_color_ == other.is_solid_color_ &&
45 clear_canvas_with_debug_color_ == 45 clear_canvas_with_debug_color_ ==
46 other.clear_canvas_with_debug_color_ && 46 other.clear_canvas_with_debug_color_ &&
47 solid_color_ == other.solid_color_ && 47 solid_color_ == other.solid_color_ &&
48 background_color_ == other.background_color_ && display_lists_equal; 48 background_color_ == other.background_color_ && display_lists_equal;
49 } 49 }
50 50
51 } // namespace cc 51 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/fake_layer_tree_host.h ('k') | cc/test/layer_tree_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698