| 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 <set> | 7 #include <set> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 begin_frame_pending_ = false; | 217 begin_frame_pending_ = false; |
| 218 pending_swap_buffers_ = 0; | 218 pending_swap_buffers_ = 0; |
| 219 client_->DidLoseOutputSurface(); | 219 client_->DidLoseOutputSurface(); |
| 220 } | 220 } |
| 221 | 221 |
| 222 void OutputSurface::SetExternalStencilTest(bool enabled) { | 222 void OutputSurface::SetExternalStencilTest(bool enabled) { |
| 223 client_->SetExternalStencilTest(enabled); | 223 client_->SetExternalStencilTest(enabled); |
| 224 } | 224 } |
| 225 | 225 |
| 226 void OutputSurface::SetExternalDrawConstraints(const gfx::Transform& transform, | 226 void OutputSurface::SetExternalDrawConstraints(const gfx::Transform& transform, |
| 227 gfx::Rect viewport) { | 227 gfx::Rect viewport, |
| 228 client_->SetExternalDrawConstraints(transform, viewport); | 228 gfx::Rect clip, |
| 229 bool valid_for_tile_management) { |
| 230 client_->SetExternalDrawConstraints( |
| 231 transform, viewport, clip, valid_for_tile_management); |
| 229 } | 232 } |
| 230 | 233 |
| 231 OutputSurface::~OutputSurface() { | 234 OutputSurface::~OutputSurface() { |
| 232 if (frame_rate_controller_) | 235 if (frame_rate_controller_) |
| 233 frame_rate_controller_->SetActive(false); | 236 frame_rate_controller_->SetActive(false); |
| 234 ResetContext3d(); | 237 ResetContext3d(); |
| 235 } | 238 } |
| 236 | 239 |
| 237 bool OutputSurface::ForcedDrawToSoftwareDevice() const { | 240 bool OutputSurface::ForcedDrawToSoftwareDevice() const { |
| 238 return false; | 241 return false; |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 "discard_backbuffer", discard_backbuffer); | 398 "discard_backbuffer", discard_backbuffer); |
| 396 // Just ignore the memory manager when it says to set the limit to zero | 399 // Just ignore the memory manager when it says to set the limit to zero |
| 397 // bytes. This will happen when the memory manager thinks that the renderer | 400 // bytes. This will happen when the memory manager thinks that the renderer |
| 398 // is not visible (which the renderer knows better). | 401 // is not visible (which the renderer knows better). |
| 399 if (policy.bytes_limit_when_visible) | 402 if (policy.bytes_limit_when_visible) |
| 400 client_->SetMemoryPolicy(policy); | 403 client_->SetMemoryPolicy(policy); |
| 401 client_->SetDiscardBackBufferWhenNotVisible(discard_backbuffer); | 404 client_->SetDiscardBackBufferWhenNotVisible(discard_backbuffer); |
| 402 } | 405 } |
| 403 | 406 |
| 404 } // namespace cc | 407 } // namespace cc |
| OLD | NEW |