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

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder.h

Issue 558035: [GPU] Get GPU process running on the mac... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 // This file contains the GLES2Decoder class. 5 // This file contains the GLES2Decoder class.
6 6
7 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ 7 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_
8 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ 8 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_
9 9
10 #include <build/build_config.h> 10 #include <build/build_config.h>
11 #if defined(OS_WIN) 11 #if defined(OS_WIN)
12 #include <windows.h> 12 #include <windows.h>
13 #endif 13 #endif
14 #include "base/task.h"
14 #include "gpu/command_buffer/service/common_decoder.h" 15 #include "gpu/command_buffer/service/common_decoder.h"
15 16
16 namespace gpu { 17 namespace gpu {
17 // Forward-declared instead of including x_utils.h, because including glx.h 18 // Forward-declared instead of including x_utils.h, because including glx.h
18 // causes havok. 19 // causes havok.
19 class XWindowWrapper; 20 class XWindowWrapper;
20 21
21 namespace gles2 { 22 namespace gles2 {
22 23
23 // This class implements the AsyncAPIInterface interface, decoding GLES2 24 // This class implements the AsyncAPIInterface interface, decoding GLES2
(...skipping 24 matching lines...) Expand all
48 return window_; 49 return window_;
49 } 50 }
50 #elif defined(OS_WIN) 51 #elif defined(OS_WIN)
51 void set_hwnd(HWND hwnd) { 52 void set_hwnd(HWND hwnd) {
52 hwnd_ = hwnd; 53 hwnd_ = hwnd;
53 } 54 }
54 55
55 HWND hwnd() const { 56 HWND hwnd() const {
56 return hwnd_; 57 return hwnd_;
57 } 58 }
59 #elif !defined(UNIT_TEST) && defined(OS_MACOSX)
60 virtual uint64 SetWindowSize(int32 width, int32 height) = 0;
58 #endif 61 #endif
59 62
60 // Initializes the graphics context. 63 // Initializes the graphics context.
61 // Returns: 64 // Returns:
62 // true if successful. 65 // true if successful.
63 virtual bool Initialize() = 0; 66 virtual bool Initialize() = 0;
64 67
65 // Destroys the graphics context. 68 // Destroys the graphics context.
66 virtual void Destroy() = 0; 69 virtual void Destroy() = 0;
67 70
68 // Make this decoder's GL context current. 71 // Make this decoder's GL context current.
69 virtual bool MakeCurrent() = 0; 72 virtual bool MakeCurrent() = 0;
70 73
71 // Gets a service id by client id. 74 // Gets a service id by client id.
72 virtual uint32 GetServiceIdForTesting(uint32 client_id) = 0; 75 virtual uint32 GetServiceIdForTesting(uint32 client_id) = 0;
73 76
77 // Sets a callback which is called when a SwapBuffers command is processed.
78 virtual void SetSwapBuffersCallback(Callback0::Type* callback) = 0;
79
74 protected: 80 protected:
75 GLES2Decoder(); 81 GLES2Decoder();
76 82
77 private: 83 private:
78 bool debug_; 84 bool debug_;
79 85
80 #if defined(OS_LINUX) 86 #if defined(OS_LINUX)
81 XWindowWrapper *window_; 87 XWindowWrapper *window_;
82 #elif defined(OS_WIN) 88 #elif defined(OS_WIN)
83 // Handle to the GL device. 89 // Handle to the GL device.
84 HWND hwnd_; 90 HWND hwnd_;
85 #endif 91 #endif
86 92
87 DISALLOW_COPY_AND_ASSIGN(GLES2Decoder); 93 DISALLOW_COPY_AND_ASSIGN(GLES2Decoder);
88 }; 94 };
89 95
90 } // namespace gles2 96 } // namespace gles2
91 } // namespace gpu 97 } // namespace gpu
92 98
93 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ 99 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/common/cmd_buffer_common.cc ('k') | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698