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