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

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

Issue 1540363002: Don't ref/unref the static src-over xp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tiny Created 5 years 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
« no previous file with comments | « src/gpu/effects/GrPorterDuffXferProcessor.cpp ('k') | src/gpu/gl/GrGLProgram.cpp » ('j') | 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 8
9 #include "GrGLGpu.h" 9 #include "GrGLGpu.h"
10 #include "GrGLGLSL.h" 10 #include "GrGLGLSL.h"
(...skipping 1483 matching lines...) Expand 10 before | Expand all | Expand 10 after
1494 } 1494 }
1495 } 1495 }
1496 1496
1497 // See fall through note above 1497 // See fall through note above
1498 this->disableScissor(); 1498 this->disableScissor();
1499 } 1499 }
1500 1500
1501 bool GrGLGpu::flushGLState(const DrawArgs& args) { 1501 bool GrGLGpu::flushGLState(const DrawArgs& args) {
1502 GrXferProcessor::BlendInfo blendInfo; 1502 GrXferProcessor::BlendInfo blendInfo;
1503 const GrPipeline& pipeline = *args.fPipeline; 1503 const GrPipeline& pipeline = *args.fPipeline;
1504 args.fPipeline->getXferProcessor()->getBlendInfo(&blendInfo); 1504 args.fPipeline->getXferProcessor().getBlendInfo(&blendInfo);
1505 1505
1506 this->flushColorWrite(blendInfo.fWriteColor); 1506 this->flushColorWrite(blendInfo.fWriteColor);
1507 this->flushDrawFace(pipeline.getDrawFace()); 1507 this->flushDrawFace(pipeline.getDrawFace());
1508 1508
1509 SkAutoTUnref<GrGLProgram> program(fProgramCache->refProgram(args)); 1509 SkAutoTUnref<GrGLProgram> program(fProgramCache->refProgram(args));
1510 if (!program) { 1510 if (!program) {
1511 GrCapsDebugf(this->caps(), "Failed to create program!\n"); 1511 GrCapsDebugf(this->caps(), "Failed to create program!\n");
1512 return false; 1512 return false;
1513 } 1513 }
1514 1514
(...skipping 2061 matching lines...) Expand 10 before | Expand all | Expand 10 after
3576 this->setVertexArrayID(gpu, 0); 3576 this->setVertexArrayID(gpu, 0);
3577 } 3577 }
3578 int attrCount = gpu->glCaps().maxVertexAttributes(); 3578 int attrCount = gpu->glCaps().maxVertexAttributes();
3579 if (fDefaultVertexArrayAttribState.count() != attrCount) { 3579 if (fDefaultVertexArrayAttribState.count() != attrCount) {
3580 fDefaultVertexArrayAttribState.resize(attrCount); 3580 fDefaultVertexArrayAttribState.resize(attrCount);
3581 } 3581 }
3582 attribState = &fDefaultVertexArrayAttribState; 3582 attribState = &fDefaultVertexArrayAttribState;
3583 } 3583 }
3584 return attribState; 3584 return attribState;
3585 } 3585 }
OLDNEW
« no previous file with comments | « src/gpu/effects/GrPorterDuffXferProcessor.cpp ('k') | src/gpu/gl/GrGLProgram.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698