liyuqian | d94ad58 | 2016-06-07 14:22:37 -0700 | [diff] [blame] | 1 | |
| 2 | /* |
| 3 | * Copyright 2016 Google Inc. |
| 4 | * |
| 5 | * Use of this source code is governed by a BSD-style license that can be |
| 6 | * found in the LICENSE file. |
| 7 | */ |
| 8 | #ifndef RasterWindowContext_DEFINED |
| 9 | #define RasterWindowContext_DEFINED |
| 10 | |
| 11 | #include "WindowContext.h" |
| 12 | |
| 13 | namespace sk_app { |
| 14 | |
| 15 | class RasterWindowContext : public WindowContext { |
| 16 | public: |
Jim Van Verth | fbdc080 | 2017-05-02 16:15:53 -0400 | [diff] [blame^] | 17 | RasterWindowContext(const DisplayParams& params) : WindowContext(params) {} |
| 18 | |
liyuqian | d94ad58 | 2016-06-07 14:22:37 -0700 | [diff] [blame] | 19 | // Explicitly convert nullptr to GrBackendContext is needed for compiling |
| 20 | GrBackendContext getBackendContext() override { return (GrBackendContext) nullptr; } |
| 21 | |
| 22 | protected: |
| 23 | bool isGpuContext() override { return false; } |
| 24 | }; |
| 25 | |
| 26 | } // namespace sk_app |
| 27 | |
| 28 | #endif |