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

Unified Diff: cc/blink/web_external_bitmap_impl.cc

Issue 2261623002: Make DrawingBuffer and Canvas2DLayerBridge be cc::TextureLayerClients. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: webmailbox: fix-passrefptr Created 4 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
« no previous file with comments | « cc/blink/web_external_bitmap_impl.h ('k') | cc/blink/web_external_texture_layer_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/blink/web_external_bitmap_impl.cc
diff --git a/cc/blink/web_external_bitmap_impl.cc b/cc/blink/web_external_bitmap_impl.cc
deleted file mode 100644
index ace8725c7ca9d2aa6c29cfe370579b19220d73f8..0000000000000000000000000000000000000000
--- a/cc/blink/web_external_bitmap_impl.cc
+++ /dev/null
@@ -1,52 +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 "cc/blink/web_external_bitmap_impl.h"
-
-#include <stdint.h>
-
-#include "cc/resources/shared_bitmap.h"
-
-namespace cc_blink {
-
-namespace {
-
-SharedBitmapAllocationFunction g_memory_allocator;
-
-} // namespace
-
-void SetSharedBitmapAllocationFunction(
- SharedBitmapAllocationFunction allocator) {
- g_memory_allocator = allocator;
-}
-
-WebExternalBitmapImpl::WebExternalBitmapImpl() {
-}
-
-WebExternalBitmapImpl::~WebExternalBitmapImpl() {
-}
-
-void WebExternalBitmapImpl::setSize(blink::WebSize size) {
- if (size != size_) {
- shared_bitmap_ = g_memory_allocator(gfx::Size(size));
- size_ = size;
- }
-}
-
-blink::WebSize WebExternalBitmapImpl::size() {
- return size_;
-}
-
-uint8_t* WebExternalBitmapImpl::pixels() {
- if (!shared_bitmap_) {
- // crbug.com/520417: not sure why a non-null WebExternalBitmap is
- // being passed to prepareMailbox when the shared_bitmap_ is null.
- // Best hypothesis is that the bitmap is zero-sized.
- DCHECK(size_.isEmpty());
- return nullptr;
- }
- return shared_bitmap_->pixels();
-}
-
-} // namespace cc_blink
« no previous file with comments | « cc/blink/web_external_bitmap_impl.h ('k') | cc/blink/web_external_texture_layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698