Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Code-Review | +1 |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Sorry for the delay.
#include "components/viz/common/resources/shared_image_format.h"
nit: this is a dup incl of header
class SharedImageFormat;
this should not be a forward declaration.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Address some feedback, also fixed setting PrefersExternalSampler as that was missing earlier.
#include "components/viz/common/resources/shared_image_format.h"
nit: this is a dup incl of header
Sounds good, done.
class SharedImageFormat;
this should not be a forward declaration.
There's some chromium [guidance](https://chromium.googlesource.com/chromium/src/+/HEAD/styleguide/c++/c++.md#forward-declarations-vs_includes) that states forward declarations are preferred although there was some work done around IWYU so I'm not sure.
I'll keep it as is for now, as adding the header leads to adding to DEPS.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Code-Review | +1 |
specific_include_rules = {
Wondering if there are motives to make `shared_image_format.h` more widely-available.
class SharedImageFormat;
Saifuddin Hitawalathis should not be a forward declaration.
There's some chromium [guidance](https://chromium.googlesource.com/chromium/src/+/HEAD/styleguide/c++/c++.md#forward-declarations-vs_includes) that states forward declarations are preferred although there was some work done around IWYU so I'm not sure.
I'll keep it as is for now, as adding the header leads to adding to DEPS.
Yes, although it is a pass-by-value in declaration so the compiler needs to know the size of `SharedImageFormat` when it sees a `Filter()` definition, which forces every definition to perform the `include`. In reality, the compiler didn't complain is because the actual definitions always include `shared_image_format.h`.
I find no clear instructions on whether this is a good/bad practice, doing this declaration is just the same spirit to using [callback_forward.h](https://chromium.googlesource.com/chromium/src/+/HEAD/base/functional/callback_forward.h) to avoid inclusion headaches.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Commit-Queue | +2 |
Thanks for reviewing!
specific_include_rules = {
Wondering if there are motives to make `shared_image_format.h` more widely-available.
Eventually we kinda want to use it in ui/ozone directly but trying to tackle usages other than ui/ozone for now. Or we might want to have NativePixmapFormat which will be scoped to ui/ozone similar to NativePixmapUsage, if we cannot use SharedImageFormat in ui/ozone for some reason. The primary motivation is to get rid of BufferFormat as that still represents something related to GMBs and there can be confusion on client-end since GMBs are handled by shared images now because of MappableSI.
I did add it to BUILD file but for some reason gn check complained that include rules were missing and needed this.
class SharedImageFormat;
Saifuddin Hitawalathis should not be a forward declaration.
Kramer GeThere's some chromium [guidance](https://chromium.googlesource.com/chromium/src/+/HEAD/styleguide/c++/c++.md#forward-declarations-vs_includes) that states forward declarations are preferred although there was some work done around IWYU so I'm not sure.
I'll keep it as is for now, as adding the header leads to adding to DEPS.
Yes, although it is a pass-by-value in declaration so the compiler needs to know the size of `SharedImageFormat` when it sees a `Filter()` definition, which forces every definition to perform the `include`. In reality, the compiler didn't complain is because the actual definitions always include `shared_image_format.h`.
I find no clear instructions on whether this is a good/bad practice, doing this declaration is just the same spirit to using [callback_forward.h](https://chromium.googlesource.com/chromium/src/+/HEAD/base/functional/callback_forward.h) to avoid inclusion headaches.
Right yeah, I guess in this case doing forward declaration doesn't make much sense.
I can look more into it in follow-ups as I will likely need to handle ui/ozone DEPs again as most future conversions will involve ozone.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
[ozone][gpu] Use SharedImageFormat in DrmModifiersFilter
As part of BufferFormat to SharedImageFormat conversions, convert
DrmModifiersFilter and its subclasses to use SharedImageFormat instead
of BufferFormat. Also update relevant callsites to use
SharedImageFormat.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |