OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_picture_pile_impl.h" | 5 #include "cc/test/fake_picture_pile_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 void FakePicturePileImpl::PlaybackToCanvas(SkCanvas* canvas, | 107 void FakePicturePileImpl::PlaybackToCanvas(SkCanvas* canvas, |
108 const gfx::Rect& canvas_rect, | 108 const gfx::Rect& canvas_rect, |
109 float contents_scale) const { | 109 float contents_scale) const { |
110 if (playback_allowed_event_) | 110 if (playback_allowed_event_) |
111 playback_allowed_event_->Wait(); | 111 playback_allowed_event_->Wait(); |
112 PicturePileImpl::PlaybackToCanvas(canvas, canvas_rect, contents_scale); | 112 PicturePileImpl::PlaybackToCanvas(canvas, canvas_rect, contents_scale); |
113 } | 113 } |
114 | 114 |
115 bool FakePicturePileImpl::HasRecordingAt(int x, int y) const { | 115 bool FakePicturePileImpl::HasRecordingAt(int x, int y) const { |
116 PictureMap::const_iterator found = picture_map_.find(PictureMapKey(x, y)); | 116 PictureMap::const_iterator found = picture_map_.find(PictureMapKey(x, y)); |
117 if (found == picture_map_.end()) | 117 return found != picture_map_.end(); |
118 return false; | |
119 return !!found->second.GetPicture(); | |
120 } | 118 } |
121 | 119 |
122 } // namespace cc | 120 } // namespace cc |
OLD | NEW |