OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/output/output_surface.h" | 5 #include "cc/output/output_surface.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
10 #include "base/thread_task_runner_handle.h" | 10 #include "base/thread_task_runner_handle.h" |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 size.width(), size.height(), scale_factor); | 171 size.width(), size.height(), scale_factor); |
172 } | 172 } |
173 if (software_device_) | 173 if (software_device_) |
174 software_device_->Resize(size, scale_factor); | 174 software_device_->Resize(size, scale_factor); |
175 } | 175 } |
176 | 176 |
177 gfx::Size OutputSurface::SurfaceSize() const { | 177 gfx::Size OutputSurface::SurfaceSize() const { |
178 return surface_size_; | 178 return surface_size_; |
179 } | 179 } |
180 | 180 |
| 181 void OutputSurface::RecreateBuffers() { |
| 182 } |
| 183 |
181 void OutputSurface::BindFramebuffer() { | 184 void OutputSurface::BindFramebuffer() { |
182 DCHECK(context_provider_.get()); | 185 DCHECK(context_provider_.get()); |
183 context_provider_->ContextGL()->BindFramebuffer(GL_FRAMEBUFFER, 0); | 186 context_provider_->ContextGL()->BindFramebuffer(GL_FRAMEBUFFER, 0); |
184 } | 187 } |
185 | 188 |
186 void OutputSurface::PostSwapBuffersComplete() { | 189 void OutputSurface::PostSwapBuffersComplete() { |
187 base::ThreadTaskRunnerHandle::Get()->PostTask( | 190 base::ThreadTaskRunnerHandle::Get()->PostTask( |
188 FROM_HERE, base::Bind(&OutputSurface::OnSwapBuffersComplete, | 191 FROM_HERE, base::Bind(&OutputSurface::OnSwapBuffersComplete, |
189 weak_ptr_factory_.GetWeakPtr())); | 192 weak_ptr_factory_.GetWeakPtr())); |
190 } | 193 } |
(...skipping 12 matching lines...) Expand all Loading... |
203 // is not visible (which the renderer knows better). | 206 // is not visible (which the renderer knows better). |
204 if (policy.bytes_limit_when_visible) | 207 if (policy.bytes_limit_when_visible) |
205 client_->SetMemoryPolicy(policy); | 208 client_->SetMemoryPolicy(policy); |
206 } | 209 } |
207 | 210 |
208 OverlayCandidateValidator* OutputSurface::GetOverlayCandidateValidator() const { | 211 OverlayCandidateValidator* OutputSurface::GetOverlayCandidateValidator() const { |
209 return nullptr; | 212 return nullptr; |
210 } | 213 } |
211 | 214 |
212 } // namespace cc | 215 } // namespace cc |
OLD | NEW |