aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/views
diff options
context:
space:
mode:
authorGravatar Yuqian Li <liyuqian@google.com>2017-09-27 13:25:36 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-09-29 14:21:04 +0000
commit6e3d9950e34aac581150697e1a5a561c5acd5b88 (patch)
tree20c837a6957db28653455f7d88486fe8ce4da15f /include/views
parentb268d23281c0c487da2fb79a5106b6372e25ae70 (diff)
Add width and height option to SampleApp
So we can benchmark with given width/height dimensions. Bug: skia: Change-Id: I881c9f054cdcecc3e0b2bfb600afd778e1c57d95 Reviewed-on: https://skia-review.googlesource.com/51246 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
Diffstat (limited to 'include/views')
-rw-r--r--include/views/SkOSWindow_Mac.h3
-rw-r--r--include/views/SkOSWindow_Unix.h4
-rw-r--r--include/views/SkOSWindow_Win.h2
3 files changed, 8 insertions, 1 deletions
diff --git a/include/views/SkOSWindow_Mac.h b/include/views/SkOSWindow_Mac.h
index 41766a0f53..d331ecaa71 100644
--- a/include/views/SkOSWindow_Mac.h
+++ b/include/views/SkOSWindow_Mac.h
@@ -13,6 +13,7 @@
class SkOSWindow : public SkWindow {
public:
+ SkOSWindow(void* hwnd, int w, int h);
SkOSWindow(void* hwnd);
~SkOSWindow();
void* getHWND() const { return fHWND; }
@@ -48,6 +49,8 @@ protected:
virtual void onSetTitle(const char[]);
private:
+ void init(void* hwnd, int w, int h);
+
void* fHWND;
bool fInvalEventIsPending;
void* fNotifier;
diff --git a/include/views/SkOSWindow_Unix.h b/include/views/SkOSWindow_Unix.h
index 48838e764c..e1961316e4 100644
--- a/include/views/SkOSWindow_Unix.h
+++ b/include/views/SkOSWindow_Unix.h
@@ -26,6 +26,7 @@ struct SkUnixWindow {
class SkOSWindow : public SkWindow {
public:
SkOSWindow(void*);
+ SkOSWindow(void*, int width, int height);
~SkOSWindow() override;
void* getHWND() const { return (void*)fUnixWindow.fWin; }
@@ -71,7 +72,8 @@ private:
// Forcefully closes the window. If a graceful shutdown is desired then call the public
// closeWindow method
void internalCloseWindow();
- void initWindow(int newMSAASampleCount, AttachmentInfo* info);
+ void initWindow(int newMSAASampleCount, AttachmentInfo* info, int w, int h);
+ void init(int w, int h);
SkUnixWindow fUnixWindow;
diff --git a/include/views/SkOSWindow_Win.h b/include/views/SkOSWindow_Win.h
index 774244400c..076b4147a0 100644
--- a/include/views/SkOSWindow_Win.h
+++ b/include/views/SkOSWindow_Win.h
@@ -26,6 +26,7 @@ public:
};
SkOSWindow(const void* winInit);
+ SkOSWindow(const void* winInit, int w, int h);
virtual ~SkOSWindow();
static bool PostEvent(SkEvent* evt, SkEventSinkID, SkMSec delay);
@@ -87,6 +88,7 @@ private:
void* fHWND;
void doPaint(void* ctx);
+ void init(const void* winInit, int w, int h);
#if SK_SUPPORT_GPU
void* fHGLRC;