head part updates

This commit is contained in:
gellert 2016-07-30 21:35:14 +02:00
parent 916063f370
commit e4000850cd
8 changed files with 11 additions and 23 deletions

View file

@ -1,18 +1,17 @@
// Copyright (c) 2013 GitHub, Inc.
// Copyright (c) 2016 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#include "atom/browser/osr_output_device.h"
#include <iostream>
#include "third_party/skia/include/core/SkDevice.h"
#include "ui/gfx/skia_util.h"
namespace atom {
OffScreenOutputDevice::OffScreenOutputDevice(bool transparent,
const OnPaintCallback& callback)
: transparent_(transparent),
const OnPaintCallback& callback):
transparent_(transparent),
callback_(callback),
active_(false) {
DCHECK(!callback_.is_null());
@ -22,8 +21,6 @@ OffScreenOutputDevice::~OffScreenOutputDevice() { }
void OffScreenOutputDevice::Resize(
const gfx::Size& pixel_size, float scale_factor) {
std::cout << pixel_size.width() << "x" << pixel_size.height() << std::endl;
scale_factor_ = scale_factor;
if (viewport_pixel_size_ == pixel_size) return;
@ -47,7 +44,6 @@ void OffScreenOutputDevice::Resize(
}
SkCanvas* OffScreenOutputDevice::BeginPaint(const gfx::Rect& damage_rect) {
// std::cout << "BeginPaint" << std::endl;
DCHECK(canvas_.get());
DCHECK(bitmap_.get());
@ -57,8 +53,6 @@ SkCanvas* OffScreenOutputDevice::BeginPaint(const gfx::Rect& damage_rect) {
}
void OffScreenOutputDevice::EndPaint() {
// std::cout << "EndPaint" << std::endl;
DCHECK(canvas_.get());
DCHECK(bitmap_.get());
@ -75,7 +69,6 @@ void OffScreenOutputDevice::SetActive(bool active) {
return;
active_ = active;
// Call OnPaint immediately if deactivated while a damage rect is pending.
if (!active_ && !pending_damage_rect_.IsEmpty())
OnPaint(pending_damage_rect_);
}

View file

@ -1,4 +1,4 @@
// Copyright (c) 2013 GitHub, Inc.
// Copyright (c) 2016 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
@ -9,7 +9,6 @@
#include "cc/output/software_output_device.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "base/callback.h"
namespace atom {

View file

@ -1,4 +1,4 @@
// Copyright (c) 2013 GitHub, Inc.
// Copyright (c) 2016 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
@ -26,14 +26,10 @@
#include "cc/scheduler/delay_based_time_source.h"
#include "content/public/browser/browser_thread.h"
#include <iostream>
const float kDefaultScaleFactor = 1.0;
const int kFrameRetryLimit = 2;
// const int kResizeLockTimeoutMs = 67;
namespace atom {
class AtomCopyFrameGenerator {

View file

@ -1,4 +1,4 @@
// Copyright (c) 2013 GitHub, Inc.
// Copyright (c) 2016 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.

View file

@ -1,4 +1,4 @@
// Copyright (c) 2013 GitHub, Inc.
// Copyright (c) 2016 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.

View file

@ -1,4 +1,4 @@
// Copyright (c) 2013 GitHub, Inc.
// Copyright (c) 2016 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.

View file

@ -1,4 +1,4 @@
// Copyright (c) 2013 GitHub, Inc.
// Copyright (c) 2016 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.

View file

@ -1,4 +1,4 @@
// Copyright (c) 2013 GitHub, Inc.
// Copyright (c) 2016 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.