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

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

Issue 308393002: Android: Don't call eglSwapInterval() for offscreen surface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/image_transport_surface.h" 5 #include "content/common/gpu/image_transport_surface.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "content/common/gpu/gpu_channel.h" 9 #include "content/common/gpu/gpu_channel.h"
10 #include "content/common/gpu/gpu_channel_manager.h" 10 #include "content/common/gpu/gpu_channel_manager.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 const CommandLine* command_line = CommandLine::ForCurrentProcess(); 95 const CommandLine* command_line = CommandLine::ForCurrentProcess();
96 if (command_line->HasSwitch(switches::kUIPrioritizeInGpuProcess)) 96 if (command_line->HasSwitch(switches::kUIPrioritizeInGpuProcess))
97 GetHelper()->SetPreemptByFlag(parent_channel->GetPreemptionFlag()); 97 GetHelper()->SetPreemptByFlag(parent_channel->GetPreemptionFlag());
98 } 98 }
99 99
100 return true; 100 return true;
101 } 101 }
102 102
103 bool ImageTransportSurfaceAndroid::OnMakeCurrent(gfx::GLContext* context) { 103 bool ImageTransportSurfaceAndroid::OnMakeCurrent(gfx::GLContext* context) {
104 DidAccessGpu(); 104 DidAccessGpu();
105 return PassThroughImageTransportSurface::OnMakeCurrent(context); 105 return true;
106 } 106 }
107 107
108 bool ImageTransportSurfaceAndroid::SwapBuffers() { 108 bool ImageTransportSurfaceAndroid::SwapBuffers() {
109 NOTREACHED(); 109 NOTREACHED();
110 return false; 110 return false;
111 } 111 }
112 112
113 void ImageTransportSurfaceAndroid::WakeUpGpu() { 113 void ImageTransportSurfaceAndroid::WakeUpGpu() {
114 begin_wake_up_time_ = base::TimeTicks::Now(); 114 begin_wake_up_time_ = base::TimeTicks::Now();
115 ScheduleWakeUp(); 115 ScheduleWakeUp();
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 if (window) 183 if (window)
184 ANativeWindow_release(window); 184 ANativeWindow_release(window);
185 if (!initialize_success) 185 if (!initialize_success)
186 return scoped_refptr<gfx::GLSurface>(); 186 return scoped_refptr<gfx::GLSurface>();
187 187
188 return scoped_refptr<gfx::GLSurface>( 188 return scoped_refptr<gfx::GLSurface>(
189 new DirectSurfaceAndroid(manager, stub, surface.get())); 189 new DirectSurfaceAndroid(manager, stub, surface.get()));
190 } 190 }
191 191
192 } // namespace content 192 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698