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

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

Issue 2278283003: Refactor client visibility handling (Closed)
Patch Set: more fixes Created 4 years, 3 months 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 5843 matching lines...) Expand 10 before | Expand all | Expand 10 after
5854 5854
5855 uint64_t GLES2Implementation::ShareGroupTracingGUID() const { 5855 uint64_t GLES2Implementation::ShareGroupTracingGUID() const {
5856 return share_group_->TracingGUID(); 5856 return share_group_->TracingGUID();
5857 } 5857 }
5858 5858
5859 void GLES2Implementation::SetErrorMessageCallback( 5859 void GLES2Implementation::SetErrorMessageCallback(
5860 const base::Callback<void(const char*, int32_t)>& callback) { 5860 const base::Callback<void(const char*, int32_t)>& callback) {
5861 error_message_callback_ = callback; 5861 error_message_callback_ = callback;
5862 } 5862 }
5863 5863
5864 void GLES2Implementation::SetClientVisible(int client_id, bool is_visible) {
5865 if (is_visible) {
5866 visible_clients_.insert(client_id);
5867 } else {
5868 auto found = visible_clients_.find(client_id);
5869 if (found != visible_clients_.end())
5870 visible_clients_.erase(found);
5871 }
5872 }
5873
5874 bool GLES2Implementation::AnyClientsVisible() const {
5875 return !visible_clients_.empty();
5876 }
5877
5878 void GLES2Implementation::SetLostContextCallback( 5864 void GLES2Implementation::SetLostContextCallback(
5879 const base::Closure& callback) { 5865 const base::Closure& callback) {
5880 lost_context_callback_ = callback; 5866 lost_context_callback_ = callback;
5881 } 5867 }
5882 5868
5883 GLuint64 GLES2Implementation::InsertFenceSyncCHROMIUM() { 5869 GLuint64 GLES2Implementation::InsertFenceSyncCHROMIUM() {
5884 const uint64_t release = gpu_control_->GenerateFenceSyncRelease(); 5870 const uint64_t release = gpu_control_->GenerateFenceSyncRelease();
5885 helper_->InsertFenceSyncCHROMIUM(release); 5871 helper_->InsertFenceSyncCHROMIUM(release);
5886 return release; 5872 return release;
5887 } 5873 }
(...skipping 1021 matching lines...) Expand 10 before | Expand all | Expand 10 after
6909 cached_extensions_.clear(); 6895 cached_extensions_.clear();
6910 } 6896 }
6911 6897
6912 // Include the auto-generated part of this file. We split this because it means 6898 // Include the auto-generated part of this file. We split this because it means
6913 // we can easily edit the non-auto generated parts right here in this file 6899 // we can easily edit the non-auto generated parts right here in this file
6914 // instead of having to edit some template or the code generator. 6900 // instead of having to edit some template or the code generator.
6915 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" 6901 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h"
6916 6902
6917 } // namespace gles2 6903 } // namespace gles2
6918 } // namespace gpu 6904 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/client/gles2_implementation.h ('k') | gpu/command_buffer/client/gles2_implementation_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698