#include "components/viz/service/display/overlay_processor_interface.h"
#include <utility>
#include "base/memory/ptr_util.h"
#include "base/metrics/histogram_macros.h"
#include "build/build_config.h"
#include "build/chromecast_buildflags.h"
#include "build/chromeos_buildflags.h"
#include "components/viz/common/buildflags.h"
#include "components/viz/common/display/renderer_settings.h"
#include "components/viz/common/features.h"
#include "components/viz/service/display/display_compositor_memory_and_task_controller.h"
#include "components/viz/service/display/overlay_processor_stub.h"
#include "ui/gfx/overlay_priority_hint.h"
#if BUILDFLAG(IS_APPLE)
#include "components/viz/service/display/overlay_processor_mac.h"
#elif BUILDFLAG(IS_WIN)
#include "components/viz/service/display/overlay_processor_win.h"
#elif BUILDFLAG(IS_ANDROID)
#include "components/viz/service/display/overlay_processor_android.h"
#include "components/viz/service/display/overlay_processor_surface_control.h"
#elif BUILDFLAG(IS_OZONE)
#include "components/viz/service/display/overlay_processor_delegated.h"
#include "components/viz/service/display/overlay_processor_ozone.h"
#include "ui/ozone/public/overlay_manager_ozone.h"
#include "ui/ozone/public/ozone_platform.h"
#endif
namespace viz {
namespace {
enum class UnderlayDamage { … };
}
void OverlayProcessorInterface::RecordOverlayDamageRectHistograms(
bool is_overlay,
bool has_occluding_surface_damage,
bool zero_damage_rect) { … }
OverlayProcessorInterface::OutputSurfaceOverlayPlane::
OutputSurfaceOverlayPlane() = default;
OverlayProcessorInterface::OutputSurfaceOverlayPlane::OutputSurfaceOverlayPlane(
const OutputSurfaceOverlayPlane&) = default;
OverlayProcessorInterface::OutputSurfaceOverlayPlane&
OverlayProcessorInterface::OutputSurfaceOverlayPlane::operator=(
const OutputSurfaceOverlayPlane&) = default;
OverlayProcessorInterface::OutputSurfaceOverlayPlane::
~OutputSurfaceOverlayPlane() = default;
std::unique_ptr<OverlayProcessorInterface>
OverlayProcessorInterface::CreateOverlayProcessor(
OutputSurface* output_surface,
gpu::SurfaceHandle surface_handle,
const OutputSurface::Capabilities& capabilities,
DisplayCompositorMemoryAndTaskController* display_controller,
gpu::SharedImageInterface* shared_image_interface,
const RendererSettings& renderer_settings,
const DebugRendererSettings* debug_settings) { … }
bool OverlayProcessorInterface::DisableSplittingQuads() const { … }
OverlayProcessorInterface::OutputSurfaceOverlayPlane
OverlayProcessorInterface::ProcessOutputSurfaceAsOverlay(
const gfx::Size& viewport_size,
const gfx::Size& resource_size,
const SharedImageFormat si_format,
const gfx::ColorSpace& color_space,
bool has_alpha,
float opacity,
const gpu::Mailbox& mailbox) { … }
void OverlayProcessorInterface::ScheduleOverlays(
DisplayResourceProvider* display_resource_provider) { … }
void OverlayProcessorInterface::OverlayPresentationComplete() { … }
gfx::CALayerResult OverlayProcessorInterface::GetCALayerErrorCode() const { … }
gfx::RectF OverlayProcessorInterface::GetUnassignedDamage() const { … }
bool OverlayProcessorInterface::SupportsFlipRotateTransform() const { … }
}