| 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 gfx::SwapResult NullTransportSurface::SwapBuffers() { | 52 bool NullTransportSurface::SwapBuffers() { |
| 53 NOTIMPLEMENTED(); | 53 NOTIMPLEMENTED(); |
| 54 return gfx::SwapResult::SWAP_FAILED; | 54 return false; |
| 55 } | 55 } |
| 56 | 56 |
| 57 gfx::SwapResult NullTransportSurface::PostSubBuffer(int x, | 57 bool NullTransportSurface::PostSubBuffer( |
| 58 int y, | 58 int x, int y, int width, int height) { |
| 59 int width, | |
| 60 int height) { | |
| 61 NOTIMPLEMENTED(); | 59 NOTIMPLEMENTED(); |
| 62 return gfx::SwapResult::SWAP_FAILED; | 60 return false; |
| 63 } | 61 } |
| 64 | 62 |
| 65 void NullTransportSurface::SendVSyncUpdateIfAvailable() { | 63 void NullTransportSurface::SendVSyncUpdateIfAvailable() { |
| 66 NOTREACHED(); | 64 NOTREACHED(); |
| 67 } | 65 } |
| 68 | 66 |
| 69 bool NullTransportSurface::OnMakeCurrent(gfx::GLContext* context) { | 67 bool NullTransportSurface::OnMakeCurrent(gfx::GLContext* context) { |
| 70 // Override PassThroughImageTransportSurface default behavior which | 68 // Override PassThroughImageTransportSurface default behavior which |
| 71 // sets the swap interval. | 69 // sets the swap interval. |
| 72 return true; | 70 return true; |
| 73 } | 71 } |
| 74 | 72 |
| 75 } // namespace content | 73 } // namespace content |
| OLD | NEW |