| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 #include "GrContext.h" | 9 #include "GrContext.h" |
| 10 | 10 |
| (...skipping 1887 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1898 return chosenSampleCount <= fGpu->caps()->maxSampleCount() ? | 1898 return chosenSampleCount <= fGpu->caps()->maxSampleCount() ? |
| 1899 chosenSampleCount : 0; | 1899 chosenSampleCount : 0; |
| 1900 } | 1900 } |
| 1901 | 1901 |
| 1902 void GrContext::setupDrawBuffer() { | 1902 void GrContext::setupDrawBuffer() { |
| 1903 SkASSERT(NULL == fDrawBuffer); | 1903 SkASSERT(NULL == fDrawBuffer); |
| 1904 SkASSERT(NULL == fDrawBufferVBAllocPool); | 1904 SkASSERT(NULL == fDrawBufferVBAllocPool); |
| 1905 SkASSERT(NULL == fDrawBufferIBAllocPool); | 1905 SkASSERT(NULL == fDrawBufferIBAllocPool); |
| 1906 | 1906 |
| 1907 fDrawBufferVBAllocPool = | 1907 fDrawBufferVBAllocPool = |
| 1908 SkNEW_ARGS(GrVertexBufferAllocPool, (fGpu, false, | 1908 SkNEW_ARGS(GrVertexBufferAllocPool, (fGpu, |
| 1909 DRAW_BUFFER_VBPOOL_BUFFER_SIZE, | 1909 DRAW_BUFFER_VBPOOL_BUFFER_SIZE, |
| 1910 DRAW_BUFFER_VBPOOL_PREALLOC_BUFFERS)); | 1910 DRAW_BUFFER_VBPOOL_PREALLOC_BUFFERS
)); |
| 1911 fDrawBufferIBAllocPool = | 1911 fDrawBufferIBAllocPool = |
| 1912 SkNEW_ARGS(GrIndexBufferAllocPool, (fGpu, false, | 1912 SkNEW_ARGS(GrIndexBufferAllocPool, (fGpu, |
| 1913 DRAW_BUFFER_IBPOOL_BUFFER_SIZE, | 1913 DRAW_BUFFER_IBPOOL_BUFFER_SIZE, |
| 1914 DRAW_BUFFER_IBPOOL_PREALLOC_BUFFERS)); | 1914 DRAW_BUFFER_IBPOOL_PREALLOC_BUFFERS)
); |
| 1915 | 1915 |
| 1916 fDrawBuffer = SkNEW_ARGS(GrInOrderDrawBuffer, (this, | 1916 fDrawBuffer = SkNEW_ARGS(GrInOrderDrawBuffer, (this, |
| 1917 fDrawBufferVBAllocPool, | 1917 fDrawBufferVBAllocPool, |
| 1918 fDrawBufferIBAllocPool)); | 1918 fDrawBufferIBAllocPool)); |
| 1919 } | 1919 } |
| 1920 | 1920 |
| 1921 GrDrawTarget* GrContext::getTextTarget() { | 1921 GrDrawTarget* GrContext::getTextTarget() { |
| 1922 return this->prepareToDraw(); | 1922 return this->prepareToDraw(); |
| 1923 } | 1923 } |
| 1924 | 1924 |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2008 } | 2008 } |
| 2009 } | 2009 } |
| 2010 | 2010 |
| 2011 void GrContext::removeGpuTraceMarker(const GrGpuTraceMarker* marker) { | 2011 void GrContext::removeGpuTraceMarker(const GrGpuTraceMarker* marker) { |
| 2012 fGpu->removeGpuTraceMarker(marker); | 2012 fGpu->removeGpuTraceMarker(marker); |
| 2013 if (fDrawBuffer) { | 2013 if (fDrawBuffer) { |
| 2014 fDrawBuffer->removeGpuTraceMarker(marker); | 2014 fDrawBuffer->removeGpuTraceMarker(marker); |
| 2015 } | 2015 } |
| 2016 } | 2016 } |
| 2017 | 2017 |
| OLD | NEW |