(int width, int height)
| 133 | } |
| 134 | |
| 135 | public void onResize(int width, int height) { |
| 136 | this.width = width; |
| 137 | this.height = height; |
| 138 | |
| 139 | if (surface != null) |
| 140 | surface.close(); |
| 141 | if (renderTarget != null) |
| 142 | renderTarget.close(); |
| 143 | |
| 144 | renderTarget = BackendRenderTarget.makeGL( |
| 145 | (int) (width * scale), |
| 146 | (int) (height * scale), |
| 147 | /*samples*/0, |
| 148 | /*stencil*/8, |
| 149 | /*fbId*/0, |
| 150 | FramebufferFormat.GR_GL_RGBA8); |
| 151 | |
| 152 | surface = Surface.makeFromBackendRenderTarget( |
| 153 | context, |
| 154 | renderTarget, |
| 155 | SurfaceOrigin.BOTTOM_LEFT, |
| 156 | ColorType.RGBA_8888, |
| 157 | ColorSpace.getDisplayP3(), // TODO load monitor profile |
| 158 | new SurfaceProps(PixelGeometry.RGB_H)); |
| 159 | |
| 160 | canvas = surface.getCanvas(); |
| 161 | } |
| 162 | |
| 163 | public void onModifiersChange(boolean shift, boolean ctrl, boolean alt, boolean logo) { |
| 164 | this.shift = shift; |
no test coverage detected