OLD | NEW |
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-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 O3D_COMMAND_BUFFER_SERVICE_CROSS_GLES2_CMD_DECODER_H | 7 #ifndef O3D_COMMAND_BUFFER_SERVICE_CROSS_GLES2_CMD_DECODER_H |
8 #define O3D_COMMAND_BUFFER_SERVICE_CROSS_GLES2_CMD_DECODER_H | 8 #define O3D_COMMAND_BUFFER_SERVICE_CROSS_GLES2_CMD_DECODER_H |
9 | 9 |
10 #include <build/build_config.h> | 10 #include <build/build_config.h> |
(...skipping 10 matching lines...) Expand all Loading... |
21 class GLES2Decoder : public CommonDecoder { | 21 class GLES2Decoder : public CommonDecoder { |
22 public: | 22 public: |
23 typedef parse_error::ParseError ParseError; | 23 typedef parse_error::ParseError ParseError; |
24 | 24 |
25 // Creates a decoder. | 25 // Creates a decoder. |
26 static GLES2Decoder* Create(); | 26 static GLES2Decoder* Create(); |
27 | 27 |
28 virtual ~GLES2Decoder() { | 28 virtual ~GLES2Decoder() { |
29 } | 29 } |
30 | 30 |
| 31 bool debug() const { |
| 32 return debug_; |
| 33 } |
| 34 |
| 35 void set_debug(bool debug) { |
| 36 debug_ = debug; |
| 37 } |
| 38 |
31 #if defined(OS_LINUX) | 39 #if defined(OS_LINUX) |
32 void set_window_wrapper(XWindowWrapper *window) { | 40 void set_window_wrapper(XWindowWrapper *window) { |
33 window_ = window; | 41 window_ = window; |
34 } | 42 } |
35 XWindowWrapper* window() const { | 43 XWindowWrapper* window() const { |
36 return window_; | 44 return window_; |
37 } | 45 } |
38 #elif defined(OS_WIN) | 46 #elif defined(OS_WIN) |
39 void set_hwnd(HWND hwnd) { | 47 void set_hwnd(HWND hwnd) { |
40 hwnd_ = hwnd; | 48 hwnd_ = hwnd; |
41 } | 49 } |
42 | 50 |
43 HWND hwnd() const { | 51 HWND hwnd() const { |
44 return hwnd_; | 52 return hwnd_; |
45 } | 53 } |
46 #endif | 54 #endif |
47 | 55 |
48 // Initializes the graphics context. | 56 // Initializes the graphics context. |
49 // Returns: | 57 // Returns: |
50 // true if successful. | 58 // true if successful. |
51 virtual bool Initialize() = 0; | 59 virtual bool Initialize() = 0; |
52 | 60 |
53 // Destroys the graphics context. | 61 // Destroys the graphics context. |
54 virtual void Destroy() = 0; | 62 virtual void Destroy() = 0; |
55 | 63 |
56 protected: | 64 protected: |
57 GLES2Decoder(); | 65 GLES2Decoder(); |
58 | 66 |
59 private: | 67 private: |
| 68 bool debug_; |
| 69 |
60 #if defined(OS_LINUX) | 70 #if defined(OS_LINUX) |
61 XWindowWrapper *window_; | 71 XWindowWrapper *window_; |
62 #elif defined(OS_WIN) | 72 #elif defined(OS_WIN) |
63 // Handle to the GL device. | 73 // Handle to the GL device. |
64 HWND hwnd_; | 74 HWND hwnd_; |
65 #endif | 75 #endif |
66 | 76 |
67 DISALLOW_COPY_AND_ASSIGN(GLES2Decoder); | 77 DISALLOW_COPY_AND_ASSIGN(GLES2Decoder); |
68 }; | 78 }; |
69 | 79 |
70 } // namespace gles2 | 80 } // namespace gles2 |
71 } // namespace command_buffer | 81 } // namespace command_buffer |
72 | 82 |
73 #endif // O3D_COMMAND_BUFFER_SERVICE_CROSS_GLES2_CMD_DECODER_H | 83 #endif // O3D_COMMAND_BUFFER_SERVICE_CROSS_GLES2_CMD_DECODER_H |
74 | 84 |
OLD | NEW |