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/debug/trace_event.h" | |
9 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "base/trace_event/trace_event.h" |
10 #include "cc/output/managed_memory_policy.h" | 10 #include "cc/output/managed_memory_policy.h" |
11 #include "cc/output/output_surface_client.h" | 11 #include "cc/output/output_surface_client.h" |
12 #include "gpu/GLES2/gl2extchromium.h" | 12 #include "gpu/GLES2/gl2extchromium.h" |
13 #include "gpu/command_buffer/client/gles2_interface.h" | 13 #include "gpu/command_buffer/client/gles2_interface.h" |
14 #include "ui/gfx/geometry/rect.h" | 14 #include "ui/gfx/geometry/rect.h" |
15 #include "ui/gfx/geometry/size.h" | 15 #include "ui/gfx/geometry/size.h" |
16 | 16 |
17 | 17 |
18 namespace cc { | 18 namespace cc { |
19 | 19 |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 TRACE_EVENT1("cc", "OutputSurface::SetMemoryPolicy", | 222 TRACE_EVENT1("cc", "OutputSurface::SetMemoryPolicy", |
223 "bytes_limit_when_visible", policy.bytes_limit_when_visible); | 223 "bytes_limit_when_visible", policy.bytes_limit_when_visible); |
224 // Just ignore the memory manager when it says to set the limit to zero | 224 // Just ignore the memory manager when it says to set the limit to zero |
225 // bytes. This will happen when the memory manager thinks that the renderer | 225 // bytes. This will happen when the memory manager thinks that the renderer |
226 // is not visible (which the renderer knows better). | 226 // is not visible (which the renderer knows better). |
227 if (policy.bytes_limit_when_visible) | 227 if (policy.bytes_limit_when_visible) |
228 client_->SetMemoryPolicy(policy); | 228 client_->SetMemoryPolicy(policy); |
229 } | 229 } |
230 | 230 |
231 } // namespace cc | 231 } // namespace cc |
OLD | NEW |