| Index: gpu/ipc/service/gl_image_direct_composition.h
|
| diff --git a/gpu/ipc/service/gl_image_direct_composition.h b/gpu/ipc/service/gl_image_direct_composition.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..c1cc33c97ca1153718929a5ebbadfc0bf2a035b0
|
| --- /dev/null
|
| +++ b/gpu/ipc/service/gl_image_direct_composition.h
|
| @@ -0,0 +1,56 @@
|
| +// Copyright 2017 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef GPU_IPC_SERVICE_GL_IMAGE_DIRECT_COMPOSITION_H_
|
| +#define GPU_IPC_SERVICE_GL_IMAGE_DIRECT_COMPOSITION_H_
|
| +
|
| +#include <d3d11.h>
|
| +#include <dcomp.h>
|
| +
|
| +#include "base/win/scoped_comptr.h"
|
| +#include "gpu/ipc/service/direct_composition_child_surface_win.h"
|
| +#include "ui/gfx/buffer_types.h"
|
| +#include "ui/gl/gl_image.h"
|
| +#include "ui/gl/gl_surface.h"
|
| +#include "ui/gl/gl_surface_egl.h"
|
| +
|
| +namespace gpu {
|
| +
|
| +class GLImageDirectComposition : public gl::GLImage {
|
| + public:
|
| + GLImageDirectComposition(const gfx::Size& size,
|
| + gfx::BufferFormat format,
|
| + gfx::BufferUsage usage);
|
| +
|
| + // gl::GLImage implementation.
|
| + gfx::Size GetSize() override;
|
| + unsigned GetInternalFormat() override;
|
| + bool BindTexImage(unsigned target) override;
|
| + void ReleaseTexImage(unsigned target) override;
|
| + bool CopyTexImage(unsigned target) override;
|
| + bool CopyTexSubImage(unsigned target,
|
| + const gfx::Point& offset,
|
| + const gfx::Rect& rect) override;
|
| + bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget,
|
| + int z_order,
|
| + gfx::OverlayTransform transform,
|
| + const gfx::Rect& bounds_rect,
|
| + const gfx::RectF& crop_rect) override;
|
| + void Flush() override;
|
| + void OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd,
|
| + uint64_t process_tracing_id,
|
| + const std::string& dump_name) override;
|
| + Type GetType() const override;
|
| + scoped_refptr<gl::GLSurface> GetSurface() override;
|
| +
|
| + protected:
|
| + ~GLImageDirectComposition() override;
|
| +
|
| + gfx::Size size_;
|
| + scoped_refptr<DirectCompositionChildSurfaceWin> image_surface_;
|
| +};
|
| +
|
| +} // namespace gpu
|
| +
|
| +#endif // GPU_IPC_SERVICE_GL_IMAGE_DIRECT_COMPOSITION_H_
|
|
|