Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(310)

Side by Side Diff: src/gpu/gl/GrGpuGL_program.cpp

Issue 508663002: Create an optimized draw state but not hooked in yet to gpu pipeline (Closed) Base URL: https://skia.googlesource.com/skia.git@drawBase
Patch Set: Rebased to working ref changes Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« src/gpu/GrDrawState.h ('K') | « src/gpu/GrRODrawState.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "GrEffect.h" 10 #include "GrEffect.h"
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 ++fCurrLRUStamp; 198 ++fCurrLRUStamp;
199 return entry->fProgram; 199 return entry->fProgram;
200 } 200 }
201 201
202 //////////////////////////////////////////////////////////////////////////////// 202 ////////////////////////////////////////////////////////////////////////////////
203 203
204 #define GL_CALL(X) GR_GL_CALL(this->glInterface(), X) 204 #define GL_CALL(X) GR_GL_CALL(this->glInterface(), X)
205 205
206 bool GrGpuGL::flushGraphicsState(DrawType type, const GrDeviceCoordTexture* dstC opy) { 206 bool GrGpuGL::flushGraphicsState(DrawType type, const GrDeviceCoordTexture* dstC opy) {
207 const GrDrawState& drawState = this->getDrawState(); 207 const GrDrawState& drawState = this->getDrawState();
208 const GrOptDrawState& optState = *this->getDrawState().createOptState();
209 optState.unref();
210 const GrOptDrawState& optState2 = *this->getDrawState().createOptState();
211 optState2.unref();
212 208
213 // GrGpu::setupClipAndFlushState should have already checked this and bailed if not true. 209 // GrGpu::setupClipAndFlushState should have already checked this and bailed if not true.
214 SkASSERT(drawState.getRenderTarget()); 210 SkASSERT(drawState.getRenderTarget());
215 211
216 if (kStencilPath_DrawType == type) { 212 if (kStencilPath_DrawType == type) {
217 const GrRenderTarget* rt = this->getDrawState().getRenderTarget(); 213 const GrRenderTarget* rt = this->getDrawState().getRenderTarget();
218 SkISize size; 214 SkISize size;
219 size.set(rt->width(), rt->height()); 215 size.set(rt->width(), rt->height());
220 this->glPathRendering()->setProjectionMatrix(drawState.getViewMatrix(), size, rt->origin()); 216 this->glPathRendering()->setProjectionMatrix(drawState.getViewMatrix(), size, rt->origin());
221 } else { 217 } else {
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 GrGLAttribTypeToLayout(attribType).fType, 365 GrGLAttribTypeToLayout(attribType).fType,
370 GrGLAttribTypeToLayout(attribType).fNormalized, 366 GrGLAttribTypeToLayout(attribType).fNormalized,
371 stride, 367 stride,
372 reinterpret_cast<GrGLvoid*>( 368 reinterpret_cast<GrGLvoid*>(
373 vertexOffsetInBytes + vertexAttrib->fOffset)); 369 vertexOffsetInBytes + vertexAttrib->fOffset));
374 } 370 }
375 } 371 }
376 attribState->disableUnusedArrays(this, usedAttribArraysMask); 372 attribState->disableUnusedArrays(this, usedAttribArraysMask);
377 } 373 }
378 } 374 }
OLDNEW
« src/gpu/GrDrawState.h ('K') | « src/gpu/GrRODrawState.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698