Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(192)

Side by Side Diff: gpu/command_buffer/client/gles2_implementation.cc

Issue 1469863003: Cleanup SurfaceVisibility code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/common/gpu/gpu_messages.h ('k') | gpu/command_buffer/client/gpu_control.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_messages.h ('k') | gpu/command_buffer/client/gpu_control.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698