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/SkGpuDevice.cpp

Issue 933483002: add Method param to drawTextOnPath, supporting SVG spec Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add guard for android 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
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 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 "SkGpuDevice.h" 8 #include "SkGpuDevice.h"
9 9
10 #include "effects/GrBicubicEffect.h" 10 #include "effects/GrBicubicEffect.h"
(...skipping 1760 matching lines...) Expand 10 before | Expand all | Expand 10 after
1771 1771
1772 if (!fTextContext->drawPosText(grPaint, paint, *draw.fMatrix, (const char *) text, byteLength, 1772 if (!fTextContext->drawPosText(grPaint, paint, *draw.fMatrix, (const char *) text, byteLength,
1773 pos, scalarsPerPos, offset)) { 1773 pos, scalarsPerPos, offset)) {
1774 // this will just call our drawPath() 1774 // this will just call our drawPath()
1775 draw.drawPosText_asPaths((const char*)text, byteLength, pos, scalarsPerP os, offset, paint); 1775 draw.drawPosText_asPaths((const char*)text, byteLength, pos, scalarsPerP os, offset, paint);
1776 } 1776 }
1777 } 1777 }
1778 1778
1779 void SkGpuDevice::drawTextOnPath(const SkDraw& draw, const void* text, 1779 void SkGpuDevice::drawTextOnPath(const SkDraw& draw, const void* text,
1780 size_t len, const SkPath& path, 1780 size_t len, const SkPath& path,
1781 const SkMatrix* m, const SkPaint& paint) { 1781 const SkMatrix* m,
1782 SK_SUPPORT_LEGACY_DRAWTEXTONPATH_PARAM const Sk Paint& paint) {
1782 CHECK_SHOULD_DRAW(draw); 1783 CHECK_SHOULD_DRAW(draw);
1783 1784
1785 SK_SUPPORT_LEGACY_DRAWTEXTONPATH_DEFAULT_METHOD
1784 SkASSERT(draw.fDevice == this); 1786 SkASSERT(draw.fDevice == this);
1785 draw.drawTextOnPath((const char*)text, len, path, m, paint); 1787 draw.drawTextOnPath((const char*)text, len, path, m, method, paint);
1786 } 1788 }
1787 1789
1788 /////////////////////////////////////////////////////////////////////////////// 1790 ///////////////////////////////////////////////////////////////////////////////
1789 1791
1790 bool SkGpuDevice::onShouldDisableLCD(const SkPaint& paint) const { 1792 bool SkGpuDevice::onShouldDisableLCD(const SkPaint& paint) const {
1791 if (paint.getShader() || 1793 if (paint.getShader() ||
1792 !SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrcOver_Mode) || 1794 !SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrcOver_Mode) ||
1793 paint.getMaskFilter() || 1795 paint.getMaskFilter() ||
1794 paint.getRasterizer() || 1796 paint.getRasterizer() ||
1795 paint.getColorFilter() || 1797 paint.getColorFilter() ||
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
1904 #endif 1906 #endif
1905 } 1907 }
1906 1908
1907 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() { 1909 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() {
1908 // We always return a transient cache, so it is freed after each 1910 // We always return a transient cache, so it is freed after each
1909 // filter traversal. 1911 // filter traversal.
1910 return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize); 1912 return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize);
1911 } 1913 }
1912 1914
1913 #endif 1915 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698