OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // A class to emulate GLES2 over command buffers. | 5 // A class to emulate GLES2 over command buffers. |
6 | 6 |
7 #include "gpu/command_buffer/client/gles2_implementation.h" | 7 #include "gpu/command_buffer/client/gles2_implementation.h" |
8 | 8 |
9 #include <GLES2/gl2.h> | 9 #include <GLES2/gl2.h> |
10 #include <GLES2/gl2ext.h> | 10 #include <GLES2/gl2ext.h> |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
333 // Flush previously entered commands to ensure ordering with any | 333 // Flush previously entered commands to ensure ordering with any |
334 // glBeginQueryEXT() calls that may have been put into the context. | 334 // glBeginQueryEXT() calls that may have been put into the context. |
335 ShallowFlushCHROMIUM(); | 335 ShallowFlushCHROMIUM(); |
336 gpu_control_->SignalQuery( | 336 gpu_control_->SignalQuery( |
337 query, | 337 query, |
338 base::Bind(&GLES2Implementation::RunIfContextNotLost, | 338 base::Bind(&GLES2Implementation::RunIfContextNotLost, |
339 weak_ptr_factory_.GetWeakPtr(), | 339 weak_ptr_factory_.GetWeakPtr(), |
340 callback)); | 340 callback)); |
341 } | 341 } |
342 | 342 |
343 void GLES2Implementation::SetSurfaceVisible(bool visible) { | 343 void GLES2Implementation::SetSurfaceVisible(bool visible) { |
piman
2015/11/23 19:22:51
This doesn't do anything useful any more. I think
sohanjg
2015/11/24 11:28:52
Done.
| |
344 TRACE_EVENT1( | 344 TRACE_EVENT1( |
345 "gpu", "GLES2Implementation::SetSurfaceVisible", "visible", visible); | 345 "gpu", "GLES2Implementation::SetSurfaceVisible", "visible", visible); |
346 ShallowFlushCHROMIUM(); | 346 ShallowFlushCHROMIUM(); |
347 gpu_control_->SetSurfaceVisible(visible); | |
348 } | 347 } |
349 | 348 |
350 void GLES2Implementation::SetAggressivelyFreeResources( | 349 void GLES2Implementation::SetAggressivelyFreeResources( |
351 bool aggressively_free_resources) { | 350 bool aggressively_free_resources) { |
352 TRACE_EVENT1("gpu", "GLES2Implementation::SetAggressivelyFreeResources", | 351 TRACE_EVENT1("gpu", "GLES2Implementation::SetAggressivelyFreeResources", |
353 "aggressively_free_resources", aggressively_free_resources); | 352 "aggressively_free_resources", aggressively_free_resources); |
354 aggressively_free_resources_ = aggressively_free_resources; | 353 aggressively_free_resources_ = aggressively_free_resources; |
355 | 354 |
356 if (aggressively_free_resources_ && helper_->HaveRingBuffer()) { | 355 if (aggressively_free_resources_ && helper_->HaveRingBuffer()) { |
357 // Ensure that we clean up as much cache memory as possible and fully flush. | 356 // Ensure that we clean up as much cache memory as possible and fully flush. |
(...skipping 6020 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6378 CheckGLError(); | 6377 CheckGLError(); |
6379 } | 6378 } |
6380 | 6379 |
6381 // Include the auto-generated part of this file. We split this because it means | 6380 // Include the auto-generated part of this file. We split this because it means |
6382 // we can easily edit the non-auto generated parts right here in this file | 6381 // we can easily edit the non-auto generated parts right here in this file |
6383 // instead of having to edit some template or the code generator. | 6382 // instead of having to edit some template or the code generator. |
6384 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" | 6383 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" |
6385 | 6384 |
6386 } // namespace gles2 | 6385 } // namespace gles2 |
6387 } // namespace gpu | 6386 } // namespace gpu |
OLD | NEW |