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 #ifndef Window_android_DEFINED | 8 #ifndef Window_android_DEFINED |
9 #define Window_android_DEFINED | 9 #define Window_android_DEFINED |
10 | 10 |
(...skipping 26 matching lines...) Expand all Loading... |
37 void setUIState(const Json::Value& state) override; | 37 void setUIState(const Json::Value& state) override; |
38 | 38 |
39 void paintIfNeeded(); | 39 void paintIfNeeded(); |
40 | 40 |
41 bool scaleContentToFit() const override { return true; } | 41 bool scaleContentToFit() const override { return true; } |
42 bool supportsContentRect() const override { return true; } | 42 bool supportsContentRect() const override { return true; } |
43 SkRect getContentRect() override { return fContentRect; } | 43 SkRect getContentRect() override { return fContentRect; } |
44 void setContentRect(int l, int t, int r, int b) { fContentRect.set(l,t,r,b);
} | 44 void setContentRect(int l, int t, int r, int b) { fContentRect.set(l,t,r,b);
} |
45 | 45 |
46 private: | 46 private: |
47 // We need fNativeWindow for attaching with another backend. | |
48 // (in that case, attach is called without initDisplay being called later) | |
49 ANativeWindow* fNativeWindow = nullptr; | |
50 SkiaAndroidApp* fSkiaAndroidApp = nullptr; | 47 SkiaAndroidApp* fSkiaAndroidApp = nullptr; |
51 SkRect fContentRect; | 48 SkRect fContentRect; |
52 DisplayParams fDisplayParams; | 49 DisplayParams fDisplayParams; |
53 BackendType fBackendType; | 50 BackendType fBackendType; |
54 }; | 51 }; |
55 | 52 |
56 } // namespace sk_app | 53 } // namespace sk_app |
57 | 54 |
58 #endif | 55 #endif |
OLD | NEW |