OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_CHILD_WINDOW_SURFACE_WIN_H_ | 5 #ifndef GPU_IPC_SERVICE_CHILD_WINDOW_SURFACE_WIN_H_ |
6 #define GPU_IPC_SERVICE_CHILD_WINDOW_SURFACE_WIN_H_ | 6 #define GPU_IPC_SERVICE_CHILD_WINDOW_SURFACE_WIN_H_ |
7 | 7 |
8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
9 #include "gpu/ipc/service/child_window_win.h" | 9 #include "gpu/ipc/service/child_window_win.h" |
10 #include "gpu/ipc/service/image_transport_surface_delegate.h" | 10 #include "gpu/ipc/service/image_transport_surface_delegate.h" |
11 #include "ui/gl/gl_surface_egl.h" | 11 #include "ui/gl/gl_surface_egl.h" |
12 | 12 |
13 #include <windows.h> | 13 #include <windows.h> |
14 | 14 |
15 namespace gpu { | 15 namespace gpu { |
16 | 16 |
17 class ChildWindowSurfaceWin : public gl::NativeViewGLSurfaceEGL { | 17 class ChildWindowSurfaceWin : public gl::NativeViewGLSurfaceEGL { |
18 public: | 18 public: |
19 ChildWindowSurfaceWin(std::unique_ptr<gfx::VSyncProvider> vsync_provider, | 19 ChildWindowSurfaceWin(std::unique_ptr<gfx::VSyncProvider> vsync_provider, |
20 base::WeakPtr<ImageTransportSurfaceDelegate> delegate, | 20 base::WeakPtr<ImageTransportSurfaceDelegate> delegate, |
21 HWND parent_window); | 21 HWND parent_window); |
22 | 22 |
23 static bool IsHDRSupported(); | |
jbauman
2017/06/15 21:45:00
Could you add this to DirectCompositionSurfaceWin?
hubbe
2017/06/20 23:09:34
Done.
| |
24 | |
23 // GLSurface implementation. | 25 // GLSurface implementation. |
24 EGLConfig GetConfig() override; | 26 EGLConfig GetConfig() override; |
25 bool Resize(const gfx::Size& size, | 27 bool Resize(const gfx::Size& size, |
26 float scale_factor, | 28 float scale_factor, |
27 bool has_alpha) override; | 29 bool has_alpha) override; |
28 bool InitializeNativeWindow() override; | 30 bool InitializeNativeWindow() override; |
29 gfx::SwapResult SwapBuffers() override; | 31 gfx::SwapResult SwapBuffers() override; |
30 gfx::SwapResult PostSubBuffer(int x, int y, int width, int height) override; | 32 gfx::SwapResult PostSubBuffer(int x, int y, int width, int height) override; |
31 void WaitForSnapshotRendering() override; | 33 void WaitForSnapshotRendering() override; |
32 | 34 |
33 protected: | 35 protected: |
34 ~ChildWindowSurfaceWin() override; | 36 ~ChildWindowSurfaceWin() override; |
35 | 37 |
36 private: | 38 private: |
37 ChildWindowWin child_window_; | 39 ChildWindowWin child_window_; |
38 bool alpha_; | 40 bool alpha_; |
39 bool first_swap_; | 41 bool first_swap_; |
40 | 42 |
41 DISALLOW_COPY_AND_ASSIGN(ChildWindowSurfaceWin); | 43 DISALLOW_COPY_AND_ASSIGN(ChildWindowSurfaceWin); |
42 }; | 44 }; |
43 | 45 |
44 } // namespace gpu | 46 } // namespace gpu |
45 | 47 |
46 #endif // GPU_IPC_SERVICE_CHILD_WINDOW_SURFACE_WIN_H_ | 48 #endif // GPU_IPC_SERVICE_CHILD_WINDOW_SURFACE_WIN_H_ |
OLD | NEW |