Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(179)

Side by Side Diff: trunk/src/content/common/gpu/texture_image_transport_surface.cc

Issue 189373012: Revert 255481 "Remove --ui-prioritize-in-gpu-process" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
66 66
67 GpuChannelManager* manager = helper_->manager(); 67 GpuChannelManager* manager = helper_->manager();
68 surface_ = manager->GetDefaultOffscreenSurface(); 68 surface_ = manager->GetDefaultOffscreenSurface();
69 if (!surface_.get()) 69 if (!surface_.get())
70 return false; 70 return false;
71 71
72 if (!helper_->Initialize()) 72 if (!helper_->Initialize())
73 return false; 73 return false;
74 74
75 GpuChannel* parent_channel = manager->LookupChannel(handle_.parent_client_id); 75 GpuChannel* parent_channel = manager->LookupChannel(handle_.parent_client_id);
76 if (parent_channel) 76 if (parent_channel) {
77 helper_->SetPreemptByFlag(parent_channel->GetPreemptionFlag()); 77 const CommandLine* command_line = CommandLine::ForCurrentProcess();
78 if (command_line->HasSwitch(switches::kUIPrioritizeInGpuProcess))
79 helper_->SetPreemptByFlag(parent_channel->GetPreemptionFlag());
80 }
78 81
79 return true; 82 return true;
80 } 83 }
81 84
82 void TextureImageTransportSurface::Destroy() { 85 void TextureImageTransportSurface::Destroy() {
83 if (surface_.get()) 86 if (surface_.get())
84 surface_ = NULL; 87 surface_ = NULL;
85 88
86 helper_->Destroy(); 89 helper_->Destroy();
87 } 90 }
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 451
449 #ifndef NDEBUG 452 #ifndef NDEBUG
450 GLenum status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER); 453 GLenum status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER);
451 if (status != GL_FRAMEBUFFER_COMPLETE) { 454 if (status != GL_FRAMEBUFFER_COMPLETE) {
452 DLOG(FATAL) << "Framebuffer incomplete: " << status; 455 DLOG(FATAL) << "Framebuffer incomplete: " << status;
453 } 456 }
454 #endif 457 #endif
455 } 458 }
456 459
457 } // namespace content 460 } // namespace content
OLDNEW
« no previous file with comments | « trunk/src/content/common/gpu/image_transport_surface_android.cc ('k') | trunk/src/content/public/common/content_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698