| OLD | NEW | 
|     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 "GrBitmapTextContext.h" |    10 #include "GrBitmapTextContext.h" | 
| (...skipping 1827 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1838     GrPaint grPaint; |  1838     GrPaint grPaint; | 
|  1839     SkPaint2GrPaintShader(this->context(), fRenderTarget, paint, *draw.fMatrix, 
      true, &grPaint); |  1839     SkPaint2GrPaintShader(this->context(), fRenderTarget, paint, *draw.fMatrix, 
      true, &grPaint); | 
|  1840  |  1840  | 
|  1841     SkDEBUGCODE(this->validate();) |  1841     SkDEBUGCODE(this->validate();) | 
|  1842  |  1842  | 
|  1843     fTextContext->drawPosText(fRenderTarget, fClip, grPaint, paint, *draw.fMatri
      x, |  1843     fTextContext->drawPosText(fRenderTarget, fClip, grPaint, paint, *draw.fMatri
      x, | 
|  1844                               (const char *)text, byteLength, pos, scalarsPerPos
      , offset, |  1844                               (const char *)text, byteLength, pos, scalarsPerPos
      , offset, | 
|  1845                               draw.fClip->getBounds()); |  1845                               draw.fClip->getBounds()); | 
|  1846 } |  1846 } | 
|  1847  |  1847  | 
 |  1848 void SkGpuDevice::drawTextBlob(const SkDraw& draw, const SkTextBlob* blob, SkSca
      lar x, SkScalar y, | 
 |  1849                                const SkPaint& paint, SkDrawFilter* drawFilter) { | 
 |  1850     GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice::drawTextBlob", fContext); | 
 |  1851     CHECK_SHOULD_DRAW(draw); | 
 |  1852  | 
 |  1853     SkDEBUGCODE(this->validate();) | 
 |  1854  | 
 |  1855     fTextContext->drawTextBlob(fRenderTarget, fClip, paint, *draw.fMatrix, blob,
       x, y, drawFilter, | 
 |  1856                                draw.fClip->getBounds()); | 
 |  1857 } | 
 |  1858  | 
|  1848 /////////////////////////////////////////////////////////////////////////////// |  1859 /////////////////////////////////////////////////////////////////////////////// | 
|  1849  |  1860  | 
|  1850 bool SkGpuDevice::onShouldDisableLCD(const SkPaint& paint) const { |  1861 bool SkGpuDevice::onShouldDisableLCD(const SkPaint& paint) const { | 
|  1851     if (paint.getShader() || |  1862     if (paint.getShader() || | 
|  1852         !SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrcOver_Mode) || |  1863         !SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrcOver_Mode) || | 
|  1853         paint.getMaskFilter() || |  1864         paint.getMaskFilter() || | 
|  1854         paint.getRasterizer() || |  1865         paint.getRasterizer() || | 
|  1855         paint.getColorFilter() || |  1866         paint.getColorFilter() || | 
|  1856         paint.getPathEffect() || |  1867         paint.getPathEffect() || | 
|  1857         paint.isFakeBoldText() || |  1868         paint.isFakeBoldText() || | 
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1972 #endif |  1983 #endif | 
|  1973 } |  1984 } | 
|  1974  |  1985  | 
|  1975 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() { |  1986 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() { | 
|  1976     // We always return a transient cache, so it is freed after each |  1987     // We always return a transient cache, so it is freed after each | 
|  1977     // filter traversal. |  1988     // filter traversal. | 
|  1978     return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize); |  1989     return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize); | 
|  1979 } |  1990 } | 
|  1980  |  1991  | 
|  1981 #endif |  1992 #endif | 
| OLD | NEW |