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

Side by Side Diff: third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.cpp

Issue 1981823002: Remove OwnPtr::release() calls in platform/ (part 1). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 Google Inc. All rights reserved. 2 * Copyright (c) 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2013 BlackBerry Limited. All rights reserved. 3 * Copyright (C) 2013 BlackBerry Limited. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after
693 run->setGlyphAndPositions(i, fontData->spaceGlyph(), advance, 0, 0); 693 run->setGlyphAndPositions(i, fontData->spaceGlyph(), advance, 0, 0);
694 position += advance; 694 position += advance;
695 } 695 }
696 run->m_width = position - startPosition; 696 run->m_width = position - startPosition;
697 697
698 RefPtr<ShapeResult> result = ShapeResult::create(font, count, textRun.direct ion()); 698 RefPtr<ShapeResult> result = ShapeResult::create(font, count, textRun.direct ion());
699 result->m_width = run->m_width; 699 result->m_width = run->m_width;
700 result->m_numGlyphs = count; 700 result->m_numGlyphs = count;
701 ASSERT(result->m_numGlyphs == count); // no overflow 701 ASSERT(result->m_numGlyphs == count); // no overflow
702 result->m_hasVerticalOffsets = fontData->platformData().isVerticalAnyUpright (); 702 result->m_hasVerticalOffsets = fontData->platformData().isVerticalAnyUpright ();
703 result->m_runs.append(run.release()); 703 result->m_runs.append(std::move(run));
704 return result.release(); 704 return result.release();
705 } 705 }
706 706
707 707
708 } // namespace blink 708 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698