Skip to content

Commit

Permalink
[Fuchsia] Enable ozone_demo and ozone_gl_unittests targets
Browse files Browse the repository at this point in the history
Also enabled gl_image_native_pixmap.cc on Fuchisa. ExportHandle() is
currently stubbed as NOTIMPLEMENTED.

Bug: 852011, 766360
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: I2978a320fef928f32b3ff27473c593293a8168d6
Reviewed-on: https://chromium-review.googlesource.com/1112592
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Michael Spang <spang@chromium.org>
Commit-Queue: Sergey Ulanov <sergeyu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#569912}
  • Loading branch information
SergeyUlanov authored and Commit Bot committed Jun 23, 2018
1 parent fe617cd commit 58afcdc
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
10 changes: 2 additions & 8 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -260,16 +260,10 @@ group("gn_all") {
deps += [
"//ui/ozone",
"//ui/ozone:ozone_unittests",
"//ui/ozone/demo",
"//ui/ozone/gl:ozone_gl_unittests",
]

# TODO(crbug.com/766360): These require a working GL implementation.
if (!is_fuchsia) {
deps += [
"//ui/ozone/demo",
"//ui/ozone/gl:ozone_gl_unittests",
]
}

if (ozone_platform_x11) {
deps += [ "//ui/ozone:ozone_x11_unittests" ]
}
Expand Down
2 changes: 1 addition & 1 deletion ui/gl/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ component("gl") {
"gl_surface_egl.h",
]

if (is_linux || (is_win && use_ozone)) {
if (is_linux || use_ozone) {
sources += [
"gl_image_native_pixmap.cc",
"gl_image_native_pixmap.h",
Expand Down
8 changes: 8 additions & 0 deletions ui/gl/gl_image_native_pixmap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

#include <vector>

#include "base/files/scoped_file.h"
#include "build/build_config.h"
#include "ui/gfx/buffer_format_util.h"
#include "ui/gl/egl_util.h"
#include "ui/gl/gl_context.h"
Expand Down Expand Up @@ -282,6 +284,11 @@ gfx::NativePixmapHandle GLImageNativePixmap::ExportHandle() {
}
}

#if defined(OS_FUCHSIA)
// TODO(crbug.com/852011): Implement image handle export on Fuchsia.
NOTIMPLEMENTED();
return gfx::NativePixmapHandle();
#else // defined(OS_FUCHSIA)
std::vector<int> fds(num_planes);
std::vector<EGLint> strides(num_planes);
std::vector<EGLint> offsets(num_planes);
Expand Down Expand Up @@ -317,6 +324,7 @@ gfx::NativePixmapHandle GLImageNativePixmap::ExportHandle() {
}

return handle;
#endif // !defined(OS_FUCHSIA)
}

unsigned GLImageNativePixmap::GetInternalFormat() {
Expand Down

0 comments on commit 58afcdc

Please sign in to comment.