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

Unified Diff: content/renderer/compositor_bindings/web_external_bitmap_impl.cc

Issue 470983004: Move blink<->cc bindings to cc/blink (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 4 months 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
Index: content/renderer/compositor_bindings/web_external_bitmap_impl.cc
diff --git a/content/renderer/compositor_bindings/web_external_bitmap_impl.cc b/content/renderer/compositor_bindings/web_external_bitmap_impl.cc
deleted file mode 100644
index bf3d853f6067c394c4150e6fa74bd5895ffffbb5..0000000000000000000000000000000000000000
--- a/content/renderer/compositor_bindings/web_external_bitmap_impl.cc
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2014 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/renderer/compositor_bindings/web_external_bitmap_impl.h"
-
-#include "base/memory/shared_memory.h"
-
-namespace content {
-
-namespace {
-
-SharedMemoryAllocationFunction g_memory_allocator;
-
-} // namespace
-
-void SetSharedMemoryAllocationFunction(
- SharedMemoryAllocationFunction allocator) {
- g_memory_allocator = allocator;
-}
-
-WebExternalBitmapImpl::WebExternalBitmapImpl() {
-}
-
-WebExternalBitmapImpl::~WebExternalBitmapImpl() {
-}
-
-void WebExternalBitmapImpl::setSize(blink::WebSize size) {
- if (size != size_) {
- size_t byte_size = size.width * size.height * 4;
- shared_memory_ = g_memory_allocator(byte_size);
- if (shared_memory_)
- shared_memory_->Map(byte_size);
- size_ = size;
- }
-}
-
-blink::WebSize WebExternalBitmapImpl::size() {
- return size_;
-}
-
-uint8* WebExternalBitmapImpl::pixels() {
- return static_cast<uint8*>(shared_memory_->memory());
-}
-
-} // namespace content
-

Powered by Google App Engine
This is Rietveld 408576698