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

Side by Side Diff: src/gpu/GrGpu.cpp

Issue 1822343002: Make max number of vertex attributes be checked dynamically (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Address comment Created 4 years, 9 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
« no previous file with comments | « src/gpu/GrGpu.h ('k') | src/gpu/GrPrimitiveProcessor.h » ('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 2010 Google Inc. 2 * Copyright 2010 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 "GrGpu.h" 9 #include "GrGpu.h"
10 10
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 fMultisampleSpecsMap[effectiveKey] = &specs; 485 fMultisampleSpecsMap[effectiveKey] = &specs;
486 if (effectiveSampleCnt != desc.fSampleCnt) { 486 if (effectiveSampleCnt != desc.fSampleCnt) {
487 SkASSERT(surfDescKey < effectiveKey); 487 SkASSERT(surfDescKey < effectiveKey);
488 fMultisampleSpecsMap[surfDescKey] = &specs; 488 fMultisampleSpecsMap[surfDescKey] = &specs;
489 } 489 }
490 return specs; 490 return specs;
491 } 491 }
492 492
493 //////////////////////////////////////////////////////////////////////////////// 493 ////////////////////////////////////////////////////////////////////////////////
494 494
495 void GrGpu::draw(const GrPipeline& pipeline, 495 bool GrGpu::draw(const GrPipeline& pipeline,
496 const GrPrimitiveProcessor& primProc, 496 const GrPrimitiveProcessor& primProc,
497 const GrMesh* meshes, 497 const GrMesh* meshes,
498 int meshCount) { 498 int meshCount) {
499 if (primProc.numAttribs() > this->caps()->maxVertexAttributes()) {
500 return false;
501 }
499 this->handleDirtyContext(); 502 this->handleDirtyContext();
500 503
501 this->onDraw(pipeline, primProc, meshes, meshCount); 504 this->onDraw(pipeline, primProc, meshes, meshCount);
505 return true;
502 } 506 }
503 507
OLDNEW
« no previous file with comments | « src/gpu/GrGpu.h ('k') | src/gpu/GrPrimitiveProcessor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698