зеркало из https://github.com/mozilla/moz-skia.git
Make the text context not have to save / restore GrDrawState at each draw.
Reivew URL: http://codereview.appspot.com/5844049/ git-svn-id: http://skia.googlecode.com/svn/trunk@3422 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
Родитель
f32a9b60ff
Коммит
26936d071f
|
@ -1916,6 +1916,11 @@ void GrContext::setPaint(const GrPaint& paint, GrDrawTarget* target) {
|
|||
*drawState->sampler(s) = paint.getMaskSampler(i);
|
||||
}
|
||||
}
|
||||
|
||||
// disable all stages not accessible via the paint
|
||||
for (int s = GrPaint::kTotalStages; s < GrDrawState::kNumStages; ++s) {
|
||||
drawState->setTexture(s, NULL);
|
||||
}
|
||||
|
||||
drawState->setColor(paint.fColor);
|
||||
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
void GrDefaultTextContext::flushGlyphs() {
|
||||
GrAssert(this->isValid());
|
||||
if (fCurrVertex > 0) {
|
||||
GrDrawTarget::AutoStateRestore asr(fDrawTarget);
|
||||
GrDrawState* drawState = fDrawTarget->drawState();
|
||||
// setup our sampler state for our text texture/atlas
|
||||
GrSamplerState::Filter filter;
|
||||
|
|
|
@ -35,7 +35,6 @@ private:
|
|||
GrGpuTextVertex* fVertices;
|
||||
GrIRect fClipRect;
|
||||
|
||||
GrFontScaler* fScaler;
|
||||
GrTextStrike* fStrike;
|
||||
|
||||
GrMatrix fExtMatrix;
|
||||
|
|
Загрузка…
Ссылка в новой задаче