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

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

Issue 1421483005: Reland: Remove DCHECK_IMPLIES/CHECK_IMPLIES. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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/scheduler/scheduler_state_machine.cc ('k') | cc/tiles/picture_layer_tiling.cc » ('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_display_list_raster_source.h" 5 #include "cc/test/fake_display_list_raster_source.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/synchronization/waitable_event.h" 9 #include "base/synchronization/waitable_event.h"
10 #include "cc/test/fake_display_list_recording_source.h" 10 #include "cc/test/fake_display_list_recording_source.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 new FakeDisplayListRasterSource(recording_source.get(), false)); 75 new FakeDisplayListRasterSource(recording_source.get(), false));
76 if (!raster_source->IsSolidColor()) 76 if (!raster_source->IsSolidColor())
77 ADD_FAILURE() << "Not solid color!"; 77 ADD_FAILURE() << "Not solid color!";
78 return raster_source; 78 return raster_source;
79 } 79 }
80 80
81 scoped_refptr<FakeDisplayListRasterSource> 81 scoped_refptr<FakeDisplayListRasterSource>
82 FakeDisplayListRasterSource::CreatePartiallyFilled( 82 FakeDisplayListRasterSource::CreatePartiallyFilled(
83 const gfx::Size& size, 83 const gfx::Size& size,
84 const gfx::Rect& recorded_viewport) { 84 const gfx::Rect& recorded_viewport) {
85 DCHECK_IMPLIES(!recorded_viewport.IsEmpty(), 85 DCHECK(recorded_viewport.IsEmpty() ||
86 gfx::Rect(size).Contains(recorded_viewport)); 86 gfx::Rect(size).Contains(recorded_viewport));
87 auto recording_source = FakeDisplayListRecordingSource::CreateRecordingSource( 87 auto recording_source = FakeDisplayListRecordingSource::CreateRecordingSource(
88 recorded_viewport, size); 88 recorded_viewport, size);
89 89
90 SkPaint red_paint; 90 SkPaint red_paint;
91 red_paint.setColor(SK_ColorRED); 91 red_paint.setColor(SK_ColorRED);
92 recording_source->add_draw_rect_with_paint(gfx::Rect(size), red_paint); 92 recording_source->add_draw_rect_with_paint(gfx::Rect(size), red_paint);
93 93
94 gfx::Size smaller_size(size.width() - 10, size.height() - 10); 94 gfx::Size smaller_size(size.width() - 10, size.height() - 10);
95 SkPaint green_paint; 95 SkPaint green_paint;
96 green_paint.setColor(SK_ColorGREEN); 96 green_paint.setColor(SK_ColorGREEN);
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 const gfx::Rect& canvas_bitmap_rect, 149 const gfx::Rect& canvas_bitmap_rect,
150 const gfx::Rect& canvas_playback_rect, 150 const gfx::Rect& canvas_playback_rect,
151 float contents_scale) const { 151 float contents_scale) const {
152 if (playback_allowed_event_) 152 if (playback_allowed_event_)
153 playback_allowed_event_->Wait(); 153 playback_allowed_event_->Wait();
154 DisplayListRasterSource::PlaybackToCanvas( 154 DisplayListRasterSource::PlaybackToCanvas(
155 canvas, canvas_bitmap_rect, canvas_playback_rect, contents_scale); 155 canvas, canvas_bitmap_rect, canvas_playback_rect, contents_scale);
156 } 156 }
157 157
158 } // namespace cc 158 } // namespace cc
OLDNEW
« no previous file with comments | « cc/scheduler/scheduler_state_machine.cc ('k') | cc/tiles/picture_layer_tiling.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698