1 // Copyright 2018 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include "components/viz/service/display_embedder/gl_output_surface_android.h"
6 
7 namespace viz {
8 
GLOutputSurfaceAndroid(scoped_refptr<VizProcessContextProvider> context_provider,gpu::SurfaceHandle surface_handle)9 GLOutputSurfaceAndroid::GLOutputSurfaceAndroid(
10     scoped_refptr<VizProcessContextProvider> context_provider,
11     gpu::SurfaceHandle surface_handle)
12     : GLOutputSurface(context_provider, surface_handle) {}
13 
14 GLOutputSurfaceAndroid::~GLOutputSurfaceAndroid() = default;
15 
HandlePartialSwap(const gfx::Rect & sub_buffer_rect,uint32_t flags,gpu::ContextSupport::SwapCompletedCallback swap_callback,gpu::ContextSupport::PresentationCallback presentation_callback)16 void GLOutputSurfaceAndroid::HandlePartialSwap(
17     const gfx::Rect& sub_buffer_rect,
18     uint32_t flags,
19     gpu::ContextSupport::SwapCompletedCallback swap_callback,
20     gpu::ContextSupport::PresentationCallback presentation_callback) {
21   DCHECK(sub_buffer_rect.IsEmpty());
22   context_provider_->ContextSupport()->CommitOverlayPlanes(
23       flags, std::move(swap_callback), std::move(presentation_callback));
24 }
25 
26 }  // namespace viz
27