| 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 #ifndef CC_TEST_FAKE_RECORDING_SOURCE_H_ | 5 #ifndef CC_TEST_FAKE_RECORDING_SOURCE_H_ |
| 6 #define CC_TEST_FAKE_RECORDING_SOURCE_H_ | 6 #define CC_TEST_FAKE_RECORDING_SOURCE_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include "cc/base/region.h" | 10 #include "cc/base/region.h" |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 } | 95 } |
| 96 | 96 |
| 97 void add_draw_rectf_with_flags(const gfx::RectF& rect, | 97 void add_draw_rectf_with_flags(const gfx::RectF& rect, |
| 98 const PaintFlags& flags) { | 98 const PaintFlags& flags) { |
| 99 client_.add_draw_rectf(rect, flags); | 99 client_.add_draw_rectf(rect, flags); |
| 100 } | 100 } |
| 101 | 101 |
| 102 void add_draw_image(sk_sp<SkImage> image, const gfx::Point& point) { | 102 void add_draw_image(sk_sp<SkImage> image, const gfx::Point& point) { |
| 103 client_.add_draw_image(std::move(image), point, default_flags_); | 103 client_.add_draw_image(std::move(image), point, default_flags_); |
| 104 } | 104 } |
| 105 void add_draw_image(PaintImage image, const gfx::Point& point) { |
| 106 client_.add_draw_image(std::move(image), point, default_flags_); |
| 107 } |
| 105 | 108 |
| 106 void add_draw_image_with_transform(sk_sp<SkImage> image, | 109 void add_draw_image_with_transform(sk_sp<SkImage> image, |
| 107 const gfx::Transform& transform) { | 110 const gfx::Transform& transform) { |
| 108 client_.add_draw_image_with_transform(std::move(image), transform, | 111 client_.add_draw_image_with_transform(std::move(image), transform, |
| 109 default_flags_); | 112 default_flags_); |
| 110 } | 113 } |
| 111 | 114 |
| 112 void add_draw_image_with_flags(sk_sp<SkImage> image, | 115 void add_draw_image_with_flags(sk_sp<SkImage> image, |
| 113 const gfx::Point& point, | 116 const gfx::Point& point, |
| 114 const PaintFlags& flags) { | 117 const PaintFlags& flags) { |
| (...skipping 22 matching lines...) Expand all Loading... |
| 137 | 140 |
| 138 private: | 141 private: |
| 139 FakeContentLayerClient client_; | 142 FakeContentLayerClient client_; |
| 140 PaintFlags default_flags_; | 143 PaintFlags default_flags_; |
| 141 base::WaitableEvent* playback_allowed_event_; | 144 base::WaitableEvent* playback_allowed_event_; |
| 142 }; | 145 }; |
| 143 | 146 |
| 144 } // namespace cc | 147 } // namespace cc |
| 145 | 148 |
| 146 #endif // CC_TEST_FAKE_RECORDING_SOURCE_H_ | 149 #endif // CC_TEST_FAKE_RECORDING_SOURCE_H_ |
| OLD | NEW |