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

Unified Diff: webkit/compositor_bindings/web_image_layer_impl.cc

Issue 14651027: Move webkit/compositor_bindings into webkit/renderer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 | « webkit/compositor_bindings/web_image_layer_impl.h ('k') | webkit/compositor_bindings/web_layer_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/compositor_bindings/web_image_layer_impl.cc
diff --git a/webkit/compositor_bindings/web_image_layer_impl.cc b/webkit/compositor_bindings/web_image_layer_impl.cc
deleted file mode 100644
index a4210c0a630442d1e0dce45e5145636d94e353e9..0000000000000000000000000000000000000000
--- a/webkit/compositor_bindings/web_image_layer_impl.cc
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright 2012 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 "webkit/compositor_bindings/web_image_layer_impl.h"
-
-#include "base/command_line.h"
-#include "cc/base/switches.h"
-#include "cc/layers/image_layer.h"
-#include "cc/layers/picture_image_layer.h"
-#include "webkit/compositor_bindings/web_layer_impl.h"
-#include "webkit/compositor_bindings/web_layer_impl_fixed_bounds.h"
-
-static bool usingPictureLayer() {
- return cc::switches::IsImplSidePaintingEnabled();
-}
-
-namespace webkit {
-
-WebImageLayerImpl::WebImageLayerImpl() {
- if (usingPictureLayer())
- layer_.reset(new WebLayerImplFixedBounds(cc::PictureImageLayer::Create()));
- else
- layer_.reset(new WebLayerImpl(cc::ImageLayer::Create()));
-}
-
-WebImageLayerImpl::~WebImageLayerImpl() {}
-
-WebKit::WebLayer* WebImageLayerImpl::layer() { return layer_.get(); }
-
-void WebImageLayerImpl::setBitmap(SkBitmap bitmap) {
- if (usingPictureLayer()) {
- static_cast<cc::PictureImageLayer*>(layer_->layer())->SetBitmap(bitmap);
- static_cast<WebLayerImplFixedBounds*>(layer_.get())->SetFixedBounds(
- gfx::Size(bitmap.width(), bitmap.height()));
- } else {
- static_cast<cc::ImageLayer*>(layer_->layer())->SetBitmap(bitmap);
- }
-}
-
-} // namespace webkit
« no previous file with comments | « webkit/compositor_bindings/web_image_layer_impl.h ('k') | webkit/compositor_bindings/web_layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698