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

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

Issue 1897203002: Implement instanced rendering for simple shapes (Closed) Base URL: https://skia.googlesource.com/skia.git@upload2_requireHWAA
Patch Set: comments Created 4 years, 7 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/GrGLGpu.h ('k') | src/gpu/gl/GrGLInstancedRendering.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 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 #include "GrGLGpu.h" 8 #include "GrGLGpu.h"
9 #include "GrGLBuffer.h" 9 #include "GrGLBuffer.h"
10 #include "GrGLGLSL.h" 10 #include "GrGLGLSL.h"
11 #include "GrGLInstancedRendering.h"
11 #include "GrGLStencilAttachment.h" 12 #include "GrGLStencilAttachment.h"
12 #include "GrGLTextureRenderTarget.h" 13 #include "GrGLTextureRenderTarget.h"
13 #include "GrGpuResourcePriv.h" 14 #include "GrGpuResourcePriv.h"
14 #include "GrMesh.h" 15 #include "GrMesh.h"
15 #include "GrPipeline.h" 16 #include "GrPipeline.h"
16 #include "GrPLSGeometryProcessor.h" 17 #include "GrPLSGeometryProcessor.h"
17 #include "GrRenderTargetPriv.h" 18 #include "GrRenderTargetPriv.h"
18 #include "GrSurfacePriv.h" 19 #include "GrSurfacePriv.h"
19 #include "GrTexturePriv.h" 20 #include "GrTexturePriv.h"
20 #include "GrTypes.h" 21 #include "GrTypes.h"
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 fWireRectArrayBuffer.reset(); 449 fWireRectArrayBuffer.reset();
449 fPLSSetupProgram.fProgram = 0; 450 fPLSSetupProgram.fProgram = 0;
450 fPLSSetupProgram.fArrayBuffer.reset(); 451 fPLSSetupProgram.fArrayBuffer.reset();
451 if (this->glCaps().shaderCaps()->pathRenderingSupport()) { 452 if (this->glCaps().shaderCaps()->pathRenderingSupport()) {
452 this->glPathRendering()->disconnect(type); 453 this->glPathRendering()->disconnect(type);
453 } 454 }
454 } 455 }
455 456
456 /////////////////////////////////////////////////////////////////////////////// 457 ///////////////////////////////////////////////////////////////////////////////
457 458
459 GrInstancedRendering* GrGLGpu::createInstancedRenderingIfSupported() {
460 return GrGLInstancedRendering::CreateIfSupported(this);
461 }
462
458 void GrGLGpu::onResetContext(uint32_t resetBits) { 463 void GrGLGpu::onResetContext(uint32_t resetBits) {
459 // we don't use the zb at all 464 // we don't use the zb at all
460 if (resetBits & kMisc_GrGLBackendState) { 465 if (resetBits & kMisc_GrGLBackendState) {
461 GL_CALL(Disable(GR_GL_DEPTH_TEST)); 466 GL_CALL(Disable(GR_GL_DEPTH_TEST));
462 GL_CALL(DepthMask(GR_GL_FALSE)); 467 GL_CALL(DepthMask(GR_GL_FALSE));
463 468
464 fHWBufferState[kTexel_GrBufferType].invalidate(); 469 fHWBufferState[kTexel_GrBufferType].invalidate();
465 fHWBufferState[kDrawIndirect_GrBufferType].invalidate(); 470 fHWBufferState[kDrawIndirect_GrBufferType].invalidate();
466 fHWBufferState[kXferCpuToGpu_GrBufferType].invalidate(); 471 fHWBufferState[kXferCpuToGpu_GrBufferType].invalidate();
467 fHWBufferState[kXferGpuToCpu_GrBufferType].invalidate(); 472 fHWBufferState[kXferGpuToCpu_GrBufferType].invalidate();
(...skipping 3820 matching lines...) Expand 10 before | Expand all | Expand 10 after
4288 if (GR_GL_TEXTURE_EXTERNAL == glTexture->target() || 4293 if (GR_GL_TEXTURE_EXTERNAL == glTexture->target() ||
4289 GR_GL_TEXTURE_RECTANGLE == glTexture->target()) { 4294 GR_GL_TEXTURE_RECTANGLE == glTexture->target()) {
4290 copyParams->fFilter = GrTextureParams::kNone_FilterMode; 4295 copyParams->fFilter = GrTextureParams::kNone_FilterMode;
4291 copyParams->fWidth = texture->width(); 4296 copyParams->fWidth = texture->width();
4292 copyParams->fHeight = texture->height(); 4297 copyParams->fHeight = texture->height();
4293 return true; 4298 return true;
4294 } 4299 }
4295 } 4300 }
4296 return false; 4301 return false;
4297 } 4302 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLGpu.h ('k') | src/gpu/gl/GrGLInstancedRendering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698