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 <algorithm> | 7 #include <algorithm> |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 } | 86 } |
87 | 87 |
88 void OutputSurface::SetExternalStencilTest(bool enabled) { | 88 void OutputSurface::SetExternalStencilTest(bool enabled) { |
89 external_stencil_test_enabled_ = enabled; | 89 external_stencil_test_enabled_ = enabled; |
90 } | 90 } |
91 | 91 |
92 void OutputSurface::SetExternalDrawConstraints( | 92 void OutputSurface::SetExternalDrawConstraints( |
93 const gfx::Transform& transform, | 93 const gfx::Transform& transform, |
94 const gfx::Rect& viewport, | 94 const gfx::Rect& viewport, |
95 const gfx::Rect& clip, | 95 const gfx::Rect& clip, |
| 96 const gfx::Rect& viewport_rect_for_tile_priority, |
| 97 const gfx::Transform& transform_for_tile_priority, |
96 bool resourceless_software_draw) { | 98 bool resourceless_software_draw) { |
97 client_->SetExternalDrawConstraints( | 99 client_->SetExternalDrawConstraints(transform, |
98 transform, viewport, clip, resourceless_software_draw); | 100 viewport, |
| 101 clip, |
| 102 viewport_rect_for_tile_priority, |
| 103 transform_for_tile_priority, |
| 104 resourceless_software_draw); |
99 } | 105 } |
100 | 106 |
101 OutputSurface::~OutputSurface() { | 107 OutputSurface::~OutputSurface() { |
102 ResetContext3d(); | 108 ResetContext3d(); |
103 } | 109 } |
104 | 110 |
105 bool OutputSurface::HasExternalStencilTest() const { | 111 bool OutputSurface::HasExternalStencilTest() const { |
106 return external_stencil_test_enabled_; | 112 return external_stencil_test_enabled_; |
107 } | 113 } |
108 | 114 |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 TRACE_EVENT1("cc", "OutputSurface::SetMemoryPolicy", | 262 TRACE_EVENT1("cc", "OutputSurface::SetMemoryPolicy", |
257 "bytes_limit_when_visible", policy.bytes_limit_when_visible); | 263 "bytes_limit_when_visible", policy.bytes_limit_when_visible); |
258 // Just ignore the memory manager when it says to set the limit to zero | 264 // Just ignore the memory manager when it says to set the limit to zero |
259 // bytes. This will happen when the memory manager thinks that the renderer | 265 // bytes. This will happen when the memory manager thinks that the renderer |
260 // is not visible (which the renderer knows better). | 266 // is not visible (which the renderer knows better). |
261 if (policy.bytes_limit_when_visible) | 267 if (policy.bytes_limit_when_visible) |
262 client_->SetMemoryPolicy(policy); | 268 client_->SetMemoryPolicy(policy); |
263 } | 269 } |
264 | 270 |
265 } // namespace cc | 271 } // namespace cc |
OLD | NEW |