OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "cc/test/fake_output_surface.h" | 5 #include "cc/test/fake_output_surface.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/threading/thread_task_runner_handle.h" | 8 #include "base/threading/thread_task_runner_handle.h" |
9 #include "cc/output/output_surface_client.h" | 9 #include "cc/output/output_surface_client.h" |
10 #include "cc/resources/returned_resource.h" | 10 #include "cc/resources/returned_resource.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 } | 60 } |
61 | 61 |
62 void FakeOutputSurface::SwapBuffersAck() { | 62 void FakeOutputSurface::SwapBuffersAck() { |
63 client_->DidReceiveSwapBuffersAck(); | 63 client_->DidReceiveSwapBuffersAck(); |
64 } | 64 } |
65 | 65 |
66 void FakeOutputSurface::BindFramebuffer() { | 66 void FakeOutputSurface::BindFramebuffer() { |
67 context_provider_->ContextGL()->BindFramebuffer(GL_FRAMEBUFFER, framebuffer_); | 67 context_provider_->ContextGL()->BindFramebuffer(GL_FRAMEBUFFER, framebuffer_); |
68 } | 68 } |
69 | 69 |
| 70 void FakeOutputSurface::SetDrawRectangle(const gfx::Rect& rect) { |
| 71 last_set_draw_rectangle_ = rect; |
| 72 } |
| 73 |
70 uint32_t FakeOutputSurface::GetFramebufferCopyTextureFormat() { | 74 uint32_t FakeOutputSurface::GetFramebufferCopyTextureFormat() { |
71 if (framebuffer_) | 75 if (framebuffer_) |
72 return framebuffer_format_; | 76 return framebuffer_format_; |
73 else | 77 else |
74 return GL_RGB; | 78 return GL_RGB; |
75 } | 79 } |
76 | 80 |
77 void FakeOutputSurface::BindToClient(OutputSurfaceClient* client) { | 81 void FakeOutputSurface::BindToClient(OutputSurfaceClient* client) { |
78 DCHECK(client); | 82 DCHECK(client); |
79 DCHECK(!client_); | 83 DCHECK(!client_); |
(...skipping 15 matching lines...) Expand all Loading... |
95 | 99 |
96 bool FakeOutputSurface::IsDisplayedAsOverlayPlane() const { | 100 bool FakeOutputSurface::IsDisplayedAsOverlayPlane() const { |
97 return false; | 101 return false; |
98 } | 102 } |
99 | 103 |
100 unsigned FakeOutputSurface::GetOverlayTextureId() const { | 104 unsigned FakeOutputSurface::GetOverlayTextureId() const { |
101 return 0; | 105 return 0; |
102 } | 106 } |
103 | 107 |
104 } // namespace cc | 108 } // namespace cc |
OLD | NEW |