| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 "gm.h" | 8 #include "gm.h" |
| 9 #if SK_SUPPORT_GPU | 9 #if SK_SUPPORT_GPU |
| 10 #include "GrContext.h" | 10 #include "GrContext.h" |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 SkAutoTUnref<GrDrawBatch> batch( | 117 SkAutoTUnref<GrDrawBatch> batch( |
| 118 GrRectBatchFactory::CreateNonAAFill(0xff0000
00, SkMatrix::I(), | 118 GrRectBatchFactory::CreateNonAAFill(0xff0000
00, SkMatrix::I(), |
| 119 bounds,
nullptr, nullptr)); | 119 bounds,
nullptr, nullptr)); |
| 120 drawContext->drawContextPriv().testingOnly_drawBatch
(grPaint, batch); | 120 drawContext->drawContextPriv().testingOnly_drawBatch
(grPaint, batch); |
| 121 } else { | 121 } else { |
| 122 drew = false; | 122 drew = false; |
| 123 } | 123 } |
| 124 #endif | 124 #endif |
| 125 } else if (kBW_Clip_Type == fType || kAA_Clip_Type == fType)
{ | 125 } else if (kBW_Clip_Type == fType || kAA_Clip_Type == fType)
{ |
| 126 bool aaClip = (kAA_Clip_Type == fType); | 126 bool aaClip = (kAA_Clip_Type == fType); |
| 127 canvas->clipRRect(fRRects[curRRect], SkCanvas::kReplace_
Op, aaClip); | 127 canvas->clipRRect(fRRects[curRRect], aaClip); |
| 128 canvas->drawRect(kMaxTileBound, paint); | 128 canvas->drawRect(kMaxTileBound, paint); |
| 129 } else { | 129 } else { |
| 130 canvas->drawRRect(fRRects[curRRect], paint); | 130 canvas->drawRRect(fRRects[curRRect], paint); |
| 131 } | 131 } |
| 132 canvas->restore(); | 132 canvas->restore(); |
| 133 if (drew) { | 133 if (drew) { |
| 134 x = x + kTileX; | 134 x = x + kTileX; |
| 135 if (x > kImageWidth) { | 135 if (x > kImageWidth) { |
| 136 x = 1; | 136 x = 1; |
| 137 y += kTileY; | 137 y += kTileY; |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 | 251 |
| 252 DEF_GM( return new RRectGM(RRectGM::kAA_Draw_Type); ) | 252 DEF_GM( return new RRectGM(RRectGM::kAA_Draw_Type); ) |
| 253 DEF_GM( return new RRectGM(RRectGM::kBW_Draw_Type); ) | 253 DEF_GM( return new RRectGM(RRectGM::kBW_Draw_Type); ) |
| 254 DEF_GM( return new RRectGM(RRectGM::kAA_Clip_Type); ) | 254 DEF_GM( return new RRectGM(RRectGM::kAA_Clip_Type); ) |
| 255 DEF_GM( return new RRectGM(RRectGM::kBW_Clip_Type); ) | 255 DEF_GM( return new RRectGM(RRectGM::kBW_Clip_Type); ) |
| 256 #if SK_SUPPORT_GPU | 256 #if SK_SUPPORT_GPU |
| 257 DEF_GM( return new RRectGM(RRectGM::kEffect_Type); ) | 257 DEF_GM( return new RRectGM(RRectGM::kEffect_Type); ) |
| 258 #endif | 258 #endif |
| 259 | 259 |
| 260 } | 260 } |
| OLD | NEW |