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

Side by Side Diff: src/gpu/gl/GrGpuGL.cpp

Issue 597323002: Split GrDrawState and GrOptDrawState into separate classes and remove base class. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: More nits Created 6 years, 2 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/gl/GrGpuGL.h ('k') | no next file » | 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 2011 Google Inc. 2 * Copyright 2011 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 8
9 #include "GrGpuGL.h" 9 #include "GrGpuGL.h"
10 #include "GrGLStencilBuffer.h" 10 #include "GrGLStencilBuffer.h"
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 bool GrGpuGL::fullReadPixelsIsFasterThanPartial() const { 232 bool GrGpuGL::fullReadPixelsIsFasterThanPartial() const {
233 return SkToBool(GR_GL_FULL_READPIXELS_FASTER_THAN_PARTIAL); 233 return SkToBool(GR_GL_FULL_READPIXELS_FASTER_THAN_PARTIAL);
234 } 234 }
235 235
236 void GrGpuGL::onResetContext(uint32_t resetBits) { 236 void GrGpuGL::onResetContext(uint32_t resetBits) {
237 // we don't use the zb at all 237 // we don't use the zb at all
238 if (resetBits & kMisc_GrGLBackendState) { 238 if (resetBits & kMisc_GrGLBackendState) {
239 GL_CALL(Disable(GR_GL_DEPTH_TEST)); 239 GL_CALL(Disable(GR_GL_DEPTH_TEST));
240 GL_CALL(DepthMask(GR_GL_FALSE)); 240 GL_CALL(DepthMask(GR_GL_FALSE));
241 241
242 fHWDrawFace = GrDrawState::kInvalid_DrawFace; 242 fHWDrawFace = GrOptDrawState::kInvalid_DrawFace;
243 fHWDitherEnabled = kUnknown_TriState; 243 fHWDitherEnabled = kUnknown_TriState;
244 244
245 if (kGL_GrGLStandard == this->glStandard()) { 245 if (kGL_GrGLStandard == this->glStandard()) {
246 // Desktop-only state that we never change 246 // Desktop-only state that we never change
247 if (!this->glCaps().isCoreProfile()) { 247 if (!this->glCaps().isCoreProfile()) {
248 GL_CALL(Disable(GR_GL_POINT_SMOOTH)); 248 GL_CALL(Disable(GR_GL_POINT_SMOOTH));
249 GL_CALL(Disable(GR_GL_LINE_SMOOTH)); 249 GL_CALL(Disable(GR_GL_LINE_SMOOTH));
250 GL_CALL(Disable(GR_GL_POLYGON_SMOOTH)); 250 GL_CALL(Disable(GR_GL_POLYGON_SMOOTH));
251 GL_CALL(Disable(GR_GL_POLYGON_STIPPLE)); 251 GL_CALL(Disable(GR_GL_POLYGON_STIPPLE));
252 GL_CALL(Disable(GR_GL_COLOR_LOGIC_OP)); 252 GL_CALL(Disable(GR_GL_COLOR_LOGIC_OP));
(...skipping 2346 matching lines...) Expand 10 before | Expand all | Expand 10 after
2599 this->setVertexArrayID(gpu, 0); 2599 this->setVertexArrayID(gpu, 0);
2600 } 2600 }
2601 int attrCount = gpu->glCaps().maxVertexAttributes(); 2601 int attrCount = gpu->glCaps().maxVertexAttributes();
2602 if (fDefaultVertexArrayAttribState.count() != attrCount) { 2602 if (fDefaultVertexArrayAttribState.count() != attrCount) {
2603 fDefaultVertexArrayAttribState.resize(attrCount); 2603 fDefaultVertexArrayAttribState.resize(attrCount);
2604 } 2604 }
2605 attribState = &fDefaultVertexArrayAttribState; 2605 attribState = &fDefaultVertexArrayAttribState;
2606 } 2606 }
2607 return attribState; 2607 return attribState;
2608 } 2608 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGpuGL.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698