| 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/texture_image_transport_surface.h" | 5 #include "content/common/gpu/texture_image_transport_surface.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 GpuChannelManager* manager = helper_->manager(); | 66 GpuChannelManager* manager = helper_->manager(); |
| 67 surface_ = manager->GetDefaultOffscreenSurface(); | 67 surface_ = manager->GetDefaultOffscreenSurface(); |
| 68 if (!surface_.get()) | 68 if (!surface_.get()) |
| 69 return false; | 69 return false; |
| 70 | 70 |
| 71 if (!helper_->Initialize()) | 71 if (!helper_->Initialize()) |
| 72 return false; | 72 return false; |
| 73 | 73 |
| 74 GpuChannel* parent_channel = manager->LookupChannel(handle_.parent_client_id); | 74 GpuChannel* parent_channel = manager->LookupChannel(handle_.parent_client_id); |
| 75 if (parent_channel) { | 75 if (parent_channel) { |
| 76 const CommandLine* command_line = CommandLine::ForCurrentProcess(); | 76 const base::CommandLine* command_line = |
| 77 base::CommandLine::ForCurrentProcess(); |
| 77 if (command_line->HasSwitch(switches::kUIPrioritizeInGpuProcess)) | 78 if (command_line->HasSwitch(switches::kUIPrioritizeInGpuProcess)) |
| 78 helper_->SetPreemptByFlag(parent_channel->GetPreemptionFlag()); | 79 helper_->SetPreemptByFlag(parent_channel->GetPreemptionFlag()); |
| 79 } | 80 } |
| 80 | 81 |
| 81 return true; | 82 return true; |
| 82 } | 83 } |
| 83 | 84 |
| 84 void TextureImageTransportSurface::Destroy() { | 85 void TextureImageTransportSurface::Destroy() { |
| 85 if (surface_.get()) | 86 if (surface_.get()) |
| 86 surface_ = NULL; | 87 surface_ = NULL; |
| (...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 | 451 |
| 451 #ifndef NDEBUG | 452 #ifndef NDEBUG |
| 452 GLenum status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER); | 453 GLenum status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER); |
| 453 if (status != GL_FRAMEBUFFER_COMPLETE) { | 454 if (status != GL_FRAMEBUFFER_COMPLETE) { |
| 454 DLOG(FATAL) << "Framebuffer incomplete: " << status; | 455 DLOG(FATAL) << "Framebuffer incomplete: " << status; |
| 455 } | 456 } |
| 456 #endif | 457 #endif |
| 457 } | 458 } |
| 458 | 459 |
| 459 } // namespace content | 460 } // namespace content |
| OLD | NEW |