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 "webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h" | 7 #include "webkit/gpu/webgraphicscontext3d_in_process_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 |
(...skipping 10 matching lines...) Expand all Loading... |
21 #include "base/logging.h" | 21 #include "base/logging.h" |
22 #include "base/message_loop.h" | 22 #include "base/message_loop.h" |
23 #include "base/memory/singleton.h" | 23 #include "base/memory/singleton.h" |
24 #include "base/metrics/histogram.h" | 24 #include "base/metrics/histogram.h" |
25 #include "gpu/command_buffer/client/gles2_lib.h" | 25 #include "gpu/command_buffer/client/gles2_lib.h" |
26 #include "gpu/command_buffer/client/gles2_implementation.h" | 26 #include "gpu/command_buffer/client/gles2_implementation.h" |
27 #include "gpu/command_buffer/common/constants.h" | 27 #include "gpu/command_buffer/common/constants.h" |
28 #include "gpu/command_buffer/service/context_group.h" | 28 #include "gpu/command_buffer/service/context_group.h" |
29 #include "gpu/command_buffer/service/gpu_scheduler.h" | 29 #include "gpu/command_buffer/service/gpu_scheduler.h" |
30 #include "gpu/command_buffer/service/command_buffer_service.h" | 30 #include "gpu/command_buffer/service/command_buffer_service.h" |
31 #include "gpu/GLES2/gles2_command_buffer.h" | |
32 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" | 31 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" |
33 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" | 32 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" |
34 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" | 33 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" |
35 #include "ui/gfx/gl/gl_share_group.h" | 34 #include "ui/gfx/gl/gl_share_group.h" |
36 #include "webkit/glue/gl_bindings_skia_cmd_buffer.h" | 35 #include "webkit/glue/gl_bindings_skia_cmd_buffer.h" |
37 | 36 |
38 using gpu::Buffer; | 37 using gpu::Buffer; |
39 using gpu::CommandBuffer; | 38 using gpu::CommandBuffer; |
40 using gpu::CommandBufferService; | 39 using gpu::CommandBufferService; |
41 using gpu::gles2::GLES2CmdHelper; | 40 using gpu::gles2::GLES2CmdHelper; |
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
384 CommandBuffer::State state = command_buffer_->GetState(); | 383 CommandBuffer::State state = command_buffer_->GetState(); |
385 return state.error == ::gpu::error::kLostContext; | 384 return state.error == ::gpu::error::kLostContext; |
386 } | 385 } |
387 | 386 |
388 CommandBufferService* GLInProcessContext::GetCommandBufferService() { | 387 CommandBufferService* GLInProcessContext::GetCommandBufferService() { |
389 return command_buffer_.get(); | 388 return command_buffer_.get(); |
390 } | 389 } |
391 | 390 |
392 // TODO(gman): Remove This | 391 // TODO(gman): Remove This |
393 void GLInProcessContext::DisableShaderTranslation() { | 392 void GLInProcessContext::DisableShaderTranslation() { |
394 gles2_implementation_->CommandBufferEnableCHROMIUM( | 393 NOTREACHED(); |
395 PEPPER3D_SKIP_GLSL_TRANSLATION); | |
396 } | 394 } |
397 | 395 |
398 GLES2Implementation* GLInProcessContext::GetImplementation() { | 396 GLES2Implementation* GLInProcessContext::GetImplementation() { |
399 return gles2_implementation_; | 397 return gles2_implementation_; |
400 } | 398 } |
401 | 399 |
402 GLInProcessContext::GLInProcessContext(GLInProcessContext* parent) | 400 GLInProcessContext::GLInProcessContext(GLInProcessContext* parent) |
403 : parent_(parent ? | 401 : parent_(parent ? |
404 parent->AsWeakPtr() : base::WeakPtr<GLInProcessContext>()), | 402 parent->AsWeakPtr() : base::WeakPtr<GLInProcessContext>()), |
405 parent_texture_id_(0), | 403 parent_texture_id_(0), |
(...skipping 1225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1631 if (context_lost_callback_) { | 1629 if (context_lost_callback_) { |
1632 context_lost_callback_->onContextLost(); | 1630 context_lost_callback_->onContextLost(); |
1633 } | 1631 } |
1634 } | 1632 } |
1635 | 1633 |
1636 } // namespace gpu | 1634 } // namespace gpu |
1637 } // namespace webkit | 1635 } // namespace webkit |
1638 | 1636 |
1639 #endif // defined(ENABLE_GPU) | 1637 #endif // defined(ENABLE_GPU) |
1640 | 1638 |
OLD | NEW |