skia2/tools/sk_app/mac/Window_mac.h
Jim Van Verth d361e64326 Enable MSAA for Metal.
Adds a separate resolve texture to GrMtlRenderTarget, which can be used
to do a resolve for the main multisample color texture. The resolve is
handled by setting a special Store action for the RenderCommandEncoder.

Bug: skia:8243
Change-Id: I1ffd756c01a9b363116ffefee2c4c50ba9a3e637
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/225536
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2019-07-11 20:57:24 +00:00

61 lines
1.1 KiB
Objective-C

/*
* Copyright 2016 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef Window_mac_DEFINED
#define Window_mac_DEFINED
#include "src/core/SkTDynamicHash.h"
#include "tools/sk_app/Window.h"
#import <Cocoa/Cocoa.h>
namespace sk_app {
class Window_mac : public Window {
public:
Window_mac()
: INHERITED()
, fWindow(nil) {}
~Window_mac() override {
this->closeWindow();
}
bool initWindow();
void setTitle(const char*) override;
void show() override;
bool attach(BackendType) override;
void onInval() override {}
static void PaintWindows();
static const NSInteger& GetKey(const Window_mac& w) {
return w.fWindowNumber;
}
static uint32_t Hash(const NSInteger& windowNumber) {
return windowNumber;
}
NSWindow* window() { return fWindow; }
void closeWindow();
private:
NSWindow* fWindow;
NSInteger fWindowNumber;
static SkTDynamicHash<Window_mac, NSInteger> gWindowMap;
typedef Window INHERITED;
};
} // namespace sk_app
#endif