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

Side by Side Diff: gpu/command_buffer/service/buffer_manager.cc

Issue 2259523002: Fix gles2_conform_test failures when Mac switching to core profile (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix typo Created 4 years, 4 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
« no previous file with comments | « no previous file | gpu/command_buffer/service/gles2_cmd_copy_tex_image.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 #include "gpu/command_buffer/service/buffer_manager.h" 5 #include "gpu/command_buffer/service/buffer_manager.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <limits> 9 #include <limits>
10 10
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 bool BufferManager::UseNonZeroSizeForClientSideArrayBuffer() { 353 bool BufferManager::UseNonZeroSizeForClientSideArrayBuffer() {
354 return feature_info_.get() && 354 return feature_info_.get() &&
355 feature_info_->workarounds() 355 feature_info_->workarounds()
356 .use_non_zero_size_for_client_side_stream_buffers; 356 .use_non_zero_size_for_client_side_stream_buffers;
357 } 357 }
358 358
359 bool BufferManager::UseShadowBuffer(GLenum target, GLenum usage) { 359 bool BufferManager::UseShadowBuffer(GLenum target, GLenum usage) {
360 const bool is_client_side_array = IsUsageClientSideArray(usage); 360 const bool is_client_side_array = IsUsageClientSideArray(usage);
361 // feature_info_ can be null in some unit tests. 361 // feature_info_ can be null in some unit tests.
362 const bool support_fixed_attribs = 362 const bool support_fixed_attribs =
363 !feature_info_ || feature_info_->gl_version_info().is_es; 363 !feature_info_ || feature_info_->gl_version_info().SupportsFixedType();
364 364
365 // TODO(zmo): Don't shadow buffer data on ES3. crbug.com/491002. 365 // TODO(zmo): Don't shadow buffer data on ES3. crbug.com/491002.
366 return ( 366 return (
367 target == GL_ELEMENT_ARRAY_BUFFER || allow_buffers_on_multiple_targets_ || 367 target == GL_ELEMENT_ARRAY_BUFFER || allow_buffers_on_multiple_targets_ ||
368 (allow_fixed_attribs_ && !support_fixed_attribs) || is_client_side_array); 368 (allow_fixed_attribs_ && !support_fixed_attribs) || is_client_side_array);
369 } 369 }
370 370
371 void BufferManager::SetInfo(Buffer* buffer, 371 void BufferManager::SetInfo(Buffer* buffer,
372 GLenum target, 372 GLenum target,
373 GLsizeiptr size, 373 GLsizeiptr size,
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
661 auto guid = gl::GetGLBufferGUIDForTracing(share_group_tracing_guid, 661 auto guid = gl::GetGLBufferGUIDForTracing(share_group_tracing_guid,
662 client_buffer_id); 662 client_buffer_id);
663 pmd->CreateSharedGlobalAllocatorDump(guid); 663 pmd->CreateSharedGlobalAllocatorDump(guid);
664 pmd->AddOwnershipEdge(dump->guid(), guid); 664 pmd->AddOwnershipEdge(dump->guid(), guid);
665 } 665 }
666 return true; 666 return true;
667 } 667 }
668 668
669 } // namespace gles2 669 } // namespace gles2
670 } // namespace gpu 670 } // namespace gpu
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/service/gles2_cmd_copy_tex_image.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698