| 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/ppb_graphics_3d_impl.h" | 5 #include "content/renderer/pepper/ppb_graphics_3d_impl.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/feature_list.h" | 9 #include "base/feature_list.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 if (!bound_to_instance_) | 283 if (!bound_to_instance_) |
| 284 return; | 284 return; |
| 285 WebPluginContainer* container = | 285 WebPluginContainer* container = |
| 286 HostGlobals::Get()->GetInstance(pp_instance())->container(); | 286 HostGlobals::Get()->GetInstance(pp_instance())->container(); |
| 287 if (!container) | 287 if (!container) |
| 288 return; | 288 return; |
| 289 WebLocalFrame* frame = container->document().frame(); | 289 WebLocalFrame* frame = container->document().frame(); |
| 290 if (!frame) | 290 if (!frame) |
| 291 return; | 291 return; |
| 292 WebConsoleMessage console_message = WebConsoleMessage( | 292 WebConsoleMessage console_message = WebConsoleMessage( |
| 293 WebConsoleMessage::LevelError, WebString(base::UTF8ToUTF16(message))); | 293 WebConsoleMessage::LevelError, WebString::fromUTF8(message)); |
| 294 frame->addMessageToConsole(console_message); | 294 frame->addMessageToConsole(console_message); |
| 295 } | 295 } |
| 296 | 296 |
| 297 void PPB_Graphics3D_Impl::OnGpuControlLostContext() { | 297 void PPB_Graphics3D_Impl::OnGpuControlLostContext() { |
| 298 #if DCHECK_IS_ON() | 298 #if DCHECK_IS_ON() |
| 299 // This should never occur more than once. | 299 // This should never occur more than once. |
| 300 DCHECK(!lost_context_); | 300 DCHECK(!lost_context_); |
| 301 lost_context_ = true; | 301 lost_context_ = true; |
| 302 #endif | 302 #endif |
| 303 | 303 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 if (!mailboxes_to_reuse_.empty()) { | 356 if (!mailboxes_to_reuse_.empty()) { |
| 357 gpu::Mailbox mailbox = mailboxes_to_reuse_.back(); | 357 gpu::Mailbox mailbox = mailboxes_to_reuse_.back(); |
| 358 mailboxes_to_reuse_.pop_back(); | 358 mailboxes_to_reuse_.pop_back(); |
| 359 return mailbox; | 359 return mailbox; |
| 360 } | 360 } |
| 361 | 361 |
| 362 return gpu::Mailbox::Generate(); | 362 return gpu::Mailbox::Generate(); |
| 363 } | 363 } |
| 364 | 364 |
| 365 } // namespace content | 365 } // namespace content |
| OLD | NEW |