Fix uninitialized Render Target origin issue in debugger

https://codereview.appspot.com/7314066/



git-svn-id: http://skia.googlecode.com/svn/trunk@7682 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
robertphillips@google.com 2013-02-08 21:22:09 +00:00
parent 06d6ac645d
commit 6577cd37c7

View File

@ -29,6 +29,7 @@ void SkGLWidget::initializeGL() {
fCurIntf = GrGLCreateNativeInterface();
fCurContext = GrContext::Create(kOpenGL_GrBackend, (GrBackendContext) fCurIntf);
GrBackendRenderTargetDesc desc = this->getDesc(this->width(), this->height());
desc.fOrigin = kBottomLeft_GrSurfaceOrigin;
GrRenderTarget* curRenderTarget = fCurContext->wrapBackendRenderTarget(desc);
fGpuDevice = new SkGpuDevice(fCurContext, curRenderTarget);
fCanvas = new SkCanvas(fGpuDevice);
@ -41,6 +42,7 @@ void SkGLWidget::initializeGL() {
void SkGLWidget::resizeGL(int w, int h) {
GrBackendRenderTargetDesc desc = this->getDesc(w, h);
desc.fOrigin = kBottomLeft_GrSurfaceOrigin;
GrRenderTarget* curRenderTarget = fCurContext->wrapBackendRenderTarget(desc);
SkSafeUnref(fGpuDevice);
SkSafeUnref(fCanvas);