Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(151)

Unified Diff: content/browser/compositor/software_output_device_mus.cc

Issue 1460593004: Revert of p1 mus+ash chrome renders ui and content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/compositor/software_output_device_mus.h ('k') | ui/views/mus/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c16f5967ebff2c3062c0c466bfd822d6d58f1539..0000000000000000000000000000000000000000
--- a/content/browser/compositor/software_output_device_mus.cc
+++ /dev/null
@@ -1,59 +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 "base/threading/thread_restrictions.h"
-#include "components/bitmap_uploader/bitmap_uploader.h"
-#include "third_party/skia/include/core/SkBitmap.h"
-#include "third_party/skia/include/core/SkDevice.h"
-#include "ui/base/view_prop.h"
-#include "ui/compositor/compositor.h"
-#include "ui/gfx/skia_util.h"
-
-namespace content {
-
-SoftwareOutputDeviceMus::SoftwareOutputDeviceMus(ui::Compositor* compositor)
- : compositor_(compositor) {}
-
-void SoftwareOutputDeviceMus::EndPaint() {
- SoftwareOutputDevice::EndPaint();
- base::ThreadRestrictions::ScopedAllowWait wait;
-
- if (!surface_)
- return;
-
- gfx::Rect rect = damage_rect_;
- rect.Intersect(gfx::Rect(viewport_pixel_size_));
- if (rect.IsEmpty())
- return;
-
- gfx::AcceleratedWidget widget = compositor_->widget();
- bitmap_uploader::BitmapUploader* uploader =
- reinterpret_cast<bitmap_uploader::BitmapUploader*>(ui::ViewProp::GetValue(
- widget, bitmap_uploader::kBitmapUploaderForAcceleratedWidget));
- DCHECK(uploader);
-
- SkImageInfo info;
- size_t rowBytes;
- const void* addr = surface_->peekPixels(&info, &rowBytes);
-
- if (!addr) {
- LOG(WARNING) << "SoftwareOutputDeviceMus: skia surface did not provide us "
- "with pixels";
- return;
- }
-
- const unsigned char* pixels = static_cast<const unsigned char*>(addr);
-
- // TODO(rjkroege): This makes an additional copy. Improve the
- // bitmap_uploader API to remove.
- scoped_ptr<std::vector<unsigned char>> data(new std::vector<unsigned char>(
- pixels, pixels + rowBytes * viewport_pixel_size_.height()));
- uploader->SetBitmap(viewport_pixel_size_.width(),
- viewport_pixel_size_.height(), data.Pass(),
- bitmap_uploader::BitmapUploader::BGRA);
-}
-
-} // namespace content
« no previous file with comments | « content/browser/compositor/software_output_device_mus.h ('k') | ui/views/mus/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698