Commit 321d70a0 authored by Daniel Bratell's avatar Daniel Bratell Committed by Commit Bot

Make a ColorSpace dep public to avoid include errors

Since mojom will put headers from ui/gfx/ipc/color into
code in other targets, the dependency need to be public so
that other code get the right dependency.

Without the fix gn check --check-generated reports this:

ERROR at //out/Default/gen/services/viz/public/interfaces/compositing/compositor_frame.mojom-test-utils.cc:51:11: Can't include this header from here.
#include "ui/gfx/ipc/color/gfx_param_traits.h"
          ^----------------------------------
The target:
  //services/viz/public/interfaces:interfaces
is including a file from the target:
  //ui/gfx/ipc/color:color

It's usually best to depend directly on the destination target.
In some cases, the destination target is considered a subcomponent
of an intermediate target. In this case, the intermediate target
should depend publicly on the destination to forward the ability
to include headers.

Dependency chain (there may also be others):
  //services/viz/public/interfaces:interfaces -->
  //ui/gfx/mojo:mojo --[private]-->
  //ui/gfx/ipc/color:color

Bug: 938893
Change-Id: I5ab887bc137223c74e7b84ffc75a9fee0b3c01cb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1538412
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Auto-Submit: Daniel Bratell <bratell@opera.com>
Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#644370}
parent 4da3ecc9
...@@ -8,8 +8,6 @@ traits_headers = [ "//ui/gfx/ipc/color/gfx_param_traits.h" ] ...@@ -8,8 +8,6 @@ traits_headers = [ "//ui/gfx/ipc/color/gfx_param_traits.h" ]
public_deps = [ public_deps = [
"//ipc", "//ipc",
"//ui/gfx", "//ui/gfx",
]
deps = [
"//ui/gfx/ipc/color", "//ui/gfx/ipc/color",
] ]
type_mappings = [ "gfx.mojom.ColorSpace=gfx::ColorSpace" ] type_mappings = [ "gfx.mojom.ColorSpace=gfx::ColorSpace" ]
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment