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 1895 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1906 | 1906 |
1907 fDrawBufferVBAllocPool = | 1907 fDrawBufferVBAllocPool = |
1908 SkNEW_ARGS(GrVertexBufferAllocPool, (fGpu, false, | 1908 SkNEW_ARGS(GrVertexBufferAllocPool, (fGpu, false, |
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, false, |
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, (fGpu, | 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 |
1925 const GrIndexBuffer* GrContext::getQuadIndexBuffer() const { | 1925 const GrIndexBuffer* GrContext::getQuadIndexBuffer() const { |
1926 return fGpu->getQuadIndexBuffer(); | 1926 return fGpu->getQuadIndexBuffer(); |
(...skipping 81 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 |