| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 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 | 9 |
| 10 #include "SkGLWidget.h" | 10 #include "SkGLWidget.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 if (!this->isHidden() && fCanvas) { | 71 if (!this->isHidden() && fCanvas) { |
| 72 fDebugger->draw(fCanvas); | 72 fDebugger->draw(fCanvas); |
| 73 // TODO(chudy): Implement an optional flush button in Gui. | 73 // TODO(chudy): Implement an optional flush button in Gui. |
| 74 fCanvas->flush(); | 74 fCanvas->flush(); |
| 75 emit drawComplete(); | 75 emit drawComplete(); |
| 76 } | 76 } |
| 77 } | 77 } |
| 78 | 78 |
| 79 GrBackendRenderTargetDesc SkGLWidget::getDesc(int w, int h) { | 79 GrBackendRenderTargetDesc SkGLWidget::getDesc(int w, int h) { |
| 80 GrBackendRenderTargetDesc desc; | 80 GrBackendRenderTargetDesc desc; |
| 81 desc.fWidth = SkScalarRound(this->width()); | 81 desc.fWidth = SkScalarRoundToInt(this->width()); |
| 82 desc.fHeight = SkScalarRound(this->height()); | 82 desc.fHeight = SkScalarRoundToInt(this->height()); |
| 83 desc.fConfig = kSkia8888_GrPixelConfig; | 83 desc.fConfig = kSkia8888_GrPixelConfig; |
| 84 GR_GL_GetIntegerv(fCurIntf, GR_GL_SAMPLES, &desc.fSampleCnt); | 84 GR_GL_GetIntegerv(fCurIntf, GR_GL_SAMPLES, &desc.fSampleCnt); |
| 85 GR_GL_GetIntegerv(fCurIntf, GR_GL_STENCIL_BITS, &desc.fStencilBits); | 85 GR_GL_GetIntegerv(fCurIntf, GR_GL_STENCIL_BITS, &desc.fStencilBits); |
| 86 GrGLint buffer; | 86 GrGLint buffer; |
| 87 GR_GL_GetIntegerv(fCurIntf, GR_GL_FRAMEBUFFER_BINDING, &buffer); | 87 GR_GL_GetIntegerv(fCurIntf, GR_GL_FRAMEBUFFER_BINDING, &buffer); |
| 88 desc.fRenderTargetHandle = buffer; | 88 desc.fRenderTargetHandle = buffer; |
| 89 | 89 |
| 90 return desc; | 90 return desc; |
| 91 } | 91 } |
| 92 | 92 |
| 93 #endif | 93 #endif |
| OLD | NEW |