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

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

Issue 824753002: Rename GrGpuGL -> GrGLGpu (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address nit Created 5 years, 12 months 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/GrGpuFactory.cpp ('k') | src/gpu/gl/GrGLBufferImpl.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 #include "GrDrawTargetCaps.h" 10 #include "GrDrawTargetCaps.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 case GrTextureParams::kBilerp_FilterMode: 95 case GrTextureParams::kBilerp_FilterMode:
96 case GrTextureParams::kMipMap_FilterMode: 96 case GrTextureParams::kMipMap_FilterMode:
97 flags |= kBilerp_TextureFlag; 97 flags |= kBilerp_TextureFlag;
98 break; 98 break;
99 } 99 }
100 } 100 }
101 } 101 }
102 return flags; 102 return flags;
103 } 103 }
104 104
105 // FIXME: This should be refactored with the code in gl/GrGpuGL.cpp. 105 // FIXME: This should be refactored with the code in gl/GrGLGpu.cpp.
106 GrSurfaceOrigin resolve_origin(const GrSurfaceDesc& desc) { 106 GrSurfaceOrigin resolve_origin(const GrSurfaceDesc& desc) {
107 // By default, GrRenderTargets are GL's normal orientation so that they 107 // By default, GrRenderTargets are GL's normal orientation so that they
108 // can be drawn to by the outside world without the client having 108 // can be drawn to by the outside world without the client having
109 // to render upside down. 109 // to render upside down.
110 bool renderTarget = 0 != (desc.fFlags & kRenderTarget_GrSurfaceFlag); 110 bool renderTarget = 0 != (desc.fFlags & kRenderTarget_GrSurfaceFlag);
111 if (kDefault_GrSurfaceOrigin == desc.fOrigin) { 111 if (kDefault_GrSurfaceOrigin == desc.fOrigin) {
112 return renderTarget ? kBottomLeft_GrSurfaceOrigin : kTopLeft_GrSurfaceOr igin; 112 return renderTarget ? kBottomLeft_GrSurfaceOrigin : kTopLeft_GrSurfaceOr igin;
113 } else { 113 } else {
114 return desc.fOrigin; 114 return desc.fOrigin;
115 } 115 }
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 return GrResourceKey(cacheID, ResourceType(), 0); 156 return GrResourceKey(cacheID, ResourceType(), 0);
157 } 157 }
158 158
159 bool GrTexturePriv::NeedsResizing(const GrResourceKey& key) { 159 bool GrTexturePriv::NeedsResizing(const GrResourceKey& key) {
160 return SkToBool(key.getResourceFlags() & kStretchToPOT_TextureFlag); 160 return SkToBool(key.getResourceFlags() & kStretchToPOT_TextureFlag);
161 } 161 }
162 162
163 bool GrTexturePriv::NeedsBilerp(const GrResourceKey& key) { 163 bool GrTexturePriv::NeedsBilerp(const GrResourceKey& key) {
164 return SkToBool(key.getResourceFlags() & kBilerp_TextureFlag); 164 return SkToBool(key.getResourceFlags() & kBilerp_TextureFlag);
165 } 165 }
OLDNEW
« no previous file with comments | « src/gpu/GrGpuFactory.cpp ('k') | src/gpu/gl/GrGLBufferImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698