Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(144)

Side by Side Diff: ui/ozone/gl/gl_image_ozone_native_pixmap_drm_unittest.cc

Issue 2317913003: ui/ozone: Fix some typos. (Closed)
Patch Set: Fix one more typo in Ozone DRM. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <fcntl.h> 5 #include <fcntl.h>
6 #include <libdrm/i915_drm.h> 6 #include <libdrm/i915_drm.h>
7 #include <linux/types.h> 7 #include <linux/types.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <stdio.h> 9 #include <stdio.h>
10 #include <sys/mman.h> 10 #include <sys/mman.h>
(...skipping 20 matching lines...) Expand all
31 int RoundTo64(int num) { 31 int RoundTo64(int num) {
32 return (num + 63) & ~63; 32 return (num + 63) & ~63;
33 } 33 }
34 34
35 // Create a YVU420 NativePixmap using the drm interface directly. 35 // Create a YVU420 NativePixmap using the drm interface directly.
36 scoped_refptr<ui::NativePixmap> CreateYVU420Pixmap(const gfx::Size& size, 36 scoped_refptr<ui::NativePixmap> CreateYVU420Pixmap(const gfx::Size& size,
37 const uint8_t color[4]) { 37 const uint8_t color[4]) {
38 DCHECK_EQ(0, size.width() % 2); 38 DCHECK_EQ(0, size.width() % 2);
39 DCHECK_EQ(0, size.height() % 2); 39 DCHECK_EQ(0, size.height() % 2);
40 40
41 // TODO(dcastagna): move the creation of the drmbuf to minigmb, where it's 41 // TODO(dcastagna): move the creation of the drmbuf to minigbm, where it's
42 // supposed to be, so we can abastract it and use SurfaceFactoryOzone. 42 // supposed to be, so we can abstract it and use SurfaceFactoryOzone.
43 base::ScopedFD drm_fd( 43 base::ScopedFD drm_fd(
44 HANDLE_EINTR(open("/dev/dri/card0", O_RDWR | O_CLOEXEC))); 44 HANDLE_EINTR(open("/dev/dri/card0", O_RDWR | O_CLOEXEC)));
45 DCHECK(drm_fd.is_valid()) << "Couldn't open '/dev/dri/card0'"; 45 DCHECK(drm_fd.is_valid()) << "Couldn't open '/dev/dri/card0'";
46 46
47 std::vector<int> pitches{RoundTo64(size.width()), RoundTo64(size.width() / 2), 47 std::vector<int> pitches{RoundTo64(size.width()), RoundTo64(size.width() / 2),
48 RoundTo64(size.width() / 2)}; 48 RoundTo64(size.width() / 2)};
49 std::vector<int> offsets{ 49 std::vector<int> offsets{
50 0, pitches[0] * size.height() + pitches[1] * size.height() / 2, 50 0, pitches[0] * size.height() + pitches[1] * size.height() / 2,
51 pitches[0] * size.height(), 51 pitches[0] * size.height(),
52 }; 52 };
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 INSTANTIATE_TYPED_TEST_CASE_P(DISABLED_GLImageOzoneNativePixmapDrm, 130 INSTANTIATE_TYPED_TEST_CASE_P(DISABLED_GLImageOzoneNativePixmapDrm,
131 GLImageTest, 131 GLImageTest,
132 GLImageOzoneNativePixmapDrmTestDelegate); 132 GLImageOzoneNativePixmapDrmTestDelegate);
133 133
134 INSTANTIATE_TYPED_TEST_CASE_P(DISABLED_GLImageOzoneNativePixmapDrm, 134 INSTANTIATE_TYPED_TEST_CASE_P(DISABLED_GLImageOzoneNativePixmapDrm,
135 GLImageBindTest, 135 GLImageBindTest,
136 GLImageOzoneNativePixmapDrmTestDelegate); 136 GLImageOzoneNativePixmapDrmTestDelegate);
137 137
138 } // namespace 138 } // namespace
139 } // namespace gl 139 } // namespace gl
OLDNEW
« no previous file with comments | « no previous file | ui/ozone/platform/drm/ozone_platform_gbm.cc » ('j') | ui/ozone/public/ozone_platform.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698