| 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 #ifndef GPU_IPC_SERVICE_GL_IMAGE_DIRECT_COMPOSITION_H_ |
| 6 #define GPU_IPC_SERVICE_GL_IMAGE_DIRECT_COMPOSITION_H_ |
| 7 |
| 8 #include <d3d11.h> |
| 9 #include <dcomp.h> |
| 10 |
| 11 #include "base/win/scoped_comptr.h" |
| 12 #include "gpu/ipc/service/direct_composition_child_surface_win.h" |
| 13 #include "ui/gfx/buffer_types.h" |
| 14 #include "ui/gl/gl_image.h" |
| 15 #include "ui/gl/gl_surface.h" |
| 16 #include "ui/gl/gl_surface_egl.h" |
| 17 |
| 18 namespace gpu { |
| 19 |
| 20 class GLImageDirectComposition : public gl::GLImage { |
| 21 public: |
| 22 GLImageDirectComposition(const gfx::Size& size, |
| 23 gfx::BufferFormat format, |
| 24 gfx::BufferUsage usage); |
| 25 |
| 26 // gl::GLImage implementation. |
| 27 gfx::Size GetSize() override; |
| 28 unsigned GetInternalFormat() override; |
| 29 bool BindTexImage(unsigned target) override; |
| 30 void ReleaseTexImage(unsigned target) override; |
| 31 bool CopyTexImage(unsigned target) override; |
| 32 bool CopyTexSubImage(unsigned target, |
| 33 const gfx::Point& offset, |
| 34 const gfx::Rect& rect) override; |
| 35 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, |
| 36 int z_order, |
| 37 gfx::OverlayTransform transform, |
| 38 const gfx::Rect& bounds_rect, |
| 39 const gfx::RectF& crop_rect) override; |
| 40 void Flush() override; |
| 41 void OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd, |
| 42 uint64_t process_tracing_id, |
| 43 const std::string& dump_name) override; |
| 44 Type GetType() const override; |
| 45 scoped_refptr<gl::GLSurface> GetSurface() override; |
| 46 |
| 47 protected: |
| 48 ~GLImageDirectComposition() override; |
| 49 |
| 50 gfx::Size size_; |
| 51 scoped_refptr<DirectCompositionChildSurfaceWin> image_surface_; |
| 52 }; |
| 53 |
| 54 } // namespace gpu |
| 55 |
| 56 #endif // GPU_IPC_SERVICE_GL_IMAGE_DIRECT_COMPOSITION_H_ |
| OLD | NEW |