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

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

Issue 1488933002: Misc fixes for gn builds with VS 2015 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Disable warning 4267 which is the VC++ 2015 4244 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 #include "gpu/command_buffer/client/query_tracker.h" 5 #include "gpu/command_buffer/client/query_tracker.h"
6 6
7 #include <GLES2/gl2.h> 7 #include <GLES2/gl2.h>
8 #include <GLES2/gl2ext.h> 8 #include <GLES2/gl2ext.h>
9 #include <GLES2/gl2extchromium.h> 9 #include <GLES2/gl2extchromium.h>
10 10
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 void* mem = mapped_memory_->Alloc( 60 void* mem = mapped_memory_->Alloc(
61 kSyncsPerBucket * sizeof(QuerySync), &shm_id, &shm_offset); 61 kSyncsPerBucket * sizeof(QuerySync), &shm_id, &shm_offset);
62 if (!mem) { 62 if (!mem) {
63 return false; 63 return false;
64 } 64 }
65 QuerySync* syncs = static_cast<QuerySync*>(mem); 65 QuerySync* syncs = static_cast<QuerySync*>(mem);
66 bucket = new Bucket(syncs, shm_id, shm_offset); 66 bucket = new Bucket(syncs, shm_id, shm_offset);
67 buckets_.push_back(bucket); 67 buckets_.push_back(bucket);
68 } 68 }
69 69
70 unsigned short index_in_bucket = 0; 70 size_t index_in_bucket = 0;
71 for (size_t i = 0; i < kSyncsPerBucket; i++) { 71 for (size_t i = 0; i < kSyncsPerBucket; i++) {
72 if (!bucket->in_use_queries[i]) { 72 if (!bucket->in_use_queries[i]) {
73 index_in_bucket = i; 73 index_in_bucket = i;
74 break; 74 break;
75 } 75 }
76 } 76 }
77 77
78 uint32 shm_offset = 78 uint32 shm_offset =
79 bucket->base_shm_offset + index_in_bucket * sizeof(QuerySync); 79 bucket->base_shm_offset + index_in_bucket * sizeof(QuerySync);
80 QuerySync* sync = bucket->syncs + index_in_bucket; 80 QuerySync* sync = bucket->syncs + index_in_bucket;
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 if (local_disjoint_count_ != disjoint_count) { 386 if (local_disjoint_count_ != disjoint_count) {
387 local_disjoint_count_ = disjoint_count; 387 local_disjoint_count_ = disjoint_count;
388 return true; 388 return true;
389 } 389 }
390 } 390 }
391 return false; 391 return false;
392 } 392 }
393 393
394 } // namespace gles2 394 } // namespace gles2
395 } // namespace gpu 395 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698