| 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/renderer/pepper/pepper_platform_context_3d.h" | 5 #include "content/renderer/pepper/pepper_platform_context_3d.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "content/common/gpu/client/context_provider_command_buffer.h" | 8 #include "content/common/gpu/client/context_provider_command_buffer.h" |
| 9 #include "content/common/gpu/client/gpu_channel_host.h" | 9 #include "content/common/gpu/client/gpu_channel_host.h" |
| 10 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" | 10 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 case PP_GRAPHICS3DATTRIB_HEIGHT: | 66 case PP_GRAPHICS3DATTRIB_HEIGHT: |
| 67 surface_size.set_height(attr[1]); | 67 surface_size.set_height(attr[1]); |
| 68 break; | 68 break; |
| 69 case PP_GRAPHICS3DATTRIB_GPU_PREFERENCE: | 69 case PP_GRAPHICS3DATTRIB_GPU_PREFERENCE: |
| 70 gpu_preference = | 70 gpu_preference = |
| 71 (attr[1] == PP_GRAPHICS3DATTRIB_GPU_PREFERENCE_LOW_POWER) ? | 71 (attr[1] == PP_GRAPHICS3DATTRIB_GPU_PREFERENCE_LOW_POWER) ? |
| 72 gfx::PreferIntegratedGpu : gfx::PreferDiscreteGpu; | 72 gfx::PreferIntegratedGpu : gfx::PreferDiscreteGpu; |
| 73 break; | 73 break; |
| 74 case PP_GRAPHICS3DATTRIB_ALPHA_SIZE: | 74 case PP_GRAPHICS3DATTRIB_ALPHA_SIZE: |
| 75 has_alpha_ = attr[1] > 0; | 75 has_alpha_ = attr[1] > 0; |
| 76 // fall-through | 76 FALLTHROUGH_INTENDED; |
| 77 default: | 77 default: |
| 78 attribs.push_back(attr[0]); | 78 attribs.push_back(attr[0]); |
| 79 attribs.push_back(attr[1]); | 79 attribs.push_back(attr[1]); |
| 80 break; | 80 break; |
| 81 } | 81 } |
| 82 } | 82 } |
| 83 attribs.push_back(PP_GRAPHICS3DATTRIB_NONE); | 83 attribs.push_back(PP_GRAPHICS3DATTRIB_NONE); |
| 84 } | 84 } |
| 85 | 85 |
| 86 CommandBufferProxyImpl* share_buffer = NULL; | 86 CommandBufferProxyImpl* share_buffer = NULL; |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 } | 161 } |
| 162 | 162 |
| 163 void PlatformContext3D::OnConsoleMessage(const std::string& msg, int id) { | 163 void PlatformContext3D::OnConsoleMessage(const std::string& msg, int id) { |
| 164 DCHECK(command_buffer_); | 164 DCHECK(command_buffer_); |
| 165 | 165 |
| 166 if (!console_message_callback_.is_null()) | 166 if (!console_message_callback_.is_null()) |
| 167 console_message_callback_.Run(msg, id); | 167 console_message_callback_.Run(msg, id); |
| 168 } | 168 } |
| 169 | 169 |
| 170 } // namespace content | 170 } // namespace content |
| OLD | NEW |