| 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/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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |