| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef GPU_IPC_SERVICE_DIRECT_COMPOSITION_SURFACE_WIN_H_ | 5 #ifndef GPU_IPC_SERVICE_DIRECT_COMPOSITION_SURFACE_WIN_H_ |
| 6 #define GPU_IPC_SERVICE_DIRECT_COMPOSITION_SURFACE_WIN_H_ | 6 #define GPU_IPC_SERVICE_DIRECT_COMPOSITION_SURFACE_WIN_H_ |
| 7 | 7 |
| 8 #include <d3d11.h> | 8 #include <d3d11.h> |
| 9 #include <dcomp.h> | 9 #include <dcomp.h> |
| 10 #include <windows.h> | 10 #include <windows.h> |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 const gfx::Rect& bounds_rect, | 46 const gfx::Rect& bounds_rect, |
| 47 const gfx::RectF& crop_rect) override; | 47 const gfx::RectF& crop_rect) override; |
| 48 bool FlipsVertically() const override; | 48 bool FlipsVertically() const override; |
| 49 bool SupportsPostSubBuffer() override; | 49 bool SupportsPostSubBuffer() override; |
| 50 bool OnMakeCurrent(gl::GLContext* context) override; | 50 bool OnMakeCurrent(gl::GLContext* context) override; |
| 51 bool SupportsSetDrawRectangle() const override; | 51 bool SupportsSetDrawRectangle() const override; |
| 52 bool SetDrawRectangle(const gfx::Rect& rect) override; | 52 bool SetDrawRectangle(const gfx::Rect& rect) override; |
| 53 | 53 |
| 54 bool Initialize(std::unique_ptr<gfx::VSyncProvider> vsync_provider); | 54 bool Initialize(std::unique_ptr<gfx::VSyncProvider> vsync_provider); |
| 55 | 55 |
| 56 scoped_refptr<base::TaskRunner> GetWindowTaskRunnerForTesting(); |
| 57 |
| 56 protected: | 58 protected: |
| 57 ~DirectCompositionSurfaceWin() override; | 59 ~DirectCompositionSurfaceWin() override; |
| 58 | 60 |
| 59 private: | 61 private: |
| 60 struct Overlay { | 62 struct Overlay { |
| 61 Overlay(int z_order, | 63 Overlay(int z_order, |
| 62 gfx::OverlayTransform transform, | 64 gfx::OverlayTransform transform, |
| 63 scoped_refptr<gl::GLImage> image, | 65 scoped_refptr<gl::GLImage> image, |
| 64 gfx::Rect bounds_rect, | 66 gfx::Rect bounds_rect, |
| 65 gfx::RectF crop_rect); | 67 gfx::RectF crop_rect); |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 // Keep track of whether the texture has been rendered to, as the first draw | 105 // Keep track of whether the texture has been rendered to, as the first draw |
| 104 // to it must overwrite the entire thing. | 106 // to it must overwrite the entire thing. |
| 105 bool has_been_rendered_to_ = false; | 107 bool has_been_rendered_to_ = false; |
| 106 | 108 |
| 107 DISALLOW_COPY_AND_ASSIGN(DirectCompositionSurfaceWin); | 109 DISALLOW_COPY_AND_ASSIGN(DirectCompositionSurfaceWin); |
| 108 }; | 110 }; |
| 109 | 111 |
| 110 } // namespace gpu | 112 } // namespace gpu |
| 111 | 113 |
| 112 #endif // GPU_IPC_SERVICE_DIRECT_COMPOSITION_SURFACE_WIN_H_ | 114 #endif // GPU_IPC_SERVICE_DIRECT_COMPOSITION_SURFACE_WIN_H_ |
| OLD | NEW |