Commit 50bf9fc2 authored by Eric Karl's avatar Eric Karl Committed by Commit Bot

Android OOP-D: Add overlay candidate validator to GLOutputSurfaceAndroid

We had a custom OverlayCandidateValidator for AndroidOutputSurface, but
this was missing from GLOutputSurfaceAndroid.

Bug: 868504
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel
Change-Id: I9a7b58575378d8c516b10dba04df8f80a2ccf77d
Reviewed-on: https://chromium-review.googlesource.com/1153604
Commit-Queue: Eric Karl <ericrk@chromium.org>
Reviewed-by: default avatarkylechar <kylechar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#579232}
parent f77466c6
......@@ -4,12 +4,16 @@
#include "components/viz/service/display_embedder/gl_output_surface_android.h"
#include "components/viz/service/display_embedder/compositor_overlay_candidate_validator_android.h"
namespace viz {
GLOutputSurfaceAndroid::GLOutputSurfaceAndroid(
scoped_refptr<VizProcessContextProvider> context_provider,
SyntheticBeginFrameSource* synthetic_begin_frame_source)
: GLOutputSurface(context_provider, synthetic_begin_frame_source) {}
: GLOutputSurface(context_provider, synthetic_begin_frame_source),
overlay_candidate_validator_(
std::make_unique<CompositorOverlayCandidateValidatorAndroid>()) {}
GLOutputSurfaceAndroid::~GLOutputSurfaceAndroid() = default;
......@@ -23,4 +27,9 @@ void GLOutputSurfaceAndroid::HandlePartialSwap(
flags, std::move(swap_callback), std::move(presentation_callback));
}
OverlayCandidateValidator*
GLOutputSurfaceAndroid::GetOverlayCandidateValidator() const {
return overlay_candidate_validator_.get();
}
} // namespace viz
......@@ -10,6 +10,7 @@
#include "components/viz/service/display_embedder/gl_output_surface.h"
namespace viz {
class OverlayCandidateValidator;
class GLOutputSurfaceAndroid : public GLOutputSurface {
public:
......@@ -24,8 +25,11 @@ class GLOutputSurfaceAndroid : public GLOutputSurface {
uint32_t flags,
gpu::ContextSupport::SwapCompletedCallback swap_callback,
gpu::ContextSupport::PresentationCallback presentation_callback) override;
OverlayCandidateValidator* GetOverlayCandidateValidator() const override;
private:
std::unique_ptr<OverlayCandidateValidator> overlay_candidate_validator_;
DISALLOW_COPY_AND_ASSIGN(GLOutputSurfaceAndroid);
};
......
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