| OLD | NEW |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2014 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/null_transport_surface.h" | 5 #include "content/common/gpu/null_transport_surface.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "content/common/gpu/gpu_channel.h" | 8 #include "content/common/gpu/gpu_channel.h" |
| 9 #include "content/common/gpu/gpu_channel_manager.h" | 9 #include "content/common/gpu/gpu_channel_manager.h" |
| 10 #include "content/common/gpu/gpu_command_buffer_stub.h" | 10 #include "content/common/gpu/gpu_command_buffer_stub.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 GetHelper()->SetPreemptByFlag(parent_channel->GetPreemptionFlag()); | 42 GetHelper()->SetPreemptByFlag(parent_channel->GetPreemptionFlag()); |
| 43 } | 43 } |
| 44 | 44 |
| 45 return true; | 45 return true; |
| 46 } | 46 } |
| 47 | 47 |
| 48 void NullTransportSurface::Destroy() { | 48 void NullTransportSurface::Destroy() { |
| 49 // Do not destroy |surface_| since we use the shared offscreen surface. | 49 // Do not destroy |surface_| since we use the shared offscreen surface. |
| 50 } | 50 } |
| 51 | 51 |
| 52 bool NullTransportSurface::SwapBuffers() { | 52 gfx::SwapResult NullTransportSurface::SwapBuffers() { |
| 53 NOTIMPLEMENTED(); | 53 NOTIMPLEMENTED(); |
| 54 return false; | 54 return gfx::SWAP_FAILED; |
| 55 } | 55 } |
| 56 | 56 |
| 57 bool NullTransportSurface::PostSubBuffer( | 57 gfx::SwapResult NullTransportSurface::PostSubBuffer(int x, |
| 58 int x, int y, int width, int height) { | 58 int y, |
| 59 int width, |
| 60 int height) { |
| 59 NOTIMPLEMENTED(); | 61 NOTIMPLEMENTED(); |
| 60 return false; | 62 return gfx::SWAP_FAILED; |
| 61 } | 63 } |
| 62 | 64 |
| 63 void NullTransportSurface::SendVSyncUpdateIfAvailable() { | 65 void NullTransportSurface::SendVSyncUpdateIfAvailable() { |
| 64 NOTREACHED(); | 66 NOTREACHED(); |
| 65 } | 67 } |
| 66 | 68 |
| 67 bool NullTransportSurface::OnMakeCurrent(gfx::GLContext* context) { | 69 bool NullTransportSurface::OnMakeCurrent(gfx::GLContext* context) { |
| 68 // Override PassThroughImageTransportSurface default behavior which | 70 // Override PassThroughImageTransportSurface default behavior which |
| 69 // sets the swap interval. | 71 // sets the swap interval. |
| 70 return true; | 72 return true; |
| 71 } | 73 } |
| 72 | 74 |
| 73 } // namespace content | 75 } // namespace content |
| OLD | NEW |