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

Side by Side Diff: src/gpu/GrTextContext.cpp

Issue 144283002: Add factory class for generating various flavors of GrTextContext. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add placement delete for ManagedTextContext Created 6 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
« no previous file with comments | « src/gpu/GrDistanceFieldTextContext.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('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 2010 Google Inc. 2 * Copyright 2010 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 8
9 #include "GrTextContext.h" 9 #include "GrTextContext.h"
10 10
11 GrTextContext::GrTextContext(GrContext* context, const GrPaint& paint) : fPaint( paint) { 11 GrTextContext::GrTextContext(GrContext* context, const GrPaint& paint,
12 const SkPaint& skPaint) : fPaint(paint), fSkPaint(s kPaint) {
12 fContext = context; 13 fContext = context;
13 14
14 const GrClipData* clipData = context->getClip(); 15 const GrClipData* clipData = context->getClip();
15 16
16 SkRect devConservativeBound; 17 SkRect devConservativeBound;
17 clipData->fClipStack->getConservativeBounds( 18 clipData->fClipStack->getConservativeBounds(
18 -clipData->fOrigin.fX, 19 -clipData->fOrigin.fX,
19 -clipData->fOrigin.fY, 20 -clipData->fOrigin.fY,
20 context->getRenderTarget()->width(), 21 context->getRenderTarget()->width(),
21 context->getRenderTarget()->height(), 22 context->getRenderTarget()->height(),
22 &devConservativeBound); 23 &devConservativeBound);
23 24
24 devConservativeBound.roundOut(&fClipRect); 25 devConservativeBound.roundOut(&fClipRect);
25 26
26 fDrawTarget = fContext->getTextTarget(); 27 fDrawTarget = fContext->getTextTarget();
27 } 28 }
OLDNEW
« no previous file with comments | « src/gpu/GrDistanceFieldTextContext.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698