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

Side by Side Diff: third_party/WebKit/WebCore/platform/graphics/skia/PlatformContextSkia.cpp

Issue 17633: Push drawPath() call into PlatformContextSkia to avoid juggling two copies of... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « third_party/WebKit/WebCore/platform/graphics/skia/PlatformContextSkia.h ('k') | 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 (c) 2008, Google Inc. All rights reserved. 2 * Copyright (c) 2008, 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 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 void PlatformContextSkia::beginPath() 374 void PlatformContextSkia::beginPath()
375 { 375 {
376 m_path.reset(); 376 m_path.reset();
377 } 377 }
378 378
379 void PlatformContextSkia::addPath(const SkPath& path) 379 void PlatformContextSkia::addPath(const SkPath& path)
380 { 380 {
381 m_path.addPath(path, m_canvas->getTotalMatrix()); 381 m_path.addPath(path, m_canvas->getTotalMatrix());
382 } 382 }
383 383
384 SkPath PlatformContextSkia::currentPathInLocalCoordinates() const { 384 SkPath PlatformContextSkia::currentPath() const {
385 SkPath local_path = m_path; 385 SkPath local_path = m_path;
386 const SkMatrix& matrix = m_canvas->getTotalMatrix(); 386 const SkMatrix& matrix = m_canvas->getTotalMatrix();
387 SkMatrix inverse_matrix; 387 SkMatrix inverse_matrix;
388 matrix.invert(&inverse_matrix); 388 matrix.invert(&inverse_matrix);
389 local_path.transform(inverse_matrix); 389 local_path.transform(inverse_matrix);
390 return local_path; 390 return local_path;
391 } 391 }
392 392
393 void PlatformContextSkia::setFillRule(SkPath::FillType fr) 393 void PlatformContextSkia::setFillRule(SkPath::FillType fr)
394 { 394 {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 427
428 const SkBitmap* PlatformContextSkia::bitmap() const 428 const SkBitmap* PlatformContextSkia::bitmap() const
429 { 429 {
430 return &m_canvas->getDevice()->accessBitmap(false); 430 return &m_canvas->getDevice()->accessBitmap(false);
431 } 431 }
432 432
433 bool PlatformContextSkia::isPrinting() 433 bool PlatformContextSkia::isPrinting()
434 { 434 {
435 return m_canvas->getTopPlatformDevice().IsVectorial(); 435 return m_canvas->getTopPlatformDevice().IsVectorial();
436 } 436 }
OLDNEW
« no previous file with comments | « third_party/WebKit/WebCore/platform/graphics/skia/PlatformContextSkia.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698