| Index: gpu/ipc/service/gl_image_direct_composition.cc
|
| diff --git a/gpu/ipc/service/gl_image_direct_composition.cc b/gpu/ipc/service/gl_image_direct_composition.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..0b833c94fae022ec4896d4455405315bf8c27ce4
|
| --- /dev/null
|
| +++ b/gpu/ipc/service/gl_image_direct_composition.cc
|
| @@ -0,0 +1,69 @@
|
| +// 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.
|
| +
|
| +#include "gpu/ipc/service/gl_image_direct_composition.h"
|
| +
|
| +namespace gpu {
|
| +
|
| +GLImageDirectComposition::GLImageDirectComposition(const gfx::Size& size,
|
| + gfx::BufferFormat format,
|
| + gfx::BufferUsage usage)
|
| + : size_(size) {
|
| + image_surface_ = make_scoped_refptr(new DirectCompositionChildSurfaceWin(
|
| + size, format == gfx::BufferFormat::RGBA_8888,
|
| + usage != gfx::BufferUsage::SCANOUT_ASYNC));
|
| + image_surface_->Initialize();
|
| +}
|
| +
|
| +GLImageDirectComposition::~GLImageDirectComposition() {}
|
| +
|
| +gfx::Size GLImageDirectComposition::GetSize() {
|
| + return size_;
|
| +}
|
| +
|
| +unsigned GLImageDirectComposition::GetInternalFormat() {
|
| + return GL_RGBA;
|
| +}
|
| +
|
| +bool GLImageDirectComposition::BindTexImage(unsigned target) {
|
| + return false;
|
| +}
|
| +
|
| +void GLImageDirectComposition::ReleaseTexImage(unsigned target) {}
|
| +
|
| +bool GLImageDirectComposition::CopyTexImage(unsigned target) {
|
| + return false;
|
| +}
|
| +
|
| +bool GLImageDirectComposition::CopyTexSubImage(unsigned target,
|
| + const gfx::Point& offset,
|
| + const gfx::Rect& rect) {
|
| + return false;
|
| +}
|
| +
|
| +bool GLImageDirectComposition::ScheduleOverlayPlane(
|
| + gfx::AcceleratedWidget widget,
|
| + int z_order,
|
| + gfx::OverlayTransform transform,
|
| + const gfx::Rect& bounds_rect,
|
| + const gfx::RectF& crop_rect) {
|
| + return true;
|
| +}
|
| +
|
| +void GLImageDirectComposition::Flush() {}
|
| +
|
| +void GLImageDirectComposition::OnMemoryDump(
|
| + base::trace_event::ProcessMemoryDump* pmd,
|
| + uint64_t process_tracing_id,
|
| + const std::string& dump_name) {}
|
| +
|
| +GLImageDirectComposition::Type GLImageDirectComposition::GetType() const {
|
| + return Type::DIRECT_COMPOSITION;
|
| +}
|
| +
|
| +scoped_refptr<gl::GLSurface> GLImageDirectComposition::GetSurface() {
|
| + return image_surface_;
|
| +}
|
| +
|
| +} // namespace gpu
|
|
|