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 "GrGpuGL.h" | 8 #include "GrGpuGL.h" |
9 | 9 |
10 #include "builders/GrGLProgramBuilder.h" | 10 #include "builders/GrGLProgramBuilder.h" |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 } | 195 } |
196 ++fCurrLRUStamp; | 196 ++fCurrLRUStamp; |
197 return entry->fProgram; | 197 return entry->fProgram; |
198 } | 198 } |
199 | 199 |
200 //////////////////////////////////////////////////////////////////////////////// | 200 //////////////////////////////////////////////////////////////////////////////// |
201 | 201 |
202 #define GL_CALL(X) GR_GL_CALL(this->glInterface(), X) | 202 #define GL_CALL(X) GR_GL_CALL(this->glInterface(), X) |
203 | 203 |
204 bool GrGpuGL::flushGraphicsState(DrawType type, | 204 bool GrGpuGL::flushGraphicsState(DrawType type, |
205 const ScissorState& scissorState, | 205 const GrClipMaskManager::ScissorState& scissorS
tate, |
206 const GrDeviceCoordTexture* dstCopy) { | 206 const GrDeviceCoordTexture* dstCopy) { |
207 SkAutoTUnref<GrOptDrawState> optState(GrOptDrawState::Create(this->getDrawSt
ate(), | 207 SkAutoTUnref<GrOptDrawState> optState(GrOptDrawState::Create(this->getDrawSt
ate(), |
208 this, | 208 this, |
209 dstCopy, | 209 dstCopy, |
210 type)); | 210 type)); |
211 | 211 |
212 if (!optState) { | 212 if (!optState) { |
213 return false; | 213 return false; |
214 } | 214 } |
215 | 215 |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 | 357 |
358 void GrGpuGL::buildProgramDesc(const GrOptDrawState& optState, | 358 void GrGpuGL::buildProgramDesc(const GrOptDrawState& optState, |
359 const GrProgramDesc::DescInfo& descInfo, | 359 const GrProgramDesc::DescInfo& descInfo, |
360 GrGpu::DrawType drawType, | 360 GrGpu::DrawType drawType, |
361 const GrDeviceCoordTexture* dstCopy, | 361 const GrDeviceCoordTexture* dstCopy, |
362 GrProgramDesc* desc) { | 362 GrProgramDesc* desc) { |
363 if (!GrGLProgramDescBuilder::Build(optState, descInfo, drawType, this, dstCo
py, desc)) { | 363 if (!GrGLProgramDescBuilder::Build(optState, descInfo, drawType, this, dstCo
py, desc)) { |
364 SkDEBUGFAIL("Failed to generate GL program descriptor"); | 364 SkDEBUGFAIL("Failed to generate GL program descriptor"); |
365 } | 365 } |
366 } | 366 } |
OLD | NEW |