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

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

Issue 2801163002: Deletes NativeViewGLSurfaceEGL::Initialize(gfx::VSyncProvider). (Closed)
Patch Set: fixes DirectCompositionSurfaceTest Created 3 years, 8 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 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(base::WeakPtr<ImageTransportSurfaceDelegate> delegate, 19 ChildWindowSurfaceWin(std::unique_ptr<gfx::VSyncProvider> vsync_provider,
20 base::WeakPtr<ImageTransportSurfaceDelegate> delegate,
20 HWND parent_window); 21 HWND parent_window);
21 22
22 // GLSurface implementation. 23 // GLSurface implementation.
23 EGLConfig GetConfig() override; 24 EGLConfig GetConfig() override;
24 bool Resize(const gfx::Size& size, 25 bool Resize(const gfx::Size& size,
25 float scale_factor, 26 float scale_factor,
26 bool has_alpha) override; 27 bool has_alpha) override;
27 bool InitializeNativeWindow() override; 28 bool InitializeNativeWindow() override;
28 gfx::SwapResult SwapBuffers() override; 29 gfx::SwapResult SwapBuffers() override;
29 gfx::SwapResult PostSubBuffer(int x, int y, int width, int height) override; 30 gfx::SwapResult PostSubBuffer(int x, int y, int width, int height) override;
30 31
31 protected: 32 protected:
32 ~ChildWindowSurfaceWin() override; 33 ~ChildWindowSurfaceWin() override;
33 34
34 private: 35 private:
35 ChildWindowWin child_window_; 36 ChildWindowWin child_window_;
36 bool alpha_; 37 bool alpha_;
37 bool first_swap_; 38 bool first_swap_;
38 39
39 DISALLOW_COPY_AND_ASSIGN(ChildWindowSurfaceWin); 40 DISALLOW_COPY_AND_ASSIGN(ChildWindowSurfaceWin);
40 }; 41 };
41 42
42 } // namespace gpu 43 } // namespace gpu
43 44
44 #endif // GPU_IPC_SERVICE_CHILD_WINDOW_SURFACE_WIN_H_ 45 #endif // GPU_IPC_SERVICE_CHILD_WINDOW_SURFACE_WIN_H_
OLDNEW
« no previous file with comments | « chromecast/graphics/cast_window_manager_aura.cc ('k') | gpu/ipc/service/child_window_surface_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698