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

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

Issue 2888993002: Do glFinish before sending snapshot latency info to browser (Closed)
Patch Set: add current tests Created 3 years, 7 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 gfx::SwapResult SwapBuffers() override; 47 gfx::SwapResult SwapBuffers() override;
48 gfx::SwapResult PostSubBuffer(int x, int y, int width, int height) override; 48 gfx::SwapResult PostSubBuffer(int x, int y, int width, int height) override;
49 gfx::VSyncProvider* GetVSyncProvider() override; 49 gfx::VSyncProvider* GetVSyncProvider() override;
50 bool SetEnableDCLayers(bool enable) override; 50 bool SetEnableDCLayers(bool enable) override;
51 bool FlipsVertically() const override; 51 bool FlipsVertically() const override;
52 bool SupportsPostSubBuffer() override; 52 bool SupportsPostSubBuffer() override;
53 bool OnMakeCurrent(gl::GLContext* context) override; 53 bool OnMakeCurrent(gl::GLContext* context) override;
54 bool SupportsDCLayers() const override; 54 bool SupportsDCLayers() const override;
55 bool SetDrawRectangle(const gfx::Rect& rect) override; 55 bool SetDrawRectangle(const gfx::Rect& rect) override;
56 gfx::Vector2d GetDrawOffset() const override; 56 gfx::Vector2d GetDrawOffset() const override;
57 void WaitForSnapshotRendering() override;
57 58
58 // This schedules an overlay plane to be displayed on the next SwapBuffers 59 // This schedules an overlay plane to be displayed on the next SwapBuffers
59 // or PostSubBuffer call. Overlay planes must be scheduled before every swap 60 // or PostSubBuffer call. Overlay planes must be scheduled before every swap
60 // to remain in the layer tree. This surface's backbuffer doesn't have to be 61 // to remain in the layer tree. This surface's backbuffer doesn't have to be
61 // scheduled with ScheduleDCLayer, as it's automatically placed in the layer 62 // scheduled with ScheduleDCLayer, as it's automatically placed in the layer
62 // tree at z-order 0. 63 // tree at z-order 0.
63 bool ScheduleDCLayer(const ui::DCRendererLayerParams& params) override; 64 bool ScheduleDCLayer(const ui::DCRendererLayerParams& params) override;
64 65
65 const base::win::ScopedComPtr<IDCompositionSurface>& dcomp_surface() const { 66 const base::win::ScopedComPtr<IDCompositionSurface>& dcomp_surface() const {
66 return dcomp_surface_; 67 return dcomp_surface_;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 // Keep track of whether the texture has been rendered to, as the first draw 114 // Keep track of whether the texture has been rendered to, as the first draw
114 // to it must overwrite the entire thing. 115 // to it must overwrite the entire thing.
115 bool has_been_rendered_to_ = false; 116 bool has_been_rendered_to_ = false;
116 117
117 DISALLOW_COPY_AND_ASSIGN(DirectCompositionSurfaceWin); 118 DISALLOW_COPY_AND_ASSIGN(DirectCompositionSurfaceWin);
118 }; 119 };
119 120
120 } // namespace gpu 121 } // namespace gpu
121 122
122 #endif // GPU_IPC_SERVICE_DIRECT_COMPOSITION_SURFACE_WIN_H_ 123 #endif // GPU_IPC_SERVICE_DIRECT_COMPOSITION_SURFACE_WIN_H_
OLDNEW
« no previous file with comments | « gpu/ipc/service/child_window_surface_win.cc ('k') | gpu/ipc/service/direct_composition_surface_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698