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 "testing/gtest/include/gtest/gtest.h" | 5 #include "testing/gtest/include/gtest/gtest.h" |
6 #include "third_party/skia/include/core/SkCanvas.h" | 6 #include "third_party/skia/include/core/SkCanvas.h" |
7 #include "third_party/skia/include/core/SkColor.h" | 7 #include "third_party/skia/include/core/SkColor.h" |
8 #include "third_party/skia/include/core/SkDevice.h" | 8 #include "third_party/skia/include/core/SkDevice.h" |
9 #include "ui/gfx/ozone/impl/dri_skbitmap.h" | 9 #include "ui/gfx/ozone/dri/dri_skbitmap.h" |
10 #include "ui/gfx/ozone/impl/dri_surface.h" | 10 #include "ui/gfx/ozone/dri/dri_surface.h" |
11 #include "ui/gfx/ozone/impl/hardware_display_controller.h" | 11 #include "ui/gfx/ozone/dri/hardware_display_controller.h" |
12 | 12 |
13 namespace { | 13 namespace { |
14 | 14 |
15 // Create a basic mode for a 6x4 screen. | 15 // Create a basic mode for a 6x4 screen. |
16 const drmModeModeInfo kDefaultMode = | 16 const drmModeModeInfo kDefaultMode = |
17 {0, 6, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, {'\0'}}; | 17 {0, 6, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, {'\0'}}; |
18 | 18 |
19 // Mock file descriptor ID. | 19 // Mock file descriptor ID. |
20 const int kFd = 3; | 20 const int kFd = 3; |
21 | 21 |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 for (int j = 0; j < canvas->getDeviceSize().width(); ++j) { | 203 for (int j = 0; j < canvas->getDeviceSize().width(); ++j) { |
204 if (i < clip.height() && j < clip.width()) | 204 if (i < clip.height() && j < clip.width()) |
205 EXPECT_EQ(SK_ColorWHITE, | 205 EXPECT_EQ(SK_ColorWHITE, |
206 canvas->getDevice()->accessBitmap(false).getColor(j, i)); | 206 canvas->getDevice()->accessBitmap(false).getColor(j, i)); |
207 else | 207 else |
208 EXPECT_EQ(SK_ColorBLACK, | 208 EXPECT_EQ(SK_ColorBLACK, |
209 canvas->getDevice()->accessBitmap(false).getColor(j, i)); | 209 canvas->getDevice()->accessBitmap(false).getColor(j, i)); |
210 } | 210 } |
211 } | 211 } |
212 } | 212 } |
OLD | NEW |