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/GrStencilAndCoverTextContext.cpp

Issue 746253003: Add IndexType parameter to GrDrawTarget::drawPaths (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 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/GrStencilAndCoverTextContext.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 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 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 fTransformBuffer[2 * fPendingGlyphCount + 1] = -fTextInverseRatio * y; 360 fTransformBuffer[2 * fPendingGlyphCount + 1] = -fTextInverseRatio * y;
361 361
362 ++fPendingGlyphCount; 362 ++fPendingGlyphCount;
363 } 363 }
364 364
365 void GrStencilAndCoverTextContext::flush() { 365 void GrStencilAndCoverTextContext::flush() {
366 if (0 == fPendingGlyphCount) { 366 if (0 == fPendingGlyphCount) {
367 return; 367 return;
368 } 368 }
369 369
370 fDrawTarget->drawPaths(&fDrawState, fGlyphs, fIndexBuffer, fPendingGlyphCoun t, fTransformBuffer, 370 fDrawTarget->drawPaths(&fDrawState, fGlyphs, fIndexBuffer, GrPathRange::kU16 _PathIndexType,
371 GrPathRendering::kTranslate_PathTransformType, 371 fTransformBuffer, GrPathRendering::kTranslate_PathTra nsformType,
372 GrPathRendering::kWinding_FillType); 372 fPendingGlyphCount, GrPathRendering::kWinding_FillTyp e);
373 373
374 fPendingGlyphCount = 0; 374 fPendingGlyphCount = 0;
375 } 375 }
376 376
377 void GrStencilAndCoverTextContext::finish() { 377 void GrStencilAndCoverTextContext::finish() {
378 this->flush(); 378 this->flush();
379 379
380 fGlyphs->unref(); 380 fGlyphs->unref();
381 fGlyphs = NULL; 381 fGlyphs = NULL;
382 382
383 SkGlyphCache::AttachCache(fGlyphCache); 383 SkGlyphCache::AttachCache(fGlyphCache);
384 fGlyphCache = NULL; 384 fGlyphCache = NULL;
385 385
386 fDrawState.stencil()->setDisabled(); 386 fDrawState.stencil()->setDisabled();
387 fStateRestore.set(NULL); 387 fStateRestore.set(NULL);
388 fContext->setMatrix(fContextInitialMatrix); 388 fContext->setMatrix(fContextInitialMatrix);
389 GrTextContext::finish(); 389 GrTextContext::finish();
390 } 390 }
391 391
OLDNEW
« no previous file with comments | « src/gpu/GrStencilAndCoverTextContext.h ('k') | src/gpu/gl/GrGLPathRendering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698