OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2015 Google Inc. | 3 * Copyright 2015 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 "GrContext.h" | 9 #include "GrContext.h" |
10 #include "SkSurface.h" | 10 #include "SkSurface.h" |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 desc.fRenderTargetHandle = buffer; | 82 desc.fRenderTargetHandle = buffer; |
83 | 83 |
84 fSurface = this->createRenderSurface(desc, fActualColorBits); | 84 fSurface = this->createRenderSurface(desc, fActualColorBits); |
85 } | 85 } |
86 } | 86 } |
87 | 87 |
88 return fSurface; | 88 return fSurface; |
89 } | 89 } |
90 | 90 |
91 void GLWindowContext::swapBuffers() { | 91 void GLWindowContext::swapBuffers() { |
92 this->presentRenderSurface(fSurface, fRenderTarget, fActualColorBits); | |
93 this->onSwapBuffers(); | 92 this->onSwapBuffers(); |
94 } | 93 } |
95 | 94 |
96 void GLWindowContext::resize(int w, int h) { | 95 void GLWindowContext::resize(int w, int h) { |
97 this->destroyContext(); | 96 this->destroyContext(); |
98 this->initializeContext(); | 97 this->initializeContext(); |
99 } | 98 } |
100 | 99 |
101 void GLWindowContext::setDisplayParams(const DisplayParams& params) { | 100 void GLWindowContext::setDisplayParams(const DisplayParams& params) { |
102 this->destroyContext(); | 101 this->destroyContext(); |
103 fDisplayParams = params; | 102 fDisplayParams = params; |
104 this->initializeContext(); | 103 this->initializeContext(); |
105 } | 104 } |
106 | 105 |
107 } //namespace sk_app | 106 } //namespace sk_app |
OLD | NEW |