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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 } | 51 } |
52 | 52 |
53 void FakeOutputSurface::SwapBuffersAck() { | 53 void FakeOutputSurface::SwapBuffersAck() { |
54 client_->DidReceiveSwapBuffersAck(); | 54 client_->DidReceiveSwapBuffersAck(); |
55 } | 55 } |
56 | 56 |
57 void FakeOutputSurface::BindFramebuffer() { | 57 void FakeOutputSurface::BindFramebuffer() { |
58 context_provider_->ContextGL()->BindFramebuffer(GL_FRAMEBUFFER, framebuffer_); | 58 context_provider_->ContextGL()->BindFramebuffer(GL_FRAMEBUFFER, framebuffer_); |
59 } | 59 } |
60 | 60 |
| 61 void FakeOutputSurface::SetDrawRectangle(const gfx::Rect& rect) { |
| 62 last_set_draw_rectangle_ = rect; |
| 63 } |
| 64 |
61 uint32_t FakeOutputSurface::GetFramebufferCopyTextureFormat() { | 65 uint32_t FakeOutputSurface::GetFramebufferCopyTextureFormat() { |
62 if (framebuffer_) | 66 if (framebuffer_) |
63 return framebuffer_format_; | 67 return framebuffer_format_; |
64 else | 68 else |
65 return GL_RGB; | 69 return GL_RGB; |
66 } | 70 } |
67 | 71 |
68 void FakeOutputSurface::BindToClient(OutputSurfaceClient* client) { | 72 void FakeOutputSurface::BindToClient(OutputSurfaceClient* client) { |
69 DCHECK(client); | 73 DCHECK(client); |
70 DCHECK(!client_); | 74 DCHECK(!client_); |
(...skipping 15 matching lines...) Expand all Loading... |
86 | 90 |
87 bool FakeOutputSurface::IsDisplayedAsOverlayPlane() const { | 91 bool FakeOutputSurface::IsDisplayedAsOverlayPlane() const { |
88 return false; | 92 return false; |
89 } | 93 } |
90 | 94 |
91 unsigned FakeOutputSurface::GetOverlayTextureId() const { | 95 unsigned FakeOutputSurface::GetOverlayTextureId() const { |
92 return 0; | 96 return 0; |
93 } | 97 } |
94 | 98 |
95 } // namespace cc | 99 } // namespace cc |
OLD | NEW |