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

Side by Side Diff: Source/platform/graphics/LoggingCanvas.cpp

Issue 454993002: preemptive add new virtual for onDrawPicture (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: don't add OVERRIDE for cross-module subclassing Created 6 years, 4 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 | « Source/platform/graphics/LoggingCanvas.h ('k') | Source/platform/graphics/ProfilingCanvas.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 (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 this->SkCanvas::onClipRegion(region, op); 348 this->SkCanvas::onClipRegion(region, op);
349 } 349 }
350 350
351 void LoggingCanvas::onDrawPicture(const SkPicture* picture) 351 void LoggingCanvas::onDrawPicture(const SkPicture* picture)
352 { 352 {
353 AutoLogger logger(this); 353 AutoLogger logger(this);
354 logger.logItemWithParams("drawPicture")->setObject("picture", objectForSkPic ture(*picture)); 354 logger.logItemWithParams("drawPicture")->setObject("picture", objectForSkPic ture(*picture));
355 this->SkCanvas::onDrawPicture(picture); 355 this->SkCanvas::onDrawPicture(picture);
356 } 356 }
357 357
358 void LoggingCanvas::onDrawPicture(const SkPicture* picture, const SkMatrix* matr ix, const SkPaint* paint)
359 {
360 AutoLogger logger(this);
361 logger.logItemWithParams("drawPicture")->setObject("picture", objectForSkPic ture(*picture));
362 this->SkCanvas::onDrawPicture(picture, matrix, paint);
363 }
364
358 void LoggingCanvas::didSetMatrix(const SkMatrix& matrix) 365 void LoggingCanvas::didSetMatrix(const SkMatrix& matrix)
359 { 366 {
360 AutoLogger logger(this); 367 AutoLogger logger(this);
361 RefPtr<JSONObject> params = logger.logItemWithParams("setMatrix"); 368 RefPtr<JSONObject> params = logger.logItemWithParams("setMatrix");
362 params->setArray("matrix", arrayForSkMatrix(matrix)); 369 params->setArray("matrix", arrayForSkMatrix(matrix));
363 this->SkCanvas::didSetMatrix(matrix); 370 this->SkCanvas::didSetMatrix(matrix);
364 } 371 }
365 372
366 void LoggingCanvas::didConcat(const SkMatrix& matrix) 373 void LoggingCanvas::didConcat(const SkMatrix& matrix)
367 { 374 {
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
879 SkUnichar* textData = dataVector.data(); 886 SkUnichar* textData = dataVector.data();
880 paint.glyphsToUnichars(static_cast<const uint16_t*>(text), byteLength / 2, textData); 887 paint.glyphsToUnichars(static_cast<const uint16_t*>(text), byteLength / 2, textData);
881 return WTF::UTF32LittleEndianEncoding().decode(reinterpret_cast<const ch ar*>(textData), byteLength * 2); 888 return WTF::UTF32LittleEndianEncoding().decode(reinterpret_cast<const ch ar*>(textData), byteLength * 2);
882 } 889 }
883 default: 890 default:
884 ASSERT_NOT_REACHED(); 891 ASSERT_NOT_REACHED();
885 return "?"; 892 return "?";
886 } 893 }
887 } 894 }
888 } 895 }
OLDNEW
« no previous file with comments | « Source/platform/graphics/LoggingCanvas.h ('k') | Source/platform/graphics/ProfilingCanvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698