software bump
This commit is contained in:
parent
a39bb35744
commit
da5c95710f
5 changed files with 71 additions and 44 deletions
|
@ -16,7 +16,9 @@
|
|||
#include "atom/common/native_mate_converters/string16_converter.h"
|
||||
#include "atom/common/node_includes.h"
|
||||
#include "atom/common/options_switches.h"
|
||||
#include "base/command_line.h"
|
||||
#include "content/public/browser/render_process_host.h"
|
||||
#include "content/public/common/content_switches.h"
|
||||
#include "native_mate/constructor.h"
|
||||
#include "native_mate/dictionary.h"
|
||||
#include "ui/gfx/geometry/rect.h"
|
||||
|
@ -71,6 +73,14 @@ Window::Window(v8::Isolate* isolate, const mate::Dictionary& options) {
|
|||
// Use options.webPreferences to create WebContents.
|
||||
mate::Dictionary web_preferences = mate::Dictionary::CreateEmpty(isolate);
|
||||
options.Get(options::kWebPreferences, &web_preferences);
|
||||
|
||||
bool b;
|
||||
if (options.Get("disableGPU", &b) && b) {
|
||||
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
|
||||
|
||||
command_line->AppendSwitch(::switches::kDisableGpu);
|
||||
command_line->AppendSwitch(::switches::kDisableGpuCompositing);
|
||||
}
|
||||
|
||||
// Copy the backgroundColor to webContents.
|
||||
v8::Local<v8::Value> value;
|
||||
|
|
|
@ -430,7 +430,7 @@ OffScreenWindow::OffScreenWindow(
|
|||
base::ThreadTaskRunnerHandle::Get()));
|
||||
compositor_->SetAcceleratedWidget(compositor_widget_);
|
||||
#endif
|
||||
// compositor_->SetDelegate(this);
|
||||
compositor_->SetDelegate(this);
|
||||
compositor_->SetRootLayer(root_layer_.get());
|
||||
|
||||
ResizeRootLayer();
|
||||
|
@ -894,16 +894,15 @@ void OffScreenWindow::DelegatedFrameHostUpdateVSyncParameters(
|
|||
render_widget_host_->UpdateVSyncParameters(timebase, interval);
|
||||
}
|
||||
|
||||
// std::unique_ptr<cc::SoftwareOutputDevice>
|
||||
// OffScreenWindow::CreateSoftwareOutputDevice(
|
||||
// ui::Compositor* compositor) {
|
||||
// DCHECK_EQ(compositor_.get(), compositor);
|
||||
// DCHECK(!copy_frame_generator_);
|
||||
// DCHECK(!software_output_device_);
|
||||
// std::cout << "CREATED" << std::endl;
|
||||
// software_output_device_ = new OffScreenOutputDevice();
|
||||
// return base::WrapUnique(software_output_device_);
|
||||
// }
|
||||
std::unique_ptr<cc::SoftwareOutputDevice>
|
||||
OffScreenWindow::CreateSoftwareOutputDevice(ui::Compositor* compositor) {
|
||||
DCHECK_EQ(compositor_.get(), compositor);
|
||||
DCHECK(!copy_frame_generator_);
|
||||
DCHECK(!software_output_device_);
|
||||
std::cout << "CREATED" << std::endl;
|
||||
software_output_device_ = new OffScreenOutputDevice();
|
||||
return base::WrapUnique(software_output_device_);
|
||||
}
|
||||
|
||||
void OffScreenWindow::OnSetNeedsBeginFrames(bool enabled) {
|
||||
SetFrameRate();
|
||||
|
|
|
@ -62,7 +62,7 @@ class OffScreenWindow
|
|||
#if defined(OS_MACOSX)
|
||||
public ui::AcceleratedWidgetMacNSView,
|
||||
#endif
|
||||
// public ui::CompositorDelegate,
|
||||
public ui::CompositorDelegate,
|
||||
public content::DelegatedFrameHostClient {
|
||||
public:
|
||||
typedef base::Callback<void(const gfx::Rect&,int,int,void*)>
|
||||
|
@ -170,8 +170,8 @@ public:
|
|||
|
||||
bool IsAutoResizeEnabled() const;
|
||||
|
||||
// std::unique_ptr<cc::SoftwareOutputDevice> CreateSoftwareOutputDevice(
|
||||
// ui::Compositor* compositor) override;
|
||||
std::unique_ptr<cc::SoftwareOutputDevice> CreateSoftwareOutputDevice(
|
||||
ui::Compositor* compositor) override;
|
||||
void OnSetNeedsBeginFrames(bool enabled);
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue