| 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 <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 // after the OutputSurface has been destroyed. | 249 // after the OutputSurface has been destroyed. |
| 250 void OutputSurface::OnSwapBuffersComplete() { | 250 void OutputSurface::OnSwapBuffersComplete() { |
| 251 client_->DidSwapBuffersComplete(); | 251 client_->DidSwapBuffersComplete(); |
| 252 } | 252 } |
| 253 | 253 |
| 254 void OutputSurface::DidReceiveTextureInUseResponses( | 254 void OutputSurface::DidReceiveTextureInUseResponses( |
| 255 const gpu::TextureInUseResponses& responses) { | 255 const gpu::TextureInUseResponses& responses) { |
| 256 client_->DidReceiveTextureInUseResponses(responses); | 256 client_->DidReceiveTextureInUseResponses(responses); |
| 257 } | 257 } |
| 258 | 258 |
| 259 void OutputSurface::SetMemoryPolicy(const ManagedMemoryPolicy& policy) { | |
| 260 TRACE_EVENT1("cc", "OutputSurface::SetMemoryPolicy", | |
| 261 "bytes_limit_when_visible", policy.bytes_limit_when_visible); | |
| 262 // Just ignore the memory manager when it says to set the limit to zero | |
| 263 // bytes. This will happen when the memory manager thinks that the renderer | |
| 264 // is not visible (which the renderer knows better). | |
| 265 if (policy.bytes_limit_when_visible) | |
| 266 client_->SetMemoryPolicy(policy); | |
| 267 } | |
| 268 | |
| 269 OverlayCandidateValidator* OutputSurface::GetOverlayCandidateValidator() const { | 259 OverlayCandidateValidator* OutputSurface::GetOverlayCandidateValidator() const { |
| 270 return nullptr; | 260 return nullptr; |
| 271 } | 261 } |
| 272 | 262 |
| 273 bool OutputSurface::IsDisplayedAsOverlayPlane() const { | 263 bool OutputSurface::IsDisplayedAsOverlayPlane() const { |
| 274 return false; | 264 return false; |
| 275 } | 265 } |
| 276 | 266 |
| 277 unsigned OutputSurface::GetOverlayTextureId() const { | 267 unsigned OutputSurface::GetOverlayTextureId() const { |
| 278 return 0; | 268 return 0; |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 if (context_provider_.get()) { | 307 if (context_provider_.get()) { |
| 318 context_provider_->SetLostContextCallback( | 308 context_provider_->SetLostContextCallback( |
| 319 ContextProvider::LostContextCallback()); | 309 ContextProvider::LostContextCallback()); |
| 320 } | 310 } |
| 321 context_provider_ = nullptr; | 311 context_provider_ = nullptr; |
| 322 client_ = nullptr; | 312 client_ = nullptr; |
| 323 weak_ptr_factory_.InvalidateWeakPtrs(); | 313 weak_ptr_factory_.InvalidateWeakPtrs(); |
| 324 } | 314 } |
| 325 | 315 |
| 326 } // namespace cc | 316 } // namespace cc |
| OLD | NEW |