OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "webkit/gpu/webgraphicscontext3d_in_process_impl.h" | 5 #include "webkit/gpu/webgraphicscontext3d_in_process_impl.h" |
6 | 6 |
7 #include <string.h> | 7 #include <string.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "app/gfx/gl/gl_bindings.h" | 12 #include "app/gfx/gl/gl_bindings.h" |
13 #include "app/gfx/gl/gl_context.h" | 13 #include "app/gfx/gl/gl_context.h" |
14 #include "app/gfx/gl/gl_implementation.h" | 14 #include "app/gfx/gl/gl_implementation.h" |
15 #include "base/logging.h" | 15 #include "base/logging.h" |
16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" | 16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" |
17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" | 17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" |
18 | 18 |
19 namespace webkit { | 19 namespace webkit { |
20 namespace gpu { | 20 namespace gpu { |
21 | 21 |
22 enum { | 22 enum { |
23 MAX_VERTEX_UNIFORM_VECTORS = 0x8DFB, | 23 MAX_VERTEX_UNIFORM_VECTORS = 0x8DFB, |
24 MAX_VARYING_VECTORS = 0x8DFC, | 24 MAX_VARYING_VECTORS = 0x8DFC, |
25 MAX_FRAGMENT_UNIFORM_VECTORS = 0x8DFD | 25 MAX_FRAGMENT_UNIFORM_VECTORS = 0x8DFD |
26 }; | 26 }; |
27 | 27 |
| 28 struct WebGraphicsContext3DInProcessImpl::ShaderSourceEntry { |
| 29 explicit ShaderSourceEntry(WGC3Denum shader_type) |
| 30 : type(shader_type), |
| 31 is_valid(false) { |
| 32 } |
| 33 |
| 34 WGC3Denum type; |
| 35 scoped_array<char> source; |
| 36 scoped_array<char> log; |
| 37 scoped_array<char> translated_source; |
| 38 bool is_valid; |
| 39 }; |
| 40 |
28 WebGraphicsContext3DInProcessImpl::WebGraphicsContext3DInProcessImpl() | 41 WebGraphicsContext3DInProcessImpl::WebGraphicsContext3DInProcessImpl() |
29 : initialized_(false), | 42 : initialized_(false), |
30 render_directly_to_web_view_(false), | 43 render_directly_to_web_view_(false), |
31 is_gles2_(false), | 44 is_gles2_(false), |
32 have_ext_framebuffer_object_(false), | 45 have_ext_framebuffer_object_(false), |
33 have_ext_framebuffer_multisample_(false), | 46 have_ext_framebuffer_multisample_(false), |
34 have_angle_framebuffer_multisample_(false), | 47 have_angle_framebuffer_multisample_(false), |
35 texture_(0), | 48 texture_(0), |
36 fbo_(0), | 49 fbo_(0), |
37 depth_stencil_buffer_(0), | 50 depth_stencil_buffer_(0), |
(...skipping 1536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1574 else | 1587 else |
1575 ShGetObjectCode(compiler, entry->translated_source.get()); | 1588 ShGetObjectCode(compiler, entry->translated_source.get()); |
1576 } | 1589 } |
1577 entry->is_valid = true; | 1590 entry->is_valid = true; |
1578 return true; | 1591 return true; |
1579 } | 1592 } |
1580 | 1593 |
1581 } // namespace gpu | 1594 } // namespace gpu |
1582 } // namespace webkit | 1595 } // namespace webkit |
1583 | 1596 |
OLD | NEW |