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

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

Issue 2467593002: Move memoization of multisample specs id to GrRenderTarget (Closed)
Patch Set: Move memoization of multisample specs id to GrRenderTarget Created 4 years, 1 month 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/vk/GrVkGpu.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"
(...skipping 4456 matching lines...) Expand 10 before | Expand all | Expand 10 after
4467 GL_CALL(DrawArrays(GR_GL_TRIANGLE_STRIP, 0, 4)); 4467 GL_CALL(DrawArrays(GR_GL_TRIANGLE_STRIP, 0, 4));
4468 } 4468 }
4469 4469
4470 // Unbind: 4470 // Unbind:
4471 GL_CALL(FramebufferTexture2D(GR_GL_FRAMEBUFFER, GR_GL_COLOR_ATTACHMENT0, 4471 GL_CALL(FramebufferTexture2D(GR_GL_FRAMEBUFFER, GR_GL_COLOR_ATTACHMENT0,
4472 GR_GL_TEXTURE_2D, 0, 0)); 4472 GR_GL_TEXTURE_2D, 0, 0));
4473 4473
4474 return true; 4474 return true;
4475 } 4475 }
4476 4476
4477 void GrGLGpu::onGetMultisampleSpecs(GrRenderTarget* rt, const GrStencilSettings& stencil, 4477 void GrGLGpu::onQueryMultisampleSpecs(GrRenderTarget* rt, const GrStencilSetting s& stencil,
4478 int* effectiveSampleCnt, SamplePattern* samp lePattern) { 4478 int* effectiveSampleCnt, SamplePattern* sa mplePattern) {
4479 SkASSERT(!rt->isMixedSampled() || rt->renderTargetPriv().getStencilAttachmen t() || 4479 SkASSERT(!rt->isMixedSampled() || rt->renderTargetPriv().getStencilAttachmen t() ||
4480 stencil.isDisabled()); 4480 stencil.isDisabled());
4481 4481
4482 this->flushStencil(stencil); 4482 this->flushStencil(stencil);
4483 this->flushHWAAState(rt, true, !stencil.isDisabled()); 4483 this->flushHWAAState(rt, true, !stencil.isDisabled());
4484 this->flushRenderTarget(static_cast<GrGLRenderTarget*>(rt), &SkIRect::EmptyI Rect()); 4484 this->flushRenderTarget(static_cast<GrGLRenderTarget*>(rt), &SkIRect::EmptyI Rect());
4485 4485
4486 if (0 != this->caps()->maxRasterSamples()) { 4486 if (0 != this->caps()->maxRasterSamples()) {
4487 GR_GL_GetIntegerv(this->glInterface(), GR_GL_EFFECTIVE_RASTER_SAMPLES, e ffectiveSampleCnt); 4487 GR_GL_GetIntegerv(this->glInterface(), GR_GL_EFFECTIVE_RASTER_SAMPLES, e ffectiveSampleCnt);
4488 } else { 4488 } else {
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
4642 4642
4643 bool GrGLGpu::waitFence(GrFence fence, uint64_t timeout) const { 4643 bool GrGLGpu::waitFence(GrFence fence, uint64_t timeout) const {
4644 GrGLenum result; 4644 GrGLenum result;
4645 GL_CALL_RET(result, ClientWaitSync((GrGLsync)fence, GR_GL_SYNC_FLUSH_COMMAND S_BIT, timeout)); 4645 GL_CALL_RET(result, ClientWaitSync((GrGLsync)fence, GR_GL_SYNC_FLUSH_COMMAND S_BIT, timeout));
4646 return (GR_GL_CONDITION_SATISFIED == result); 4646 return (GR_GL_CONDITION_SATISFIED == result);
4647 } 4647 }
4648 4648
4649 void GrGLGpu::deleteFence(GrFence fence) const { 4649 void GrGLGpu::deleteFence(GrFence fence) const {
4650 GL_CALL(DeleteSync((GrGLsync)fence)); 4650 GL_CALL(DeleteSync((GrGLsync)fence));
4651 } 4651 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLGpu.h ('k') | src/gpu/vk/GrVkGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698