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

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

Issue 1409753008: Rename non-aa rect methods on GrDrawContext in anticipation of making them support aa (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: cleanup Created 5 years, 1 month 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/GrDrawContext.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 * 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 "GrTextureParamsAdjuster.h" 8 #include "GrTextureParamsAdjuster.h"
9 9
10 #include "GrCaps.h" 10 #include "GrCaps.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 } else { 107 } else {
108 localRect = SkRect::MakeWH(1.f, 1.f); 108 localRect = SkRect::MakeWH(1.f, 1.f);
109 } 109 }
110 110
111 SkAutoTUnref<GrDrawContext> drawContext(context->drawContext(copy->asRenderT arget())); 111 SkAutoTUnref<GrDrawContext> drawContext(context->drawContext(copy->asRenderT arget()));
112 if (!drawContext) { 112 if (!drawContext) {
113 return nullptr; 113 return nullptr;
114 } 114 }
115 115
116 SkRect dstRect = SkRect::MakeWH(SkIntToScalar(rtDesc.fWidth), SkIntToScalar( rtDesc.fHeight)); 116 SkRect dstRect = SkRect::MakeWH(SkIntToScalar(rtDesc.fWidth), SkIntToScalar( rtDesc.fHeight));
117 drawContext->drawNonAARectToRect(GrClip::WideOpen(), paint, SkMatrix::I(), d stRect, localRect); 117 drawContext->fillRectToRect(GrClip::WideOpen(), paint, SkMatrix::I(), dstRec t, localRect);
118 return copy.detach(); 118 return copy.detach();
119 } 119 }
120 120
121 GrTextureAdjuster::GrTextureAdjuster(GrTexture* original, const SkIRect& content Area) 121 GrTextureAdjuster::GrTextureAdjuster(GrTexture* original, const SkIRect& content Area)
122 : fOriginal(original) { 122 : fOriginal(original) {
123 if (contentArea.fLeft > 0 || contentArea.fTop > 0 || 123 if (contentArea.fLeft > 0 || contentArea.fTop > 0 ||
124 contentArea.fRight < original->width() || contentArea.fBottom < original ->height()) { 124 contentArea.fRight < original->width() || contentArea.fBottom < original ->height()) {
125 fContentArea.set(contentArea); 125 fContentArea.set(contentArea);
126 } 126 }
127 } 127 }
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 return result; 200 return result;
201 } 201 }
202 202
203 GrTexture* GrTextureMaker::generateTextureForParams(GrContext* ctx, const CopyPa rams& copyParams) { 203 GrTexture* GrTextureMaker::generateTextureForParams(GrContext* ctx, const CopyPa rams& copyParams) {
204 SkAutoTUnref<GrTexture> original(this->refOriginalTexture(ctx)); 204 SkAutoTUnref<GrTexture> original(this->refOriginalTexture(ctx));
205 if (!original) { 205 if (!original) {
206 return nullptr; 206 return nullptr;
207 } 207 }
208 return copy_on_gpu(original, nullptr, copyParams); 208 return copy_on_gpu(original, nullptr, copyParams);
209 } 209 }
OLDNEW
« no previous file with comments | « src/gpu/GrDrawContext.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698