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

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

Issue 873473008: Remove always true if statement and commented out code in GrBitmapTextContext (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 10 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 | « no previous file | no next file » | 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 2013 Google Inc. 2 * Copyright 2013 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 "GrBitmapTextContext.h" 8 #include "GrBitmapTextContext.h"
9 #include "GrAtlas.h" 9 #include "GrAtlas.h"
10 #include "GrDefaultGeoProcFactory.h" 10 #include "GrDefaultGeoProcFactory.h"
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 } 414 }
415 415
416 vx += SkIntToFixed(glyph->fBounds.fLeft); 416 vx += SkIntToFixed(glyph->fBounds.fLeft);
417 vy += SkIntToFixed(glyph->fBounds.fTop); 417 vy += SkIntToFixed(glyph->fBounds.fTop);
418 418
419 // keep them as ints until we've done the clip-test 419 // keep them as ints until we've done the clip-test
420 SkFixed width = glyph->fBounds.width(); 420 SkFixed width = glyph->fBounds.width();
421 SkFixed height = glyph->fBounds.height(); 421 SkFixed height = glyph->fBounds.height();
422 422
423 // check if we clipped out 423 // check if we clipped out
424 if (true || NULL == glyph->fPlot) { 424 int x = vx >> 16;
425 int x = vx >> 16; 425 int y = vy >> 16;
426 int y = vy >> 16; 426 if (fClipRect.quickReject(x, y, x + width, y + height)) {
427 if (fClipRect.quickReject(x, y, x + width, y + height)) { 427 return;
428 // SkCLZ(3); // so we can set a break-point in the debugger
429 return;
430 }
431 } 428 }
432 429
433 // If the glyph is too large we fall back to paths 430 // If the glyph is too large we fall back to paths
434 if (NULL == glyph->fPlot && !uploadGlyph(glyph, scaler)) { 431 if (NULL == glyph->fPlot && !uploadGlyph(glyph, scaler)) {
435 if (NULL == glyph->fPath) { 432 if (NULL == glyph->fPath) {
436 SkPath* path = SkNEW(SkPath); 433 SkPath* path = SkNEW(SkPath);
437 if (!scaler->getGlyphPath(glyph->glyphID(), path)) { 434 if (!scaler->getGlyphPath(glyph->glyphID(), path)) {
438 // flag the glyph as being dead? 435 // flag the glyph as being dead?
439 delete path; 436 delete path;
440 return; 437 return;
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 } 604 }
608 } 605 }
609 606
610 inline void GrBitmapTextContext::finish() { 607 inline void GrBitmapTextContext::finish() {
611 this->flush(); 608 this->flush();
612 fTotalVertexCount = 0; 609 fTotalVertexCount = 0;
613 610
614 GrTextContext::finish(); 611 GrTextContext::finish();
615 } 612 }
616 613
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698