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

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

Issue 2208153002: Create GPU child window on new thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 "ui/gl/gl_surface_egl.h" 8 #include "ui/gl/gl_surface_egl.h"
9 9
10 #include <windows.h> 10 #include <windows.h>
11 11
12 namespace gpu { 12 namespace gpu {
13 13
14 class GpuChannelManager; 14 class GpuChannelManager;
15 struct SharedData;
15 16
16 class ChildWindowSurfaceWin : public gl::NativeViewGLSurfaceEGL { 17 class ChildWindowSurfaceWin : public gl::NativeViewGLSurfaceEGL {
17 public: 18 public:
18 ChildWindowSurfaceWin(GpuChannelManager* manager, HWND parent_window); 19 ChildWindowSurfaceWin(GpuChannelManager* manager, HWND parent_window);
19 20
20 // GLSurface implementation. 21 // GLSurface implementation.
21 EGLConfig GetConfig() override; 22 EGLConfig GetConfig() override;
22 bool Resize(const gfx::Size& size, 23 bool Resize(const gfx::Size& size,
23 float scale_factor, 24 float scale_factor,
24 bool has_alpha) override; 25 bool has_alpha) override;
25 bool InitializeNativeWindow() override; 26 bool InitializeNativeWindow() override;
26 gfx::SwapResult SwapBuffers() override; 27 gfx::SwapResult SwapBuffers() override;
27 gfx::SwapResult PostSubBuffer(int x, int y, int width, int height) override; 28 gfx::SwapResult PostSubBuffer(int x, int y, int width, int height) override;
28 29
29 void InvalidateWindowRect(const gfx::Rect& rect);
30
31 protected: 30 protected:
32 ~ChildWindowSurfaceWin() override; 31 ~ChildWindowSurfaceWin() override;
33 32
34 private: 33 private:
35 void ClearInvalidContents(); 34 void ClearInvalidContents();
36 35
36 std::unique_ptr<SharedData> shared_data_;
stanisc 2016/08/04 02:03:35 Since this class is multi-threaded now it would be
jbauman 2016/08/04 20:45:51 Ok, mentioned that shared_data_ is the only thing
37 HWND parent_window_; 37 HWND parent_window_;
38 GpuChannelManager* manager_; 38 GpuChannelManager* manager_;
39 gfx::Rect rect_to_clear_;
40 bool alpha_; 39 bool alpha_;
41 bool first_swap_; 40 bool first_swap_;
42 41
43 DISALLOW_COPY_AND_ASSIGN(ChildWindowSurfaceWin); 42 DISALLOW_COPY_AND_ASSIGN(ChildWindowSurfaceWin);
44 }; 43 };
45 44
46 } // namespace gpu 45 } // namespace gpu
47 46
48 #endif // GPU_IPC_SERVICE_CHILD_WINDOW_SURFACE_WIN_H_ 47 #endif // GPU_IPC_SERVICE_CHILD_WINDOW_SURFACE_WIN_H_
OLDNEW
« no previous file with comments | « no previous file | gpu/ipc/service/child_window_surface_win.cc » ('j') | gpu/ipc/service/child_window_surface_win.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698