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

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

Issue 687563008: Beginning to refactor nvpr code (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: cleanup Created 6 years, 1 month 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
OLDNEW
1 /* 1 /*
2 * Copyright 2014 Google Inc. 2 * Copyright 2014 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 "GrStencilAndCoverTextContext.h" 8 #include "GrStencilAndCoverTextContext.h"
9 #include "GrBitmapTextContext.h" 9 #include "GrBitmapTextContext.h"
10 #include "GrDrawTarget.h" 10 #include "GrDrawTarget.h"
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 406
407 ++fPendingGlyphCount; 407 ++fPendingGlyphCount;
408 } 408 }
409 409
410 void GrStencilAndCoverTextContext::flush() { 410 void GrStencilAndCoverTextContext::flush() {
411 if (0 == fPendingGlyphCount) { 411 if (0 == fPendingGlyphCount) {
412 return; 412 return;
413 } 413 }
414 414
415 fDrawTarget->drawPaths(fGlyphs, fIndexBuffer, fPendingGlyphCount, 415 fDrawTarget->drawPaths(fGlyphs, fIndexBuffer, fPendingGlyphCount,
416 fTransformBuffer, fTransformType, SkPath::kWinding_Fi llType); 416 fTransformBuffer, fTransformType, GrPathRendering::kW inding_FillType);
417 417
418 fPendingGlyphCount = 0; 418 fPendingGlyphCount = 0;
419 } 419 }
420 420
421 void GrStencilAndCoverTextContext::finish() { 421 void GrStencilAndCoverTextContext::finish() {
422 this->flush(); 422 this->flush();
423 423
424 fGlyphs->unref(); 424 fGlyphs->unref();
425 fGlyphs = NULL; 425 fGlyphs = NULL;
426 426
427 SkGlyphCache::AttachCache(fGlyphCache); 427 SkGlyphCache::AttachCache(fGlyphCache);
428 fGlyphCache = NULL; 428 fGlyphCache = NULL;
429 429
430 fDrawTarget->drawState()->stencil()->setDisabled(); 430 fDrawTarget->drawState()->stencil()->setDisabled();
431 fStateRestore.set(NULL); 431 fStateRestore.set(NULL);
432 fContext->setMatrix(fContextInitialMatrix); 432 fContext->setMatrix(fContextInitialMatrix);
433 GrTextContext::finish(); 433 GrTextContext::finish();
434 } 434 }
435 435
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698