| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 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 "Window.h" | 8 #include "Window.h" |
| 9 | 9 |
| 10 #include "SkSurface.h" | 10 #include "SkSurface.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 SkSurface* backbuffer = fTestContext->getBackbufferSurface(); | 54 SkSurface* backbuffer = fTestContext->getBackbufferSurface(); |
| 55 if (backbuffer) { | 55 if (backbuffer) { |
| 56 // draw into the canvas of this surface | 56 // draw into the canvas of this surface |
| 57 SkCanvas* canvas = backbuffer->getCanvas(); | 57 SkCanvas* canvas = backbuffer->getCanvas(); |
| 58 | 58 |
| 59 fPaintFunc(canvas, fPaintUserData); | 59 fPaintFunc(canvas, fPaintUserData); |
| 60 | 60 |
| 61 canvas->flush(); | 61 canvas->flush(); |
| 62 | 62 |
| 63 fTestContext->swapBuffers(); | 63 fTestContext->swapBuffers(); |
| 64 } else { |
| 65 // try recreating testcontext |
| 64 } | 66 } |
| 65 | 67 |
| 66 } | 68 } |
| 67 | 69 |
| 68 | 70 |
| 69 void Window::onResize(uint32_t w, uint32_t h) { | 71 void Window::onResize(uint32_t w, uint32_t h) { |
| 70 fTestContext->resize(w, h); | 72 fTestContext->resize(w, h); |
| 71 } | 73 } |
| OLD | NEW |