OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 "GrGLGpu.h" | 8 #include "GrGLGpu.h" |
9 #include "GrGLBuffer.h" | 9 #include "GrGLBuffer.h" |
10 #include "GrGLGLSL.h" | 10 #include "GrGLGLSL.h" |
(...skipping 1931 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1942 return stencil; | 1942 return stencil; |
1943 } | 1943 } |
1944 | 1944 |
1945 //////////////////////////////////////////////////////////////////////////////// | 1945 //////////////////////////////////////////////////////////////////////////////// |
1946 | 1946 |
1947 // GL_STREAM_DRAW triggers an optimization in Chromium's GPU process where a cli
ent's vertex buffer | 1947 // GL_STREAM_DRAW triggers an optimization in Chromium's GPU process where a cli
ent's vertex buffer |
1948 // objects are implemented as client-side-arrays on tile-deferred architectures. | 1948 // objects are implemented as client-side-arrays on tile-deferred architectures. |
1949 #define DYNAMIC_USAGE_PARAM GR_GL_STREAM_DRAW | 1949 #define DYNAMIC_USAGE_PARAM GR_GL_STREAM_DRAW |
1950 | 1950 |
1951 GrBuffer* GrGLGpu::onCreateBuffer(size_t size, GrBufferType intendedType, | 1951 GrBuffer* GrGLGpu::onCreateBuffer(size_t size, GrBufferType intendedType, |
1952 GrAccessPattern accessPattern) { | 1952 GrAccessPattern accessPattern, const void* dat
a) { |
1953 return GrGLBuffer::Create(this, size, intendedType, accessPattern); | 1953 return GrGLBuffer::Create(this, size, intendedType, accessPattern, data); |
1954 } | 1954 } |
1955 | 1955 |
1956 void GrGLGpu::flushScissor(const GrScissorState& scissorState, | 1956 void GrGLGpu::flushScissor(const GrScissorState& scissorState, |
1957 const GrGLIRect& rtViewport, | 1957 const GrGLIRect& rtViewport, |
1958 GrSurfaceOrigin rtOrigin) { | 1958 GrSurfaceOrigin rtOrigin) { |
1959 if (scissorState.enabled()) { | 1959 if (scissorState.enabled()) { |
1960 GrGLIRect scissor; | 1960 GrGLIRect scissor; |
1961 scissor.setRelativeTo(rtViewport, | 1961 scissor.setRelativeTo(rtViewport, |
1962 scissorState.rect().fLeft, | 1962 scissorState.rect().fLeft, |
1963 scissorState.rect().fTop, | 1963 scissorState.rect().fTop, |
(...skipping 2315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4279 if (GR_GL_TEXTURE_EXTERNAL == glTexture->target() || | 4279 if (GR_GL_TEXTURE_EXTERNAL == glTexture->target() || |
4280 GR_GL_TEXTURE_RECTANGLE == glTexture->target()) { | 4280 GR_GL_TEXTURE_RECTANGLE == glTexture->target()) { |
4281 copyParams->fFilter = GrTextureParams::kNone_FilterMode; | 4281 copyParams->fFilter = GrTextureParams::kNone_FilterMode; |
4282 copyParams->fWidth = texture->width(); | 4282 copyParams->fWidth = texture->width(); |
4283 copyParams->fHeight = texture->height(); | 4283 copyParams->fHeight = texture->height(); |
4284 return true; | 4284 return true; |
4285 } | 4285 } |
4286 } | 4286 } |
4287 return false; | 4287 return false; |
4288 } | 4288 } |
OLD | NEW |