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

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

Issue 2306293002: Replaced PassRefPtr copies with moves in Source/platform. (Closed)
Patch Set: Created 4 years, 3 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 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 if (!face) { 340 if (!face) {
341 DLOG(ERROR) << "Could not create HarfBuzzFace from FontPlatformData."; 341 DLOG(ERROR) << "Could not create HarfBuzzFace from FontPlatformData.";
342 return false; 342 return false;
343 } 343 }
344 344
345 hb_buffer_set_language(harfBuzzBuffer, language); 345 hb_buffer_set_language(harfBuzzBuffer, language);
346 hb_buffer_set_script(harfBuzzBuffer, ICUScriptToHBScript(currentRunScript)); 346 hb_buffer_set_script(harfBuzzBuffer, ICUScriptToHBScript(currentRunScript));
347 hb_buffer_set_direction(harfBuzzBuffer, TextDirectionToHBDirection(m_textRun .direction(), 347 hb_buffer_set_direction(harfBuzzBuffer, TextDirectionToHBDirection(m_textRun .direction(),
348 m_font->getFontDescription().orientation(), currentFont)); 348 m_font->getFontDescription().orientation(), currentFont));
349 349
350 hb_font_t* hbFont = face->getScaledFont(currentFontRangeSet); 350 hb_font_t* hbFont = face->getScaledFont(std::move(currentFontRangeSet));
351 hb_shape(hbFont, harfBuzzBuffer, m_features.isEmpty() ? 0 : m_features.data( ), m_features.size()); 351 hb_shape(hbFont, harfBuzzBuffer, m_features.isEmpty() ? 0 : m_features.data( ), m_features.size());
352 352
353 return true; 353 return true;
354 } 354 }
355 355
356 bool HarfBuzzShaper::extractShapeResults(hb_buffer_t* harfBuzzBuffer, 356 bool HarfBuzzShaper::extractShapeResults(hb_buffer_t* harfBuzzBuffer,
357 ShapeResult* shapeResult, 357 ShapeResult* shapeResult,
358 bool& fontCycleQueued, const HolesQueueItem& currentQueueItem, 358 bool& fontCycleQueued, const HolesQueueItem& currentQueueItem,
359 const SimpleFontData* currentFont, 359 const SimpleFontData* currentFont,
360 UScriptCode currentRunScript, 360 UScriptCode currentRunScript,
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(std::move(run)); 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
« no previous file with comments | « third_party/WebKit/Source/platform/fonts/SimpleFontData.h ('k') | third_party/WebKit/Source/platform/graphics/BitmapImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698