OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/common/gpu/client/gl_helper.h" | 5 #include "content/common/gpu/client/gl_helper.h" |
6 | 6 |
7 #include <queue> | 7 #include <queue> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/message_loop.h" | 13 #include "base/message_loop.h" |
14 #include "base/synchronization/lock.h" | 14 #include "base/synchronization/lock.h" |
15 #include "base/synchronization/waitable_event.h" | 15 #include "base/synchronization/waitable_event.h" |
16 #include "base/threading/thread.h" | 16 #include "base/threading/thread.h" |
17 #include "base/threading/thread_restrictions.h" | 17 #include "base/threading/thread_restrictions.h" |
18 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebCString.h
" | 18 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebCString.h
" |
19 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" | 19 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" |
20 #include "ui/gfx/gl/gl_bindings.h" | |
21 #include "ui/gfx/size.h" | 20 #include "ui/gfx/size.h" |
| 21 #include "ui/gl/gl_bindings.h" |
22 | 22 |
23 using WebKit::WebGLId; | 23 using WebKit::WebGLId; |
24 using WebKit::WebGraphicsContext3D; | 24 using WebKit::WebGraphicsContext3D; |
25 | 25 |
26 namespace { | 26 namespace { |
27 | 27 |
28 const char kGLHelperThreadName[] = "GLHelperThread"; | 28 const char kGLHelperThreadName[] = "GLHelperThread"; |
29 | 29 |
30 class GLHelperThread : public base::Thread { | 30 class GLHelperThread : public base::Thread { |
31 public: | 31 public: |
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
651 WebKit::WGC3Dint compile_status = 0; | 651 WebKit::WGC3Dint compile_status = 0; |
652 context_->getShaderiv(shader, GL_COMPILE_STATUS, &compile_status); | 652 context_->getShaderiv(shader, GL_COMPILE_STATUS, &compile_status); |
653 if (!compile_status) { | 653 if (!compile_status) { |
654 LOG(ERROR) << std::string(context_->getShaderInfoLog(shader).utf8()); | 654 LOG(ERROR) << std::string(context_->getShaderInfoLog(shader).utf8()); |
655 return 0; | 655 return 0; |
656 } | 656 } |
657 return shader.Detach(); | 657 return shader.Detach(); |
658 } | 658 } |
659 | 659 |
660 } // namespace content | 660 } // namespace content |
OLD | NEW |