| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #if defined(ENABLE_GPU) | 5 #if defined(ENABLE_GPU) |
| 6 | 6 |
| 7 #include "content/renderer/webgraphicscontext3d_command_buffer_impl.h" | 7 #include "content/renderer/webgraphicscontext3d_command_buffer_impl.h" |
| 8 | 8 |
| 9 #include <GLES2/gl2.h> | 9 #include <GLES2/gl2.h> |
| 10 #ifndef GL_GLEXT_PROTOTYPES | 10 #ifndef GL_GLEXT_PROTOTYPES |
| 11 #define GL_GLEXT_PROTOTYPES 1 | 11 #define GL_GLEXT_PROTOTYPES 1 |
| 12 #endif | 12 #endif |
| 13 #include <GLES2/gl2ext.h> | 13 #include <GLES2/gl2ext.h> |
| 14 | 14 |
| 15 #include <algorithm> | 15 #include <algorithm> |
| 16 | 16 |
| 17 #include "base/string_tokenizer.h" | 17 #include "base/string_tokenizer.h" |
| 18 #include "base/command_line.h" | 18 #include "base/command_line.h" |
| 19 #include "base/logging.h" | 19 #include "base/logging.h" |
| 20 #include "base/metrics/histogram.h" | 20 #include "base/metrics/histogram.h" |
| 21 #include "chrome/common/chrome_switches.h" | 21 #include "content/common/content_switches.h" |
| 22 #include "content/renderer/gpu_channel_host.h" | 22 #include "content/renderer/gpu_channel_host.h" |
| 23 #include "content/renderer/render_thread.h" | 23 #include "content/renderer/render_thread.h" |
| 24 #include "content/renderer/render_view.h" | 24 #include "content/renderer/render_view.h" |
| 25 #include "gpu/command_buffer/common/constants.h" | 25 #include "gpu/command_buffer/common/constants.h" |
| 26 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" | 26 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" |
| 27 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" | 27 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" |
| 28 | 28 |
| 29 WebGraphicsContext3DCommandBufferImpl::WebGraphicsContext3DCommandBufferImpl() | 29 WebGraphicsContext3DCommandBufferImpl::WebGraphicsContext3DCommandBufferImpl() |
| 30 : context_(NULL), | 30 : context_(NULL), |
| 31 web_view_(NULL), | 31 web_view_(NULL), |
| (...skipping 1024 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1056 context_lost_callback_ = cb; | 1056 context_lost_callback_ = cb; |
| 1057 } | 1057 } |
| 1058 | 1058 |
| 1059 void WebGraphicsContext3DCommandBufferImpl::OnContextLost() { | 1059 void WebGraphicsContext3DCommandBufferImpl::OnContextLost() { |
| 1060 if (context_lost_callback_) { | 1060 if (context_lost_callback_) { |
| 1061 context_lost_callback_->onContextLost(); | 1061 context_lost_callback_->onContextLost(); |
| 1062 } | 1062 } |
| 1063 } | 1063 } |
| 1064 | 1064 |
| 1065 #endif // defined(ENABLE_GPU) | 1065 #endif // defined(ENABLE_GPU) |
| OLD | NEW |