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

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

Issue 1782583002: Add support for vertex and geometry shader textures (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: better rebase Created 4 years, 9 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/GrTexture.cpp ('k') | src/gpu/gl/GrGLCaps.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 * Copyright 2012 Google Inc. 2 * Copyright 2012 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 "GrTextureAccess.h" 8 #include "GrTextureAccess.h"
9 #include "GrColor.h" 9 #include "GrColor.h"
10 #include "GrTexture.h" 10 #include "GrTexture.h"
11 11
12 GrTextureAccess::GrTextureAccess() {} 12 GrTextureAccess::GrTextureAccess() {}
13 13
14 GrTextureAccess::GrTextureAccess(GrTexture* texture, const GrTextureParams& para ms) { 14 GrTextureAccess::GrTextureAccess(GrTexture* texture, const GrTextureParams& para ms) {
15 this->reset(texture, params); 15 this->reset(texture, params);
16 } 16 }
17 17
18 GrTextureAccess::GrTextureAccess(GrTexture* texture, 18 GrTextureAccess::GrTextureAccess(GrTexture* texture,
19 GrTextureParams::FilterMode filterMode, 19 GrTextureParams::FilterMode filterMode,
20 SkShader::TileMode tileXAndY) { 20 SkShader::TileMode tileXAndY,
21 this->reset(texture, filterMode, tileXAndY); 21 GrShaderFlags visibility) {
22 this->reset(texture, filterMode, tileXAndY, visibility);
22 } 23 }
23 24
24
25 void GrTextureAccess::reset(GrTexture* texture, 25 void GrTextureAccess::reset(GrTexture* texture,
26 const GrTextureParams& params) { 26 const GrTextureParams& params,
27 GrShaderFlags visibility) {
27 SkASSERT(texture); 28 SkASSERT(texture);
28 fTexture.set(SkRef(texture), kRead_GrIOType); 29 fTexture.set(SkRef(texture), kRead_GrIOType);
29 fParams = params; 30 fParams = params;
31 fVisibility = visibility;
30 } 32 }
31 33
32 void GrTextureAccess::reset(GrTexture* texture, 34 void GrTextureAccess::reset(GrTexture* texture,
33 GrTextureParams::FilterMode filterMode, 35 GrTextureParams::FilterMode filterMode,
34 SkShader::TileMode tileXAndY) { 36 SkShader::TileMode tileXAndY,
37 GrShaderFlags visibility) {
35 SkASSERT(texture); 38 SkASSERT(texture);
36 fTexture.set(SkRef(texture), kRead_GrIOType); 39 fTexture.set(SkRef(texture), kRead_GrIOType);
37 fParams.reset(tileXAndY, filterMode); 40 fParams.reset(tileXAndY, filterMode);
41 fVisibility = visibility;
38 } 42 }
OLDNEW
« no previous file with comments | « src/gpu/GrTexture.cpp ('k') | src/gpu/gl/GrGLCaps.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698