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

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

Issue 12226039: Reland 179911 and 179910 (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1364/src
Patch Set: Delta from original landing that's necessary for M25 (not ToT) Created 7 years, 10 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 if (!surface_.get()) 67 if (!surface_.get())
68 return false; 68 return false;
69 69
70 if (!helper_->Initialize()) 70 if (!helper_->Initialize())
71 return false; 71 return false;
72 72
73 GpuChannel* parent_channel = manager->LookupChannel(handle_.parent_client_id); 73 GpuChannel* parent_channel = manager->LookupChannel(handle_.parent_client_id);
74 if (parent_channel) { 74 if (parent_channel) {
75 const CommandLine* command_line = CommandLine::ForCurrentProcess(); 75 const CommandLine* command_line = CommandLine::ForCurrentProcess();
76 if (command_line->HasSwitch(switches::kUIPrioritizeInGpuProcess)) 76 if (command_line->HasSwitch(switches::kUIPrioritizeInGpuProcess))
77 helper_->SetPreemptByCounter(parent_channel->MessagesPendingCount()); 77 helper_->SetPreemptByFlag(parent_channel->GetPreemptionFlag());
78 } 78 }
79 79
80 return true; 80 return true;
81 } 81 }
82 82
83 void TextureImageTransportSurface::Destroy() { 83 void TextureImageTransportSurface::Destroy() {
84 if (surface_.get()) 84 if (surface_.get())
85 surface_ = NULL; 85 surface_ = NULL;
86 86
87 helper_->Destroy(); 87 helper_->Destroy();
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 // at which point we consume the correct texture back. 481 // at which point we consume the correct texture back.
482 mailbox_manager_->ProduceTexture( 482 mailbox_manager_->ProduceTexture(
483 GL_TEXTURE_2D, 483 GL_TEXTURE_2D,
484 mailbox_name(texture.surface_handle), 484 mailbox_name(texture.surface_handle),
485 definition.release(), 485 definition.release(),
486 NULL); 486 NULL);
487 texture.service_id = 0; 487 texture.service_id = 0;
488 } 488 }
489 489
490 } // namespace content 490 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/image_transport_surface.cc ('k') | gpu/command_buffer/service/gpu_scheduler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698