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

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: rebase.. 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
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 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 // Flush previously entered commands to ensure ordering with any 347 // Flush previously entered commands to ensure ordering with any
348 // glBeginQueryEXT() calls that may have been put into the context. 348 // glBeginQueryEXT() calls that may have been put into the context.
349 ShallowFlushCHROMIUM(); 349 ShallowFlushCHROMIUM();
350 gpu_control_->SignalQuery( 350 gpu_control_->SignalQuery(
351 query, 351 query,
352 base::Bind(&GLES2Implementation::RunIfContextNotLost, 352 base::Bind(&GLES2Implementation::RunIfContextNotLost,
353 weak_ptr_factory_.GetWeakPtr(), 353 weak_ptr_factory_.GetWeakPtr(),
354 callback)); 354 callback));
355 } 355 }
356 356
357 void GLES2Implementation::SetSurfaceVisible(bool visible) {
358 TRACE_EVENT1(
359 "gpu", "GLES2Implementation::SetSurfaceVisible", "visible", visible);
360 ShallowFlushCHROMIUM();
361 gpu_control_->SetSurfaceVisible(visible);
362 }
363
364 void GLES2Implementation::SetAggressivelyFreeResources( 357 void GLES2Implementation::SetAggressivelyFreeResources(
365 bool aggressively_free_resources) { 358 bool aggressively_free_resources) {
366 TRACE_EVENT1("gpu", "GLES2Implementation::SetAggressivelyFreeResources", 359 TRACE_EVENT1("gpu", "GLES2Implementation::SetAggressivelyFreeResources",
367 "aggressively_free_resources", aggressively_free_resources); 360 "aggressively_free_resources", aggressively_free_resources);
368 aggressively_free_resources_ = aggressively_free_resources; 361 aggressively_free_resources_ = aggressively_free_resources;
369 362
370 if (aggressively_free_resources_ && helper_->HaveRingBuffer()) { 363 if (aggressively_free_resources_ && helper_->HaveRingBuffer()) {
371 // Ensure that we clean up as much cache memory as possible and fully flush. 364 // Ensure that we clean up as much cache memory as possible and fully flush.
372 FlushDriverCachesCHROMIUM(); 365 FlushDriverCachesCHROMIUM();
373 366
(...skipping 6018 matching lines...) Expand 10 before | Expand all | Expand 10 after
6392 CheckGLError(); 6385 CheckGLError();
6393 } 6386 }
6394 6387
6395 // Include the auto-generated part of this file. We split this because it means 6388 // Include the auto-generated part of this file. We split this because it means
6396 // we can easily edit the non-auto generated parts right here in this file 6389 // we can easily edit the non-auto generated parts right here in this file
6397 // instead of having to edit some template or the code generator. 6390 // instead of having to edit some template or the code generator.
6398 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" 6391 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h"
6399 6392
6400 } // namespace gles2 6393 } // namespace gles2
6401 } // namespace gpu 6394 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/client/gles2_implementation.h ('k') | gpu/command_buffer/client/gpu_control.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698