OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "components/test_runner/pixel_dump.h" | 5 #include "content/shell/test_runner/pixel_dump.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "base/logging.h" | 12 #include "base/logging.h" |
13 #include "base/threading/thread_task_runner_handle.h" | 13 #include "base/threading/thread_task_runner_handle.h" |
14 #include "base/trace_event/trace_event.h" | 14 #include "base/trace_event/trace_event.h" |
15 #include "cc/paint/paint_canvas.h" | 15 #include "cc/paint/paint_canvas.h" |
16 #include "cc/paint/paint_flags.h" | 16 #include "cc/paint/paint_flags.h" |
17 #include "components/test_runner/layout_test_runtime_flags.h" | 17 #include "content/shell/test_runner/layout_test_runtime_flags.h" |
18 // FIXME: Including platform_canvas.h here is a layering violation. | 18 // FIXME: Including platform_canvas.h here is a layering violation. |
19 #include "skia/ext/platform_canvas.h" | 19 #include "skia/ext/platform_canvas.h" |
20 #include "third_party/WebKit/public/platform/Platform.h" | 20 #include "third_party/WebKit/public/platform/Platform.h" |
21 #include "third_party/WebKit/public/platform/WebCompositeAndReadbackAsyncCallbac
k.h" | 21 #include "third_party/WebKit/public/platform/WebCompositeAndReadbackAsyncCallbac
k.h" |
22 #include "third_party/WebKit/public/platform/WebImage.h" | 22 #include "third_party/WebKit/public/platform/WebImage.h" |
23 #include "third_party/WebKit/public/platform/WebMockClipboard.h" | 23 #include "third_party/WebKit/public/platform/WebMockClipboard.h" |
24 #include "third_party/WebKit/public/platform/WebPoint.h" | 24 #include "third_party/WebKit/public/platform/WebPoint.h" |
25 #include "third_party/WebKit/public/web/WebFrame.h" | 25 #include "third_party/WebKit/public/web/WebFrame.h" |
26 #include "third_party/WebKit/public/web/WebLocalFrame.h" | 26 #include "third_party/WebKit/public/web/WebLocalFrame.h" |
27 #include "third_party/WebKit/public/web/WebPagePopup.h" | 27 #include "third_party/WebKit/public/web/WebPagePopup.h" |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 | 203 |
204 blink::WebImage image = static_cast<blink::WebMockClipboard*>( | 204 blink::WebImage image = static_cast<blink::WebMockClipboard*>( |
205 blink::Platform::current()->clipboard()) | 205 blink::Platform::current()->clipboard()) |
206 ->readRawImage(blink::WebClipboard::Buffer()); | 206 ->readRawImage(blink::WebClipboard::Buffer()); |
207 const SkBitmap& bitmap = image.getSkBitmap(); | 207 const SkBitmap& bitmap = image.getSkBitmap(); |
208 SkAutoLockPixels autoLock(bitmap); | 208 SkAutoLockPixels autoLock(bitmap); |
209 callback.Run(bitmap); | 209 callback.Run(bitmap); |
210 } | 210 } |
211 | 211 |
212 } // namespace test_runner | 212 } // namespace test_runner |
OLD | NEW |