| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "cc/test/pixel_test_output_surface.h" | 5 #include "cc/test/pixel_test_output_surface.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/threading/thread_task_runner_handle.h" | 10 #include "base/threading/thread_task_runner_handle.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 | 55 |
| 56 void PixelTestOutputSurface::ApplyExternalStencil() {} | 56 void PixelTestOutputSurface::ApplyExternalStencil() {} |
| 57 | 57 |
| 58 void PixelTestOutputSurface::SwapBuffers(OutputSurfaceFrame frame) { | 58 void PixelTestOutputSurface::SwapBuffers(OutputSurfaceFrame frame) { |
| 59 base::ThreadTaskRunnerHandle::Get()->PostTask( | 59 base::ThreadTaskRunnerHandle::Get()->PostTask( |
| 60 FROM_HERE, base::Bind(&PixelTestOutputSurface::SwapBuffersCallback, | 60 FROM_HERE, base::Bind(&PixelTestOutputSurface::SwapBuffersCallback, |
| 61 weak_ptr_factory_.GetWeakPtr())); | 61 weak_ptr_factory_.GetWeakPtr())); |
| 62 } | 62 } |
| 63 | 63 |
| 64 void PixelTestOutputSurface::SwapBuffersCallback() { | 64 void PixelTestOutputSurface::SwapBuffersCallback() { |
| 65 client_->DidSwapBuffersComplete(); | 65 client_->DidReceiveSwapBuffersAck(); |
| 66 } | 66 } |
| 67 | 67 |
| 68 OverlayCandidateValidator* | 68 OverlayCandidateValidator* |
| 69 PixelTestOutputSurface::GetOverlayCandidateValidator() const { | 69 PixelTestOutputSurface::GetOverlayCandidateValidator() const { |
| 70 return nullptr; | 70 return nullptr; |
| 71 } | 71 } |
| 72 | 72 |
| 73 bool PixelTestOutputSurface::IsDisplayedAsOverlayPlane() const { | 73 bool PixelTestOutputSurface::IsDisplayedAsOverlayPlane() const { |
| 74 return false; | 74 return false; |
| 75 } | 75 } |
| 76 | 76 |
| 77 unsigned PixelTestOutputSurface::GetOverlayTextureId() const { | 77 unsigned PixelTestOutputSurface::GetOverlayTextureId() const { |
| 78 return 0; | 78 return 0; |
| 79 } | 79 } |
| 80 | 80 |
| 81 bool PixelTestOutputSurface::SurfaceIsSuspendForRecycle() const { | 81 bool PixelTestOutputSurface::SurfaceIsSuspendForRecycle() const { |
| 82 return false; | 82 return false; |
| 83 } | 83 } |
| 84 | 84 |
| 85 uint32_t PixelTestOutputSurface::GetFramebufferCopyTextureFormat() { | 85 uint32_t PixelTestOutputSurface::GetFramebufferCopyTextureFormat() { |
| 86 // This format will work if the |context_provider| has an RGB or RGBA | 86 // This format will work if the |context_provider| has an RGB or RGBA |
| 87 // framebuffer. For now assume tests do not want/care about alpha in | 87 // framebuffer. For now assume tests do not want/care about alpha in |
| 88 // the root render pass. | 88 // the root render pass. |
| 89 return GL_RGB; | 89 return GL_RGB; |
| 90 } | 90 } |
| 91 | 91 |
| 92 } // namespace cc | 92 } // namespace cc |
| OLD | NEW |