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

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

Issue 1919843002: Revert of Batch multiple single NVPR draw paths to instanced draws (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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/gl/GrGLPath.h ('k') | src/gpu/gl/GrGLPathRendering.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 2012 Google Inc. 2 * Copyright 2012 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 "GrGLPath.h" 8 #include "GrGLPath.h"
9 #include "GrGLPathRendering.h" 9 #include "GrGLPathRendering.h"
10 #include "GrGLGpu.h" 10 #include "GrGLGpu.h"
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 InitPathObjectStroke(gpu, fPathID, *stroke); 326 InitPathObjectStroke(gpu, fPathID, *stroke);
327 327
328 // FIXME: try to account for stroking, without rasterizing the strok e. 328 // FIXME: try to account for stroking, without rasterizing the strok e.
329 fBounds.outset(stroke->getWidth(), stroke->getWidth()); 329 fBounds.outset(stroke->getWidth(), stroke->getWidth());
330 } 330 }
331 } 331 }
332 332
333 this->registerWithCache(SkBudgeted::kYes); 333 this->registerWithCache(SkBudgeted::kYes);
334 } 334 }
335 335
336 bool GrGLPath::canCombineDrawPathBatchWith(const GrPath& o) const {
337 const GrGLPath* other = static_cast<const GrGLPath*>(&o);
338 return fShouldStroke == other->fShouldStroke &&
339 fShouldFill == other->fShouldFill;
340 }
341
342 void GrGLPath::onRelease() { 336 void GrGLPath::onRelease() {
343 if (0 != fPathID) { 337 if (0 != fPathID) {
344 static_cast<GrGLGpu*>(this->getGpu())->glPathRendering()->deletePaths(fP athID, 1); 338 static_cast<GrGLGpu*>(this->getGpu())->glPathRendering()->deletePaths(fP athID, 1);
345 fPathID = 0; 339 fPathID = 0;
346 } 340 }
347 341
348 INHERITED::onRelease(); 342 INHERITED::onRelease();
349 } 343 }
350 344
351 void GrGLPath::onAbandon() { 345 void GrGLPath::onAbandon() {
352 fPathID = 0; 346 fPathID = 0;
353 347
354 INHERITED::onAbandon(); 348 INHERITED::onAbandon();
355 } 349 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLPath.h ('k') | src/gpu/gl/GrGLPathRendering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698