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

Side by Side Diff: src/gpu/batches/GrTessellatingPathRenderer.cpp

Issue 1486923004: Retract GrRenderTarget a bit (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years 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/batches/GrAAHairLinePathRenderer.cpp ('k') | tests/ClipBoundsTest.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 2015 Google Inc. 2 * Copyright 2015 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 "GrTessellatingPathRenderer.h" 8 #include "GrTessellatingPathRenderer.h"
9 9
10 #include "GrBatchFlushState.h" 10 #include "GrBatchFlushState.h"
(...skipping 1616 matching lines...) Expand 10 before | Expand all | Expand 10 after
1627 }; 1627 };
1628 1628
1629 bool GrTessellatingPathRenderer::onDrawPath(const DrawPathArgs& args) { 1629 bool GrTessellatingPathRenderer::onDrawPath(const DrawPathArgs& args) {
1630 SkASSERT(!args.fAntiAlias); 1630 SkASSERT(!args.fAntiAlias);
1631 const GrRenderTarget* rt = args.fPipelineBuilder->getRenderTarget(); 1631 const GrRenderTarget* rt = args.fPipelineBuilder->getRenderTarget();
1632 if (nullptr == rt) { 1632 if (nullptr == rt) {
1633 return false; 1633 return false;
1634 } 1634 }
1635 1635
1636 SkIRect clipBoundsI; 1636 SkIRect clipBoundsI;
1637 args.fPipelineBuilder->clip().getConservativeBounds(rt, &clipBoundsI); 1637 args.fPipelineBuilder->clip().getConservativeBounds(rt->width(), rt->height( ), &clipBoundsI);
1638 SkRect clipBounds = SkRect::Make(clipBoundsI); 1638 SkRect clipBounds = SkRect::Make(clipBoundsI);
1639 SkMatrix vmi; 1639 SkMatrix vmi;
1640 if (!args.fViewMatrix->invert(&vmi)) { 1640 if (!args.fViewMatrix->invert(&vmi)) {
1641 return false; 1641 return false;
1642 } 1642 }
1643 vmi.mapRect(&clipBounds); 1643 vmi.mapRect(&clipBounds);
1644 SkAutoTUnref<GrDrawBatch> batch(TessellatingPathBatch::Create(args.fColor, * args.fPath, 1644 SkAutoTUnref<GrDrawBatch> batch(TessellatingPathBatch::Create(args.fColor, * args.fPath,
1645 *args.fStroke, *args.fViewMatrix, 1645 *args.fStroke, *args.fViewMatrix,
1646 clipBounds)); 1646 clipBounds));
1647 args.fTarget->drawBatch(*args.fPipelineBuilder, batch); 1647 args.fTarget->drawBatch(*args.fPipelineBuilder, batch);
(...skipping 14 matching lines...) Expand all
1662 bool result = viewMatrix.invert(&vmi); 1662 bool result = viewMatrix.invert(&vmi);
1663 if (!result) { 1663 if (!result) {
1664 SkFAIL("Cannot invert matrix\n"); 1664 SkFAIL("Cannot invert matrix\n");
1665 } 1665 }
1666 vmi.mapRect(&clipBounds); 1666 vmi.mapRect(&clipBounds);
1667 GrStrokeInfo strokeInfo = GrTest::TestStrokeInfo(random); 1667 GrStrokeInfo strokeInfo = GrTest::TestStrokeInfo(random);
1668 return TessellatingPathBatch::Create(color, path, strokeInfo, viewMatrix, cl ipBounds); 1668 return TessellatingPathBatch::Create(color, path, strokeInfo, viewMatrix, cl ipBounds);
1669 } 1669 }
1670 1670
1671 #endif 1671 #endif
OLDNEW
« no previous file with comments | « src/gpu/batches/GrAAHairLinePathRenderer.cpp ('k') | tests/ClipBoundsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698