| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2010 Google Inc. | 3 * Copyright 2010 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 #include "GrDrawTarget.h" | 9 #include "GrDrawTarget.h" |
| 10 | 10 |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 return; | 305 return; |
| 306 } | 306 } |
| 307 | 307 |
| 308 this->onDrawPaths(pathProc, pathRange, indices, indexType, transformValues, | 308 this->onDrawPaths(pathProc, pathRange, indices, indexType, transformValues, |
| 309 transformType, count, stencilSettings, pipelineInfo); | 309 transformType, count, stencilSettings, pipelineInfo); |
| 310 } | 310 } |
| 311 | 311 |
| 312 void GrDrawTarget::drawBWRect(const GrPipelineBuilder& pipelineBuilder, | 312 void GrDrawTarget::drawBWRect(const GrPipelineBuilder& pipelineBuilder, |
| 313 GrColor color, | 313 GrColor color, |
| 314 const SkMatrix& viewMatrix, | 314 const SkMatrix& viewMatrix, |
| 315 const SkRect& rect) { |
| 316 SkAutoTUnref<GrDrawBatch> batch(GrRectBatchFactory::CreateFillBW(color, viewM
atrix, rect, |
| 317 nullptr, nul
lptr)); |
| 318 this->drawBatch(pipelineBuilder, batch); |
| 319 } |
| 320 |
| 321 void GrDrawTarget::drawBWRect(const GrPipelineBuilder& pipelineBuilder, |
| 322 GrColor color, |
| 323 const SkMatrix& viewMatrix, |
| 315 const SkRect& rect, | 324 const SkRect& rect, |
| 316 const SkRect* localRect, | 325 const SkMatrix& localMatrix) { |
| 317 const SkMatrix* localMatrix) { | |
| 318 SkAutoTUnref<GrDrawBatch> batch(GrRectBatchFactory::CreateFillBW(color, viewM
atrix, rect, | 326 SkAutoTUnref<GrDrawBatch> batch(GrRectBatchFactory::CreateFillBW(color, viewM
atrix, rect, |
| 319 localRect, l
ocalMatrix)); | 327 nullptr, &lo
calMatrix)); |
| 320 this->drawBatch(pipelineBuilder, batch); | 328 this->drawBatch(pipelineBuilder, batch); |
| 321 } | 329 } |
| 322 | 330 |
| 331 void GrDrawTarget::drawBWRect(const GrPipelineBuilder& pipelineBuilder, |
| 332 GrColor color, |
| 333 const SkMatrix& viewMatrix, |
| 334 const SkRect& rect, |
| 335 const SkRect& localRect) { |
| 336 SkAutoTUnref<GrDrawBatch> batch(GrRectBatchFactory::CreateFillBW(color, viewM
atrix, rect, |
| 337 &localRect,
nullptr)); |
| 338 this->drawBatch(pipelineBuilder, batch); |
| 339 } |
| 340 |
| 341 |
| 323 void GrDrawTarget::drawAARect(const GrPipelineBuilder& pipelineBuilder, | 342 void GrDrawTarget::drawAARect(const GrPipelineBuilder& pipelineBuilder, |
| 324 GrColor color, | 343 GrColor color, |
| 325 const SkMatrix& viewMatrix, | 344 const SkMatrix& viewMatrix, |
| 326 const SkRect& rect, | 345 const SkRect& rect, |
| 327 const SkRect& devRect) { | 346 const SkRect& devRect) { |
| 328 SkAutoTUnref<GrDrawBatch> batch(GrRectBatchFactory::CreateFillAA(color, view
Matrix, rect, | 347 SkAutoTUnref<GrDrawBatch> batch(GrRectBatchFactory::CreateFillAA(color, view
Matrix, rect, |
| 329 devRect)); | 348 devRect)); |
| 330 this->drawBatch(pipelineBuilder, batch); | 349 this->drawBatch(pipelineBuilder, batch); |
| 331 } | 350 } |
| 332 | 351 |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 485 // The clip mask manager can rebuild all its clip masks so just | 504 // The clip mask manager can rebuild all its clip masks so just |
| 486 // get rid of them all. | 505 // get rid of them all. |
| 487 fClipMaskManager->purgeResources(); | 506 fClipMaskManager->purgeResources(); |
| 488 }; | 507 }; |
| 489 | 508 |
| 490 void GrClipTarget::clearStencilClip(const SkIRect& rect, bool insideClip, GrRend
erTarget* rt) { | 509 void GrClipTarget::clearStencilClip(const SkIRect& rect, bool insideClip, GrRend
erTarget* rt) { |
| 491 GrBatch* batch = SkNEW_ARGS(GrClearStencilClipBatch, (rect, insideClip, rt))
; | 510 GrBatch* batch = SkNEW_ARGS(GrClearStencilClipBatch, (rect, insideClip, rt))
; |
| 492 this->onDrawBatch(batch); | 511 this->onDrawBatch(batch); |
| 493 batch->unref(); | 512 batch->unref(); |
| 494 } | 513 } |
| OLD | NEW |