提交 f40b0584 编写于 作者: C Chinmay Garde

Merge pull request #2070 from chinmaygarde/master

Initialize the window_ ivar in PlatformView to gfx::kNullAcceleratedWidget
......@@ -13,19 +13,20 @@ PlatformView* PlatformView::Create(const Config& config) {
return new PlatformViewMac(config);
}
PlatformViewMac::PlatformViewMac(const Config& config) : PlatformView(config) {}
PlatformViewMac::PlatformViewMac(const Config& config)
: PlatformView(config), window_(gfx::kNullAcceleratedWidget) {}
PlatformViewMac::~PlatformViewMac() {}
void PlatformViewMac::SurfaceCreated(gfx::AcceleratedWidget widget) {
DCHECK(window_ == 0);
DCHECK(window_ == gfx::kNullAcceleratedWidget);
window_ = widget;
SurfaceNotificationsDirect::NotifyCreated(config_, window_);
}
void PlatformViewMac::SurfaceDestroyed() {
DCHECK(window_);
window_ = 0;
DCHECK(window_ != gfx::kNullAcceleratedWidget);
window_ = gfx::kNullAcceleratedWidget;
SurfaceNotificationsDirect::NotifyDestroyed(config_);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册