зеркало из https://github.com/mozilla/moz-skia.git
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:
Родитель
06d6ac645d
Коммит
6577cd37c7
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче