| Index: content/browser/compositor/software_output_device_mus.cc
|
| diff --git a/content/browser/compositor/software_output_device_mus.cc b/content/browser/compositor/software_output_device_mus.cc
|
| deleted file mode 100644
|
| index c98153ac9e126d19884492aaa4a4ce67442ba653..0000000000000000000000000000000000000000
|
| --- a/content/browser/compositor/software_output_device_mus.cc
|
| +++ /dev/null
|
| @@ -1,67 +0,0 @@
|
| -// Copyright 2015 The Chromium Authors. All rights reserved.
|
| -// Use of this source code is governed by a BSD-style license that can be
|
| -// found in the LICENSE file.
|
| -
|
| -#include "content/browser/compositor/software_output_device_mus.h"
|
| -
|
| -#include <stddef.h>
|
| -#include <utility>
|
| -
|
| -#include "services/ui/public/cpp/bitmap_uploader.h"
|
| -#include "third_party/skia/include/core/SkImageInfo.h"
|
| -#include "ui/base/view_prop.h"
|
| -#include "ui/compositor/compositor.h"
|
| -#include "ui/gfx/skia_util.h"
|
| -
|
| -#if !defined(OFFICIAL_BUILD)
|
| -#include "base/threading/thread_restrictions.h"
|
| -#endif
|
| -
|
| -namespace content {
|
| -
|
| -SoftwareOutputDeviceMus::SoftwareOutputDeviceMus(ui::Compositor* compositor)
|
| - : compositor_(compositor) {}
|
| -
|
| -void SoftwareOutputDeviceMus::EndPaint() {
|
| - SoftwareOutputDevice::EndPaint();
|
| -#if !defined(OFFICIAL_BUILD)
|
| - base::ThreadRestrictions::ScopedAllowWait wait;
|
| -#endif
|
| -
|
| - if (!surface_)
|
| - return;
|
| -
|
| - gfx::Rect rect = damage_rect_;
|
| - rect.Intersect(gfx::Rect(viewport_pixel_size_));
|
| - if (rect.IsEmpty())
|
| - return;
|
| -
|
| - gfx::AcceleratedWidget widget = compositor_->widget();
|
| - ui::BitmapUploader* uploader =
|
| - reinterpret_cast<ui::BitmapUploader*>(ui::ViewProp::GetValue(
|
| - widget, ui::kBitmapUploaderForAcceleratedWidget));
|
| - DCHECK(uploader);
|
| -
|
| - SkPixmap pixmap;
|
| - surface_->peekPixels(&pixmap);
|
| -
|
| - if (!pixmap.addr()) {
|
| - LOG(WARNING) << "SoftwareOutputDeviceMus: skia surface did not provide us "
|
| - "with pixels";
|
| - return;
|
| - }
|
| -
|
| - const unsigned char* pixels = static_cast<const unsigned char*>(
|
| - pixmap.addr());
|
| -
|
| - // TODO(rjkroege): This makes an additional copy. Improve the
|
| - // bitmap_uploader API to remove.
|
| - std::unique_ptr<std::vector<unsigned char>> data(
|
| - new std::vector<unsigned char>(
|
| - pixels, pixels + pixmap.rowBytes() * viewport_pixel_size_.height()));
|
| - uploader->SetBitmap(viewport_pixel_size_.width(),
|
| - viewport_pixel_size_.height(), std::move(data),
|
| - ui::BitmapUploader::BGRA);
|
| -}
|
| -
|
| -} // namespace content
|
|
|