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

Side by Side Diff: src/gpu/gl/GrGLBufferImpl.cpp

Issue 1503593002: Add transfer buffer to GLCaps (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix compile errors 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 | « no previous file | src/gpu/gl/GrGLCaps.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 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "GrGLBufferImpl.h" 8 #include "GrGLBufferImpl.h"
9 #include "GrGLGpu.h" 9 #include "GrGLGpu.h"
10 10
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 fGLSizeInBytes = fDesc.fSizeInBytes; 104 fGLSizeInBytes = fDesc.fSizeInBytes;
105 #else 105 #else
106 fGLSizeInBytes = srcSizeInBytes; 106 fGLSizeInBytes = srcSizeInBytes;
107 #endif 107 #endif
108 VALIDATE(); 108 VALIDATE();
109 return true; 109 return true;
110 } 110 }
111 111
112 void GrGLBufferImpl::validate() const { 112 void GrGLBufferImpl::validate() const {
113 SkASSERT(GR_GL_ARRAY_BUFFER == fBufferType || GR_GL_ELEMENT_ARRAY_BUFFER == fBufferType || 113 SkASSERT(GR_GL_ARRAY_BUFFER == fBufferType || GR_GL_ELEMENT_ARRAY_BUFFER == fBufferType ||
114 GR_GL_PIXEL_PACK_BUFFER == fBufferType || GR_GL_PIXEL_UNPACK_BUFFER == fBufferType); 114 GR_GL_PIXEL_PACK_BUFFER == fBufferType || GR_GL_PIXEL_UNPACK_BUFFER == fBufferType ||
115 GR_GL_PIXEL_PACK_TRANSFER_BUFFER_CHROMIUM == fBufferType ||
116 GR_GL_PIXEL_UNPACK_TRANSFER_BUFFER_CHROMIUM == fBufferType);
115 // The following assert isn't valid when the buffer has been abandoned: 117 // The following assert isn't valid when the buffer has been abandoned:
116 // SkASSERT((0 == fDesc.fID) == (fCPUData)); 118 // SkASSERT((0 == fDesc.fID) == (fCPUData));
117 SkASSERT(nullptr == fCPUData || 0 == fGLSizeInBytes); 119 SkASSERT(nullptr == fCPUData || 0 == fGLSizeInBytes);
118 SkASSERT(nullptr == fMapPtr || fCPUData || fGLSizeInBytes <= fDesc.fSizeInBy tes); 120 SkASSERT(nullptr == fMapPtr || fCPUData || fGLSizeInBytes <= fDesc.fSizeInBy tes);
119 SkASSERT(nullptr == fCPUData || nullptr == fMapPtr || fCPUData == fMapPtr); 121 SkASSERT(nullptr == fCPUData || nullptr == fMapPtr || fCPUData == fMapPtr);
120 } 122 }
OLDNEW
« no previous file with comments | « no previous file | src/gpu/gl/GrGLCaps.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698