OLD | NEW |
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> |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 #endif | 58 #endif |
59 | 59 |
60 // Initializes the graphics context. | 60 // Initializes the graphics context. |
61 // Returns: | 61 // Returns: |
62 // true if successful. | 62 // true if successful. |
63 virtual bool Initialize() = 0; | 63 virtual bool Initialize() = 0; |
64 | 64 |
65 // Destroys the graphics context. | 65 // Destroys the graphics context. |
66 virtual void Destroy() = 0; | 66 virtual void Destroy() = 0; |
67 | 67 |
| 68 // Make this decoder's GL context current. |
| 69 virtual bool MakeCurrent() = 0; |
| 70 |
68 // Gets a service id by client id. | 71 // Gets a service id by client id. |
69 virtual uint32 GetServiceIdForTesting(uint32 client_id) = 0; | 72 virtual uint32 GetServiceIdForTesting(uint32 client_id) = 0; |
70 | 73 |
71 protected: | 74 protected: |
72 GLES2Decoder(); | 75 GLES2Decoder(); |
73 | 76 |
74 private: | 77 private: |
75 bool debug_; | 78 bool debug_; |
76 | 79 |
77 #if defined(OS_LINUX) | 80 #if defined(OS_LINUX) |
78 XWindowWrapper *window_; | 81 XWindowWrapper *window_; |
79 #elif defined(OS_WIN) | 82 #elif defined(OS_WIN) |
80 // Handle to the GL device. | 83 // Handle to the GL device. |
81 HWND hwnd_; | 84 HWND hwnd_; |
82 #endif | 85 #endif |
83 | 86 |
84 DISALLOW_COPY_AND_ASSIGN(GLES2Decoder); | 87 DISALLOW_COPY_AND_ASSIGN(GLES2Decoder); |
85 }; | 88 }; |
86 | 89 |
87 } // namespace gles2 | 90 } // namespace gles2 |
88 } // namespace gpu | 91 } // namespace gpu |
89 | 92 |
90 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ | 93 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ |
OLD | NEW |