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

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

Issue 2038583002: Add GpuCommandBuffer support. (Closed) Base URL: https://skia.googlesource.com/skia.git@secondaryCB
Patch Set: Created 4 years, 6 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/GrGLGpuCommandBuffer.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 "GrGLGpuCommandBuffer.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 2595 matching lines...) Expand 10 before | Expand all | Expand 10 after
2616 if (!flipY) { 2617 if (!flipY) {
2617 dst += rowBytes; 2618 dst += rowBytes;
2618 } else { 2619 } else {
2619 dst -= rowBytes; 2620 dst -= rowBytes;
2620 } 2621 }
2621 } 2622 }
2622 } 2623 }
2623 return true; 2624 return true;
2624 } 2625 }
2625 2626
2627 GrGpuCommandBuffer* GrGLGpu::createCommandBuffer(const GrRenderTarget& target,
2628 GrGpuCommandBuffer::LoadAndStor eOp colorOp,
2629 GrColor colorClear,
2630 GrGpuCommandBuffer::LoadAndStor eOp stencilOp,
2631 GrColor stencilClear) {
2632 return new GrGLGpuCommandBuffer(this);
2633 }
2634
2626 void GrGLGpu::finishDrawTarget() { 2635 void GrGLGpu::finishDrawTarget() {
2627 if (fPLSHasBeenUsed) { 2636 if (fPLSHasBeenUsed) {
2628 /* There is an ARM driver bug where if we use PLS, and then draw a frame which does not 2637 /* There is an ARM driver bug where if we use PLS, and then draw a frame which does not
2629 * use PLS, it leaves garbage all over the place. As a workaround, we us e PLS in a 2638 * use PLS, it leaves garbage all over the place. As a workaround, we us e PLS in a
2630 * trivial way every frame. And since we use it every frame, there's nev er a point at which 2639 * trivial way every frame. And since we use it every frame, there's nev er a point at which
2631 * it becomes safe to stop using this workaround once we start. 2640 * it becomes safe to stop using this workaround once we start.
2632 */ 2641 */
2633 this->disableScissor(); 2642 this->disableScissor();
2634 // using PLS in the presence of MSAA results in GL_INVALID_OPERATION 2643 // using PLS in the presence of MSAA results in GL_INVALID_OPERATION
2635 this->flushHWAAState(nullptr, false, false); 2644 this->flushHWAAState(nullptr, false, false);
(...skipping 1994 matching lines...) Expand 10 before | Expand all | Expand 10 after
4630 if (GR_GL_TEXTURE_EXTERNAL == glTexture->target() || 4639 if (GR_GL_TEXTURE_EXTERNAL == glTexture->target() ||
4631 GR_GL_TEXTURE_RECTANGLE == glTexture->target()) { 4640 GR_GL_TEXTURE_RECTANGLE == glTexture->target()) {
4632 copyParams->fFilter = GrTextureParams::kNone_FilterMode; 4641 copyParams->fFilter = GrTextureParams::kNone_FilterMode;
4633 copyParams->fWidth = texture->width(); 4642 copyParams->fWidth = texture->width();
4634 copyParams->fHeight = texture->height(); 4643 copyParams->fHeight = texture->height();
4635 return true; 4644 return true;
4636 } 4645 }
4637 } 4646 }
4638 return false; 4647 return false;
4639 } 4648 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLGpu.h ('k') | src/gpu/gl/GrGLGpuCommandBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698