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

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

Issue 23904003: Remove GrRefCnt.h in favor of SkRefCnt.h (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rm GrRefCnt.h Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « src/gpu/gl/GrGLContext.h ('k') | src/gpu/gl/GrGLProgram.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 2013 Google Inc. 2 * Copyright 2013 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 "GrGLContext.h" 8 #include "GrGLContext.h"
9 9
10 //////////////////////////////////////////////////////////////////////////////// 10 ////////////////////////////////////////////////////////////////////////////////
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 fInterface = NULL; 66 fInterface = NULL;
67 this->initialize(interface); 67 this->initialize(interface);
68 } 68 }
69 69
70 GrGLContext::GrGLContext(const GrGLContext& ctx) { 70 GrGLContext::GrGLContext(const GrGLContext& ctx) {
71 fInterface = NULL; 71 fInterface = NULL;
72 *this = ctx; 72 *this = ctx;
73 } 73 }
74 74
75 GrGLContext& GrGLContext::operator = (const GrGLContext& ctx) { 75 GrGLContext& GrGLContext::operator = (const GrGLContext& ctx) {
76 GrSafeAssign(fInterface, ctx.fInterface); 76 SkRefCnt_SafeAssign(fInterface, ctx.fInterface);
77 fInfo = ctx.fInfo; 77 fInfo = ctx.fInfo;
78 return *this; 78 return *this;
79 } 79 }
80 80
81 void GrGLContext::reset() { 81 void GrGLContext::reset() {
82 GrSafeSetNull(fInterface); 82 SkSafeSetNull(fInterface);
83 fInfo.reset(); 83 fInfo.reset();
84 } 84 }
85 85
86 bool GrGLContext::initialize(const GrGLInterface* interface) { 86 bool GrGLContext::initialize(const GrGLInterface* interface) {
87 if (fInfo.initialize(interface)) { 87 if (fInfo.initialize(interface)) {
88 fInterface = interface; 88 fInterface = interface;
89 interface->ref(); 89 interface->ref();
90 return true; 90 return true;
91 } 91 }
92 return false; 92 return false;
93 } 93 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLContext.h ('k') | src/gpu/gl/GrGLProgram.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698