Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(175)

Side by Side Diff: gpu/ipc/service/direct_composition_surface_win.h

Issue 2933453002: Always use DirectCompositionSurfaceWin when using DirectComposition (Closed)
Patch Set: remove include Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 float scale_factor, 50 float scale_factor,
51 bool has_alpha) override; 51 bool has_alpha) override;
52 gfx::SwapResult SwapBuffers() override; 52 gfx::SwapResult SwapBuffers() override;
53 gfx::SwapResult PostSubBuffer(int x, int y, int width, int height) override; 53 gfx::SwapResult PostSubBuffer(int x, int y, int width, int height) override;
54 gfx::VSyncProvider* GetVSyncProvider() override; 54 gfx::VSyncProvider* GetVSyncProvider() override;
55 bool SetEnableDCLayers(bool enable) override; 55 bool SetEnableDCLayers(bool enable) override;
56 bool FlipsVertically() const override; 56 bool FlipsVertically() const override;
57 bool SupportsPostSubBuffer() override; 57 bool SupportsPostSubBuffer() override;
58 bool OnMakeCurrent(gl::GLContext* context) override; 58 bool OnMakeCurrent(gl::GLContext* context) override;
59 bool SupportsDCLayers() const override; 59 bool SupportsDCLayers() const override;
60 bool UseOverlaysForVideo() const override;
60 bool SetDrawRectangle(const gfx::Rect& rect) override; 61 bool SetDrawRectangle(const gfx::Rect& rect) override;
61 gfx::Vector2d GetDrawOffset() const override; 62 gfx::Vector2d GetDrawOffset() const override;
62 void WaitForSnapshotRendering() override; 63 void WaitForSnapshotRendering() override;
63 64
64 // This schedules an overlay plane to be displayed on the next SwapBuffers 65 // This schedules an overlay plane to be displayed on the next SwapBuffers
65 // or PostSubBuffer call. Overlay planes must be scheduled before every swap 66 // or PostSubBuffer call. Overlay planes must be scheduled before every swap
66 // to remain in the layer tree. This surface's backbuffer doesn't have to be 67 // to remain in the layer tree. This surface's backbuffer doesn't have to be
67 // scheduled with ScheduleDCLayer, as it's automatically placed in the layer 68 // scheduled with ScheduleDCLayer, as it's automatically placed in the layer
68 // tree at z-order 0. 69 // tree at z-order 0.
69 bool ScheduleDCLayer(const ui::DCRendererLayerParams& params) override; 70 bool ScheduleDCLayer(const ui::DCRendererLayerParams& params) override;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 103
103 base::win::ScopedComPtr<ID3D11Device> d3d11_device_; 104 base::win::ScopedComPtr<ID3D11Device> d3d11_device_;
104 base::win::ScopedComPtr<IDCompositionDevice2> dcomp_device_; 105 base::win::ScopedComPtr<IDCompositionDevice2> dcomp_device_;
105 106
106 DISALLOW_COPY_AND_ASSIGN(DirectCompositionSurfaceWin); 107 DISALLOW_COPY_AND_ASSIGN(DirectCompositionSurfaceWin);
107 }; 108 };
108 109
109 } // namespace gpu 110 } // namespace gpu
110 111
111 #endif // GPU_IPC_SERVICE_DIRECT_COMPOSITION_SURFACE_WIN_H_ 112 #endif // GPU_IPC_SERVICE_DIRECT_COMPOSITION_SURFACE_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698