| 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 |
| 11 #include "../Window.h" | 11 #include "../Window.h" |
| 12 #include <android_native_app_glue.h> | 12 #include <android_native_app_glue.h> |
| 13 | 13 |
| 14 namespace sk_app { |
| 15 |
| 14 enum { | 16 enum { |
| 15 /** | 17 /** |
| 16 * Leave plenty of space between this item and the ones defined in the glue
layer | 18 * Leave plenty of space between this item and the ones defined in the glue
layer |
| 17 */ | 19 */ |
| 18 APP_CMD_INVAL_WINDOW = 64, | 20 APP_CMD_INVAL_WINDOW = 64, |
| 19 }; | 21 }; |
| 20 | 22 |
| 21 class Window_android : public Window { | 23 class Window_android : public Window { |
| 22 public: | 24 public: |
| 23 Window_android() : Window() {} | 25 Window_android() : Window() {} |
| (...skipping 14 matching lines...) Expand all Loading... |
| 38 bool supportsContentRect() const override { return true; } | 40 bool supportsContentRect() const override { return true; } |
| 39 SkRect getContentRect() override { return mContentRect; } | 41 SkRect getContentRect() override { return mContentRect; } |
| 40 void setContentRect(int l, int t, int r, int b) { mContentRect.set(l,t,r,b);
} | 42 void setContentRect(int l, int t, int r, int b) { mContentRect.set(l,t,r,b);
} |
| 41 | 43 |
| 42 private: | 44 private: |
| 43 android_app* mApp = nullptr; | 45 android_app* mApp = nullptr; |
| 44 SkRect mContentRect; | 46 SkRect mContentRect; |
| 45 int mSampleCount = 0; | 47 int mSampleCount = 0; |
| 46 }; | 48 }; |
| 47 | 49 |
| 50 } // namespace sk_app |
| 51 |
| 48 #endif | 52 #endif |
| OLD | NEW |