aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/sk_app/mac
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2018-02-03 00:25:12 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-02-03 00:25:20 +0000
commit3a2cc2c2ec124de36d2544b2a523ef1dd317ca32 (patch)
treedf3154eabde3275c5a6b88f66233b9a3984bd04f /tools/sk_app/mac
parent5bb82cbecd740d21b92e8d2944280ab6eb6af7a6 (diff)
Revert "Revert "Revert "Revert "Revert "Redefine the meaning of sample counts in GPU backend."""""
This reverts commit 5bb82cbecd740d21b92e8d2944280ab6eb6af7a6. Reason for revert: <INSERT REASONING HERE> Original change's description: > Revert "Revert "Revert "Revert "Redefine the meaning of sample counts in GPU backend."""" > > This reverts commit 18c52a7b52211de5d0dcd86dc048adef758c6c75. > > Also relands "More sample count cleanup:" and "Add new GrContext queries for imagability, surfacability, and max sample count of color types" > > > Bug: skia: > Change-Id: I4028105a3a1f16ce3944e134619eb6245af6b947 > Reviewed-on: https://skia-review.googlesource.com/102940 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Brian Salomon <bsalomon@google.com> TBR=egdaniel@google.com,bsalomon@google.com Change-Id: Idee23be2f1719f0bdc9305043e95a2d589bee8d1 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/103220 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'tools/sk_app/mac')
-rw-r--r--tools/sk_app/mac/GLWindowContext_mac.cpp1
-rw-r--r--tools/sk_app/mac/RasterWindowContext_mac.cpp1
-rw-r--r--tools/sk_app/mac/Window_mac.cpp2
-rw-r--r--tools/sk_app/mac/Window_mac.h6
4 files changed, 6 insertions, 4 deletions
diff --git a/tools/sk_app/mac/GLWindowContext_mac.cpp b/tools/sk_app/mac/GLWindowContext_mac.cpp
index 67fb853fee..005fc07df4 100644
--- a/tools/sk_app/mac/GLWindowContext_mac.cpp
+++ b/tools/sk_app/mac/GLWindowContext_mac.cpp
@@ -67,7 +67,6 @@ sk_sp<const GrGLInterface> GLWindowContext_mac::onInitializeContext() {
SDL_GL_GetAttribute(SDL_GL_STENCIL_SIZE, &fStencilBits);
SDL_GL_GetAttribute(SDL_GL_MULTISAMPLESAMPLES, &fSampleCount);
- fSampleCount = SkTMax(fSampleCount, 1);
SDL_GetWindowSize(fWindow, &fWidth, &fHeight);
glViewport(0, 0, fWidth, fHeight);
diff --git a/tools/sk_app/mac/RasterWindowContext_mac.cpp b/tools/sk_app/mac/RasterWindowContext_mac.cpp
index fbe9837911..67022af7fe 100644
--- a/tools/sk_app/mac/RasterWindowContext_mac.cpp
+++ b/tools/sk_app/mac/RasterWindowContext_mac.cpp
@@ -79,7 +79,6 @@ sk_sp<const GrGLInterface> RasterWindowContext_mac::onInitializeContext() {
SDL_GL_GetAttribute(SDL_GL_STENCIL_SIZE, &fStencilBits);
SDL_GL_GetAttribute(SDL_GL_MULTISAMPLESAMPLES, &fSampleCount);
- fSampleCount = SkTMax(fSampleCount, 1);
SDL_GetWindowSize(fWindow, &fWidth, &fHeight);
glViewport(0, 0, fWidth, fHeight);
diff --git a/tools/sk_app/mac/Window_mac.cpp b/tools/sk_app/mac/Window_mac.cpp
index f2620518a2..8de5b10450 100644
--- a/tools/sk_app/mac/Window_mac.cpp
+++ b/tools/sk_app/mac/Window_mac.cpp
@@ -49,7 +49,7 @@ bool Window_mac::initWindow() {
SDL_GL_SetAttribute(SDL_GL_ACCELERATED_VISUAL, 1);
- if (fRequestedDisplayParams.fMSAASampleCount > 1) {
+ if (fRequestedDisplayParams.fMSAASampleCount > 0) {
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, 1);
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, fRequestedDisplayParams.fMSAASampleCount);
} else {
diff --git a/tools/sk_app/mac/Window_mac.h b/tools/sk_app/mac/Window_mac.h
index 35cba095fa..aa5c8df696 100644
--- a/tools/sk_app/mac/Window_mac.h
+++ b/tools/sk_app/mac/Window_mac.h
@@ -18,7 +18,11 @@ namespace sk_app {
class Window_mac : public Window {
public:
- Window_mac() : INHERITED(), fWindow(nullptr), fWindowID(0), fMSAASampleCount(1) {}
+ Window_mac()
+ : INHERITED()
+ , fWindow(nullptr)
+ , fWindowID(0)
+ , fMSAASampleCount(0) {}
~Window_mac() override { this->closeWindow(); }
bool initWindow();