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

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

Issue 2384463003: Add fence support for TransferBuffers (Closed)
Patch Set: Add test code Created 4 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/GrGLGpu.h ('k') | src/gpu/gl/GrGLInterface.cpp » ('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 4676 matching lines...) Expand 10 before | Expand all | Expand 10 after
4687 if (GR_GL_TEXTURE_EXTERNAL == glTexture->target() || 4687 if (GR_GL_TEXTURE_EXTERNAL == glTexture->target() ||
4688 GR_GL_TEXTURE_RECTANGLE == glTexture->target()) { 4688 GR_GL_TEXTURE_RECTANGLE == glTexture->target()) {
4689 copyParams->fFilter = GrTextureParams::kNone_FilterMode; 4689 copyParams->fFilter = GrTextureParams::kNone_FilterMode;
4690 copyParams->fWidth = texture->width(); 4690 copyParams->fWidth = texture->width();
4691 copyParams->fHeight = texture->height(); 4691 copyParams->fHeight = texture->height();
4692 return true; 4692 return true;
4693 } 4693 }
4694 } 4694 }
4695 return false; 4695 return false;
4696 } 4696 }
4697
4698 GrFence SK_WARN_UNUSED_RESULT GrGLGpu::insertFence() const {
4699 GrGLsync fence;
4700 GL_CALL_RET(fence, FenceSync(GR_GL_SYNC_GPU_COMMANDS_COMPLETE, 0));
4701 return (GrFence)fence;
4702 }
4703
4704 bool GrGLGpu::waitFence(GrFence fence, uint64_t timeout) const {
4705 GrGLenum result;
4706 GL_CALL_RET(result, ClientWaitSync((GrGLsync)fence, GR_GL_SYNC_FLUSH_COMMAND S_BIT, timeout));
4707 return (GR_GL_CONDITION_SATISFIED == result);
4708 }
4709
4710 void GrGLGpu::deleteFence(GrFence fence) const {
4711 GL_CALL(DeleteSync((GrGLsync)fence));
4712 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLGpu.h ('k') | src/gpu/gl/GrGLInterface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698