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

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

Issue 1194783003: Implement SkGLContext swapBuffers with fence syncs (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: windows build Created 5 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/SkGLContext.cpp ('k') | src/gpu/gl/angle/SkANGLEGLContext.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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "gl/SkNullGLContext.h" 9 #include "gl/SkNullGLContext.h"
10 #include "gl/GrGLInterface.h" 10 #include "gl/GrGLInterface.h"
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 if (!ctx->isValid()) { 540 if (!ctx->isValid()) {
541 SkDELETE(ctx); 541 SkDELETE(ctx);
542 return NULL; 542 return NULL;
543 } 543 }
544 return ctx; 544 return ctx;
545 } 545 }
546 546
547 SkNullGLContext::SkNullGLContext() { 547 SkNullGLContext::SkNullGLContext() {
548 fState = SkNEW(ContextState); 548 fState = SkNEW(ContextState);
549 GrGLInterface* interface = create_null_interface(fState); 549 GrGLInterface* interface = create_null_interface(fState);
550 fGL.reset(interface); 550 this->init(interface);
551 #if GR_GL_PER_GL_FUNC_CALLBACK 551 #if GR_GL_PER_GL_FUNC_CALLBACK
552 interface->fCallback = set_current_context_from_interface; 552 interface->fCallback = set_current_context_from_interface;
553 interface->fCallbackData = reinterpret_cast<GrGLInterfaceCallbackData>(fStat e); 553 interface->fCallbackData = reinterpret_cast<GrGLInterfaceCallbackData>(fStat e);
554 #endif 554 #endif
555 } 555 }
556 556
557 SkNullGLContext::~SkNullGLContext() { 557 SkNullGLContext::~SkNullGLContext() {
558 fGL.reset(NULL); 558 this->teardown();
559 fState->unref(); 559 fState->unref();
560 } 560 }
561 561
562 void SkNullGLContext::makeCurrent() const { set_current_context(fState); } 562 void SkNullGLContext::onPlatformMakeCurrent() const { set_current_context(fState ); }
OLDNEW
« no previous file with comments | « src/gpu/gl/SkGLContext.cpp ('k') | src/gpu/gl/angle/SkANGLEGLContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698