OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 | 8 |
9 #include "GrGLCaps.h" | 9 #include "GrGLCaps.h" |
10 | 10 |
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 } | 386 } |
387 } | 387 } |
388 | 388 |
389 if (kGL_GrGLStandard == standard) { | 389 if (kGL_GrGLStandard == standard) { |
390 if (version >= GR_GL_VER(3, 0) || ctxInfo.hasExtension("GL_ARB_pixel_buf
fer_object")) { | 390 if (version >= GR_GL_VER(3, 0) || ctxInfo.hasExtension("GL_ARB_pixel_buf
fer_object")) { |
391 fTransferBufferType = kPBO_TransferBufferType; | 391 fTransferBufferType = kPBO_TransferBufferType; |
392 } | 392 } |
393 } else { | 393 } else { |
394 if (version >= GR_GL_VER(3, 0) || ctxInfo.hasExtension("GL_NV_pixel_buff
er_object")) { | 394 if (version >= GR_GL_VER(3, 0) || ctxInfo.hasExtension("GL_NV_pixel_buff
er_object")) { |
395 fTransferBufferType = kPBO_TransferBufferType; | 395 fTransferBufferType = kPBO_TransferBufferType; |
396 } else if (ctxInfo.hasExtension("GL_CHROMIUM_pixel_transfer_buffer_objec
t")) { | 396 // TODO: get transfer buffers working in Chrome |
397 fTransferBufferType = kChromium_TransferBufferType; | 397 // } else if (ctxInfo.hasExtension("GL_CHROMIUM_pixel_transfer_buffer_obj
ect")) { |
| 398 // fTransferBufferType = kChromium_TransferBufferType; |
398 } | 399 } |
399 } | 400 } |
400 | 401 |
401 // On many GPUs, map memory is very expensive, so we effectively disable it
here by setting the | 402 // On many GPUs, map memory is very expensive, so we effectively disable it
here by setting the |
402 // threshold to the maximum unless the client gives us a hint that map memor
y is cheap. | 403 // threshold to the maximum unless the client gives us a hint that map memor
y is cheap. |
403 if (fBufferMapThreshold < 0) { | 404 if (fBufferMapThreshold < 0) { |
404 // We think mapping on Chromium will be cheaper once we know ahead of ti
me how much space | 405 // We think mapping on Chromium will be cheaper once we know ahead of ti
me how much space |
405 // we will use for all GrBatchs. Right now we might wind up mapping a la
rge buffer and using | 406 // we will use for all GrBatchs. Right now we might wind up mapping a la
rge buffer and using |
406 // a small subset. | 407 // a small subset. |
407 #if 0 | 408 #if 0 |
(...skipping 1494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1902 for (int j = 0; j < kExternalFormatUsageCnt; ++j) { | 1903 for (int j = 0; j < kExternalFormatUsageCnt; ++j) { |
1903 SkASSERT(defaultEntry.fFormats.fExternalFormat[j] != | 1904 SkASSERT(defaultEntry.fFormats.fExternalFormat[j] != |
1904 fConfigTable[i].fFormats.fExternalFormat[j]); | 1905 fConfigTable[i].fFormats.fExternalFormat[j]); |
1905 } | 1906 } |
1906 SkASSERT(defaultEntry.fFormats.fExternalType != fConfigTable[i].fFormats
.fExternalType); | 1907 SkASSERT(defaultEntry.fFormats.fExternalType != fConfigTable[i].fFormats
.fExternalType); |
1907 } | 1908 } |
1908 #endif | 1909 #endif |
1909 } | 1910 } |
1910 | 1911 |
1911 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {} | 1912 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {} |
OLD | NEW |