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

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

Issue 1420963008: Pull texture-backed bitmap resampler out of GrTextureParamsAdjuster code into its own class. (Closed) Base URL: https://skia.googlesource.com/skia.git@nomin
Patch Set: fix unused var warning 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/GrGpu.h ('k') | src/gpu/GrTextureParamsAdjuster.h » ('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 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 9
10 #include "GrGpu.h" 10 #include "GrGpu.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 , fContext(context) { 49 , fContext(context) {
50 } 50 }
51 51
52 GrGpu::~GrGpu() {} 52 GrGpu::~GrGpu() {}
53 53
54 void GrGpu::contextAbandoned() {} 54 void GrGpu::contextAbandoned() {}
55 55
56 //////////////////////////////////////////////////////////////////////////////// 56 ////////////////////////////////////////////////////////////////////////////////
57 57
58 bool GrGpu::makeCopyForTextureParams(int width, int height, const GrTextureParam s& textureParams, 58 bool GrGpu::makeCopyForTextureParams(int width, int height, const GrTextureParam s& textureParams,
59 GrTextureParamsAdjuster::CopyParams* copyPa rams) const { 59 GrTextureProducer::CopyParams* copyParams) const {
60 const GrCaps& caps = *this->caps(); 60 const GrCaps& caps = *this->caps();
61 if (textureParams.isTiled() && !caps.npotTextureTileSupport() && 61 if (textureParams.isTiled() && !caps.npotTextureTileSupport() &&
62 (!SkIsPow2(width) || !SkIsPow2(height))) { 62 (!SkIsPow2(width) || !SkIsPow2(height))) {
63 copyParams->fWidth = GrNextPow2(width); 63 copyParams->fWidth = GrNextPow2(width);
64 copyParams->fHeight = GrNextPow2(height); 64 copyParams->fHeight = GrNextPow2(height);
65 switch (textureParams.filterMode()) { 65 switch (textureParams.filterMode()) {
66 case GrTextureParams::kNone_FilterMode: 66 case GrTextureParams::kNone_FilterMode:
67 copyParams->fFilter = GrTextureParams::kNone_FilterMode; 67 copyParams->fFilter = GrTextureParams::kNone_FilterMode;
68 break; 68 break;
69 case GrTextureParams::kBilerp_FilterMode: 69 case GrTextureParams::kBilerp_FilterMode:
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 this->xferBarrier(args.fPipeline->getRenderTarget(), barrierType); 343 this->xferBarrier(args.fPipeline->getRenderTarget(), barrierType);
344 } 344 }
345 345
346 GrVertices::Iterator iter; 346 GrVertices::Iterator iter;
347 const GrNonInstancedVertices* verts = iter.init(vertices); 347 const GrNonInstancedVertices* verts = iter.init(vertices);
348 do { 348 do {
349 this->onDraw(args, *verts); 349 this->onDraw(args, *verts);
350 fStats.incNumDraws(); 350 fStats.incNumDraws();
351 } while ((verts = iter.next())); 351 } while ((verts = iter.next()));
352 } 352 }
OLDNEW
« no previous file with comments | « src/gpu/GrGpu.h ('k') | src/gpu/GrTextureParamsAdjuster.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698