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

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

Issue 812063002: Change to create device coord coordset (Closed) Base URL: https://skia.googlesource.com/skia.git@vm-off-context
Patch Set: ignoring bleed Created 6 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/effects/SkMorphologyImageFilter.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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 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 "GrContext.h" 9 #include "GrContext.h"
10 10
(...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after
788 vertex[4].set(rect.fLeft, rect.fTop); 788 vertex[4].set(rect.fLeft, rect.fTop);
789 } 789 }
790 790
791 target->drawNonIndexed(&drawState, gp, primType, 0, vertCount); 791 target->drawNonIndexed(&drawState, gp, primType, 0, vertCount);
792 } else { 792 } else {
793 // filled BW rect 793 // filled BW rect
794 target->drawSimpleRect(&drawState, color, rect); 794 target->drawSimpleRect(&drawState, color, rect);
795 } 795 }
796 } 796 }
797 797
798 void GrContext::drawRectToRect(const GrPaint& paint, 798 void GrContext::drawNonAARectToRect(const GrPaint& paint,
799 const SkMatrix& viewMatrix, 799 const SkMatrix& viewMatrix,
800 const SkRect& dstRect, 800 const SkRect& rectToDraw,
801 const SkRect& localRect) { 801 const SkRect& localRect,
802 const SkMatrix* localMatrix) {
802 AutoCheckFlush acf(this); 803 AutoCheckFlush acf(this);
803 GrDrawState drawState; 804 GrDrawState drawState;
804 GrDrawTarget* target = this->prepareToDraw(&drawState, &paint, &viewMatrix, &acf); 805 GrDrawTarget* target = this->prepareToDraw(&drawState, &paint, &viewMatrix, &acf);
805 if (NULL == target) { 806 if (NULL == target) {
806 return; 807 return;
807 } 808 }
808 809
809 GR_CREATE_TRACE_MARKER("GrContext::drawRectToRect", target); 810 GR_CREATE_TRACE_MARKER("GrContext::drawRectToRect", target);
810 811
811 target->drawRect(&drawState, paint.getColor(), dstRect, &localRect, NULL); 812 target->drawRect(&drawState, paint.getColor(), rectToDraw, &localRect, local Matrix);
812 } 813 }
813 814
814 static const GrGeometryProcessor* set_vertex_attributes(const SkPoint* texCoords , 815 static const GrGeometryProcessor* set_vertex_attributes(const SkPoint* texCoords ,
815 const GrColor* colors, 816 const GrColor* colors,
816 int* colorOffset, 817 int* colorOffset,
817 int* texOffset, 818 int* texOffset,
818 GrColor color) { 819 GrColor color) {
819 *texOffset = -1; 820 *texOffset = -1;
820 *colorOffset = -1; 821 *colorOffset = -1;
821 uint32_t flags = GrDefaultGeoProcFactory::kPosition_GPType; 822 uint32_t flags = GrDefaultGeoProcFactory::kPosition_GPType;
(...skipping 913 matching lines...) Expand 10 before | Expand all | Expand 10 after
1735 fResourceCache2->printStats(); 1736 fResourceCache2->printStats();
1736 } 1737 }
1737 #endif 1738 #endif
1738 1739
1739 #if GR_GPU_STATS 1740 #if GR_GPU_STATS
1740 const GrContext::GPUStats* GrContext::gpuStats() const { 1741 const GrContext::GPUStats* GrContext::gpuStats() const {
1741 return fGpu->gpuStats(); 1742 return fGpu->gpuStats();
1742 } 1743 }
1743 #endif 1744 #endif
1744 1745
OLDNEW
« no previous file with comments | « src/effects/SkMorphologyImageFilter.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698