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

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

Issue 1540004: Implemented offscreen rendering path for GLES2CmdDecoder on Linux.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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 | Annotate | Revision Log
« no previous file with comments | « chrome/gpu/gpu_thread.cc ('k') | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/callback.h" 14 #include "base/callback.h"
15 #if defined(OS_MACOSX) 15 #if defined(OS_MACOSX)
16 #include "app/surface/transport_dib.h" 16 #include "app/surface/transport_dib.h"
17 #endif 17 #endif
18 18
19 #include "gfx/size.h" 19 #include "gfx/size.h"
20 #include "gpu/command_buffer/service/common_decoder.h" 20 #include "gpu/command_buffer/service/common_decoder.h"
21 21
22 22
23 namespace gpu { 23 namespace gpu {
24 // Forward-declared instead of including x_utils.h, because including glx.h 24 // Forward-declared instead of including x_utils.h, because including glx.h
25 // causes havok. 25 // causes havok.
26 class XWindowWrapper; 26 class GLXContextWrapper;
27 27
28 namespace gles2 { 28 namespace gles2 {
29 29
30 class ContextGroup; 30 class ContextGroup;
31 class GLES2Util; 31 class GLES2Util;
32 32
33 // This class implements the AsyncAPIInterface interface, decoding GLES2 33 // This class implements the AsyncAPIInterface interface, decoding GLES2
34 // commands and calling GL. 34 // commands and calling GL.
35 class GLES2Decoder : public CommonDecoder { 35 class GLES2Decoder : public CommonDecoder {
36 public: 36 public:
37 typedef error::Error Error; 37 typedef error::Error Error;
38 38
39 // Creates a decoder. 39 // Creates a decoder.
40 static GLES2Decoder* Create(ContextGroup* group); 40 static GLES2Decoder* Create(ContextGroup* group);
41 41
42 virtual ~GLES2Decoder(); 42 virtual ~GLES2Decoder();
43 43
44 bool debug() const { 44 bool debug() const {
45 return debug_; 45 return debug_;
46 } 46 }
47 47
48 void set_debug(bool debug) { 48 void set_debug(bool debug) {
49 debug_ = debug; 49 debug_ = debug;
50 } 50 }
51 51
52 #if defined(OS_LINUX) 52 #if defined(OS_LINUX)
53 void set_window_wrapper(XWindowWrapper *window) { 53 void set_context_wrapper(GLXContextWrapper *context) {
54 window_ = window; 54 context_ = context;
55 } 55 }
56 XWindowWrapper* window() const { 56 GLXContextWrapper* context() const {
57 return window_; 57 return context_;
58 } 58 }
59 #elif defined(OS_WIN) 59 #elif defined(OS_WIN)
60 void set_hwnd(HWND hwnd) { 60 void set_hwnd(HWND hwnd) {
61 hwnd_ = hwnd; 61 hwnd_ = hwnd;
62 } 62 }
63 63
64 HWND hwnd() const { 64 HWND hwnd() const {
65 return hwnd_; 65 return hwnd_;
66 } 66 }
67 #elif defined(OS_MACOSX) 67 #elif defined(OS_MACOSX)
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 101
102 protected: 102 protected:
103 explicit GLES2Decoder(ContextGroup* group); 103 explicit GLES2Decoder(ContextGroup* group);
104 104
105 ContextGroup* group_; 105 ContextGroup* group_;
106 106
107 private: 107 private:
108 bool debug_; 108 bool debug_;
109 109
110 #if defined(OS_LINUX) 110 #if defined(OS_LINUX)
111 XWindowWrapper *window_; 111 GLXContextWrapper *context_;
112 #elif defined(OS_WIN) 112 #elif defined(OS_WIN)
113 // Handle to the GL device. 113 // Handle to the GL device.
114 HWND hwnd_; 114 HWND hwnd_;
115 #endif 115 #endif
116 116
117 DISALLOW_COPY_AND_ASSIGN(GLES2Decoder); 117 DISALLOW_COPY_AND_ASSIGN(GLES2Decoder);
118 }; 118 };
119 119
120 } // namespace gles2 120 } // namespace gles2
121 } // namespace gpu 121 } // namespace gpu
122 122
123 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ 123 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_
OLDNEW
« no previous file with comments | « chrome/gpu/gpu_thread.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