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

Unified Diff: webkit/compositor_bindings/web_content_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
Index: webkit/compositor_bindings/web_content_layer_impl.cc
diff --git a/webkit/compositor_bindings/web_content_layer_impl.cc b/webkit/compositor_bindings/web_content_layer_impl.cc
deleted file mode 100644
index dd3b8872f0f72c02cea1fd99576f9c23f038c2f2..0000000000000000000000000000000000000000
--- a/webkit/compositor_bindings/web_content_layer_impl.cc
+++ /dev/null
@@ -1,87 +0,0 @@
-// Copyright 2011 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_content_layer_impl.h"
-
-#include "base/command_line.h"
-#include "cc/base/switches.h"
-#include "cc/layers/content_layer.h"
-#include "cc/layers/picture_layer.h"
-#include "third_party/WebKit/Source/Platform/chromium/public/WebContentLayerClient.h"
-#include "third_party/WebKit/Source/Platform/chromium/public/WebFloatPoint.h"
-#include "third_party/WebKit/Source/Platform/chromium/public/WebFloatRect.h"
-#include "third_party/WebKit/Source/Platform/chromium/public/WebRect.h"
-#include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h"
-#include "third_party/skia/include/utils/SkMatrix44.h"
-
-using cc::ContentLayer;
-using cc::PictureLayer;
-
-namespace webkit {
-
-static bool usingPictureLayer() {
- return cc::switches::IsImplSidePaintingEnabled();
-}
-
-WebContentLayerImpl::WebContentLayerImpl(WebKit::WebContentLayerClient* client)
- : client_(client),
- ignore_lcd_text_change_(false) {
- if (usingPictureLayer())
- layer_ = make_scoped_ptr(new WebLayerImpl(PictureLayer::Create(this)));
- else
- layer_ = make_scoped_ptr(new WebLayerImpl(ContentLayer::Create(this)));
- layer_->layer()->SetIsDrawable(true);
- can_use_lcd_text_ = layer_->layer()->can_use_lcd_text();
-}
-
-WebContentLayerImpl::~WebContentLayerImpl() {
- if (usingPictureLayer())
- static_cast<PictureLayer*>(layer_->layer())->ClearClient();
- else
- static_cast<ContentLayer*>(layer_->layer())->ClearClient();
-}
-
-WebKit::WebLayer* WebContentLayerImpl::layer() { return layer_.get(); }
-
-void WebContentLayerImpl::setDoubleSided(bool double_sided) {
- layer_->layer()->SetDoubleSided(double_sided);
-}
-
-// TODO(alokp): Remove this function from WebContentLayer API.
-void WebContentLayerImpl::setUseLCDText(bool enable) {}
-
-void WebContentLayerImpl::setDrawCheckerboardForMissingTiles(bool enable) {
- layer_->layer()->SetDrawCheckerboardForMissingTiles(enable);
-}
-
-void WebContentLayerImpl::PaintContents(SkCanvas* canvas,
- gfx::Rect clip,
- gfx::RectF* opaque) {
- if (!client_)
- return;
-
- WebKit::WebFloatRect web_opaque;
- // For picture layers, always record with LCD text. PictureLayerImpl
- // will turn this off later during rasterization.
- bool use_lcd_text = usingPictureLayer() || can_use_lcd_text_;
- client_->paintContents(canvas, clip, use_lcd_text, web_opaque);
- *opaque = web_opaque;
-}
-
-void WebContentLayerImpl::DidChangeLayerCanUseLCDText() {
- // It is important to make this comparison because the LCD text status
- // here can get out of sync with that in the layer.
- if (can_use_lcd_text_ == layer_->layer()->can_use_lcd_text())
- return;
-
- // LCD text cannot be enabled once disabled.
- if (layer_->layer()->can_use_lcd_text() && ignore_lcd_text_change_)
- return;
-
- can_use_lcd_text_ = layer_->layer()->can_use_lcd_text();
- ignore_lcd_text_change_ = true;
- layer_->invalidate();
-}
-
-} // namespace webkit
« no previous file with comments | « webkit/compositor_bindings/web_content_layer_impl.h ('k') | webkit/compositor_bindings/web_external_texture_layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698