3a2cc2c2ec
This reverts commit5bb82cbecd
. 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 commit18c52a7b52
. > > 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>
65 lines
1.2 KiB
C++
65 lines
1.2 KiB
C++
/*
|
|
* Copyright 2017 Google Inc.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
#ifndef Window_ios_DEFINED
|
|
#define Window_ios_DEFINED
|
|
|
|
#include "../Window.h"
|
|
#include "SkChecksum.h"
|
|
#include "SkTDynamicHash.h"
|
|
|
|
#include "SDL.h"
|
|
|
|
namespace sk_app {
|
|
|
|
class Window_ios : public Window {
|
|
public:
|
|
Window_ios()
|
|
: INHERITED()
|
|
, fWindow(nullptr)
|
|
, fWindowID(0)
|
|
, fMSAASampleCount(0) {}
|
|
~Window_ios() override { this->closeWindow(); }
|
|
|
|
bool initWindow();
|
|
|
|
void setTitle(const char*) override;
|
|
void show() override;
|
|
|
|
bool attach(BackendType) override;
|
|
|
|
void onInval() override;
|
|
|
|
static bool HandleWindowEvent(const SDL_Event& event);
|
|
|
|
static const Uint32& GetKey(const Window_ios& w) {
|
|
return w.fWindowID;
|
|
}
|
|
|
|
static uint32_t Hash(const Uint32& winID) {
|
|
return winID;
|
|
}
|
|
|
|
private:
|
|
bool handleEvent(const SDL_Event& event);
|
|
|
|
void closeWindow();
|
|
|
|
static SkTDynamicHash<Window_ios, Uint32> gWindowMap;
|
|
|
|
SDL_Window* fWindow;
|
|
Uint32 fWindowID;
|
|
|
|
int fMSAASampleCount;
|
|
|
|
typedef Window INHERITED;
|
|
};
|
|
|
|
} // namespace sk_app
|
|
|
|
#endif
|