| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/shell/renderer/layout_test/blink_test_runner.h" | 5 #include "content/shell/renderer/layout_test/blink_test_runner.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <clocale> | 8 #include <clocale> |
| 9 #include <cmath> | 9 #include <cmath> |
| 10 | 10 |
| (...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 750 // incremental painting in slimming paint mode. | 750 // incremental painting in slimming paint mode. |
| 751 proxy()->LayoutAndPaintAsyncThen(base::Bind( | 751 proxy()->LayoutAndPaintAsyncThen(base::Bind( |
| 752 &BlinkTestRunner::CaptureDumpComplete, base::Unretained(this))); | 752 &BlinkTestRunner::CaptureDumpComplete, base::Unretained(this))); |
| 753 return; | 753 return; |
| 754 } | 754 } |
| 755 | 755 |
| 756 CaptureDumpComplete(); | 756 CaptureDumpComplete(); |
| 757 } | 757 } |
| 758 | 758 |
| 759 void BlinkTestRunner::CaptureDumpPixels(const SkBitmap& snapshot) { | 759 void BlinkTestRunner::CaptureDumpPixels(const SkBitmap& snapshot) { |
| 760 DCHECK_NE(0, snapshot.info().fWidth); | 760 DCHECK_NE(0, snapshot.info().width()); |
| 761 DCHECK_NE(0, snapshot.info().fHeight); | 761 DCHECK_NE(0, snapshot.info().height()); |
| 762 | 762 |
| 763 SkAutoLockPixels snapshot_lock(snapshot); | 763 SkAutoLockPixels snapshot_lock(snapshot); |
| 764 // The snapshot arrives from the GPU process via shared memory. Because MSan | 764 // The snapshot arrives from the GPU process via shared memory. Because MSan |
| 765 // can't track initializedness across processes, we must assure it that the | 765 // can't track initializedness across processes, we must assure it that the |
| 766 // pixels are in fact initialized. | 766 // pixels are in fact initialized. |
| 767 MSAN_UNPOISON(snapshot.getPixels(), snapshot.getSize()); | 767 MSAN_UNPOISON(snapshot.getPixels(), snapshot.getSize()); |
| 768 base::MD5Digest digest; | 768 base::MD5Digest digest; |
| 769 base::MD5Sum(snapshot.getPixels(), snapshot.getSize(), &digest); | 769 base::MD5Sum(snapshot.getPixels(), snapshot.getSize(), &digest); |
| 770 std::string actual_pixel_hash = base::MD5DigestToBase16(digest); | 770 std::string actual_pixel_hash = base::MD5DigestToBase16(digest); |
| 771 | 771 |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 840 | 840 |
| 841 leak_detector_->TryLeakDetection(main_frame); | 841 leak_detector_->TryLeakDetection(main_frame); |
| 842 } | 842 } |
| 843 | 843 |
| 844 void BlinkTestRunner::ReportLeakDetectionResult( | 844 void BlinkTestRunner::ReportLeakDetectionResult( |
| 845 const LeakDetectionResult& report) { | 845 const LeakDetectionResult& report) { |
| 846 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); | 846 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); |
| 847 } | 847 } |
| 848 | 848 |
| 849 } // namespace content | 849 } // namespace content |
| OLD | NEW |