| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2017 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 "gpu/ipc/service/gl_image_direct_composition.h" |
| 6 |
| 7 namespace gpu { |
| 8 |
| 9 GLImageDirectComposition::GLImageDirectComposition(const gfx::Size& size, |
| 10 gfx::BufferFormat format, |
| 11 gfx::BufferUsage usage) |
| 12 : size_(size) { |
| 13 image_surface_ = make_scoped_refptr(new DirectCompositionChildSurfaceWin( |
| 14 size, format == gfx::BufferFormat::RGBA_8888, |
| 15 usage != gfx::BufferUsage::SCANOUT_ASYNC)); |
| 16 image_surface_->Initialize(); |
| 17 } |
| 18 |
| 19 GLImageDirectComposition::~GLImageDirectComposition() {} |
| 20 |
| 21 gfx::Size GLImageDirectComposition::GetSize() { |
| 22 return size_; |
| 23 } |
| 24 |
| 25 unsigned GLImageDirectComposition::GetInternalFormat() { |
| 26 return GL_RGBA; |
| 27 } |
| 28 |
| 29 bool GLImageDirectComposition::BindTexImage(unsigned target) { |
| 30 return false; |
| 31 } |
| 32 |
| 33 void GLImageDirectComposition::ReleaseTexImage(unsigned target) {} |
| 34 |
| 35 bool GLImageDirectComposition::CopyTexImage(unsigned target) { |
| 36 return false; |
| 37 } |
| 38 |
| 39 bool GLImageDirectComposition::CopyTexSubImage(unsigned target, |
| 40 const gfx::Point& offset, |
| 41 const gfx::Rect& rect) { |
| 42 return false; |
| 43 } |
| 44 |
| 45 bool GLImageDirectComposition::ScheduleOverlayPlane( |
| 46 gfx::AcceleratedWidget widget, |
| 47 int z_order, |
| 48 gfx::OverlayTransform transform, |
| 49 const gfx::Rect& bounds_rect, |
| 50 const gfx::RectF& crop_rect) { |
| 51 return true; |
| 52 } |
| 53 |
| 54 void GLImageDirectComposition::Flush() {} |
| 55 |
| 56 void GLImageDirectComposition::OnMemoryDump( |
| 57 base::trace_event::ProcessMemoryDump* pmd, |
| 58 uint64_t process_tracing_id, |
| 59 const std::string& dump_name) {} |
| 60 |
| 61 GLImageDirectComposition::Type GLImageDirectComposition::GetType() const { |
| 62 return Type::DIRECT_COMPOSITION; |
| 63 } |
| 64 |
| 65 scoped_refptr<gl::GLSurface> GLImageDirectComposition::GetSurface() { |
| 66 return image_surface_; |
| 67 } |
| 68 |
| 69 } // namespace gpu |
| OLD | NEW |