OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "base/memory/scoped_ptr.h" | 5 #include "base/memory/scoped_ptr.h" |
6 #include "base/message_loop/message_loop.h" | 6 #include "base/message_loop/message_loop.h" |
7 #include "cc/output/software_frame_data.h" | 7 #include "cc/output/software_frame_data.h" |
8 #include "content/browser/compositor/software_output_device_ozone.h" | 8 #include "content/browser/compositor/software_output_device_ozone.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
10 #include "third_party/skia/include/core/SkDevice.h" | 10 #include "third_party/skia/include/core/SkDevice.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 void OnDamageRect(const gfx::Rect& damaged_region) override {} | 34 void OnDamageRect(const gfx::Rect& damaged_region) override {} |
35 void DispatchEvent(ui::Event* event) override {} | 35 void DispatchEvent(ui::Event* event) override {} |
36 void OnCloseRequest() override {} | 36 void OnCloseRequest() override {} |
37 void OnClosed() override {} | 37 void OnClosed() override {} |
38 void OnWindowStateChanged(ui::PlatformWindowState new_state) override {} | 38 void OnWindowStateChanged(ui::PlatformWindowState new_state) override {} |
39 void OnLostCapture() override {} | 39 void OnLostCapture() override {} |
40 void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget) override { | 40 void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget) override { |
41 widget_ = widget; | 41 widget_ = widget; |
42 } | 42 } |
43 void OnActivationChanged(bool active) override {} | 43 void OnActivationChanged(bool active) override {} |
| 44 void OnChangedSurface() override {} |
44 | 45 |
45 private: | 46 private: |
46 gfx::AcceleratedWidget widget_; | 47 gfx::AcceleratedWidget widget_; |
47 | 48 |
48 DISALLOW_COPY_AND_ASSIGN(TestPlatformWindowDelegate); | 49 DISALLOW_COPY_AND_ASSIGN(TestPlatformWindowDelegate); |
49 }; | 50 }; |
50 | 51 |
51 } // namespace | 52 } // namespace |
52 | 53 |
53 class SoftwareOutputDeviceOzoneTest : public testing::Test { | 54 class SoftwareOutputDeviceOzoneTest : public testing::Test { |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 const SkPMColor black = SkPreMultiplyColor(SK_ColorBLACK); | 168 const SkPMColor black = SkPreMultiplyColor(SK_ColorBLACK); |
168 for (int i = 0; i < area.height(); ++i) { | 169 for (int i = 0; i < area.height(); ++i) { |
169 for (int j = 0; j < area.width(); ++j) { | 170 for (int j = 0; j < area.width(); ++j) { |
170 if (j < damage.width() && i < damage.height()) | 171 if (j < damage.width() && i < damage.height()) |
171 EXPECT_EQ(white, pixels[i * area.width() + j]); | 172 EXPECT_EQ(white, pixels[i * area.width() + j]); |
172 else | 173 else |
173 EXPECT_EQ(black, pixels[i * area.width() + j]); | 174 EXPECT_EQ(black, pixels[i * area.width() + j]); |
174 } | 175 } |
175 } | 176 } |
176 } | 177 } |
OLD | NEW |