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

Unified Diff: sky/viewer/cc/web_content_layer_impl.cc

Issue 752683002: Break Sky's dependency on cc (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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 | « sky/viewer/cc/web_content_layer_impl.h ('k') | sky/viewer/cc/web_external_bitmap_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/viewer/cc/web_content_layer_impl.cc
diff --git a/sky/viewer/cc/web_content_layer_impl.cc b/sky/viewer/cc/web_content_layer_impl.cc
deleted file mode 100644
index 261d3a0be3be4de23cb93ff1955a6bfa1b3926f9..0000000000000000000000000000000000000000
--- a/sky/viewer/cc/web_content_layer_impl.cc
+++ /dev/null
@@ -1,69 +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 "sky/viewer/cc/web_content_layer_impl.h"
-
-#include "cc/layers/content_layer.h"
-#include "cc/layers/picture_layer.h"
-#include "sky/engine/public/platform/WebContentLayerClient.h"
-#include "sky/engine/public/platform/WebFloatPoint.h"
-#include "sky/engine/public/platform/WebFloatRect.h"
-#include "sky/engine/public/platform/WebRect.h"
-#include "sky/engine/public/platform/WebSize.h"
-#include "third_party/skia/include/utils/SkMatrix44.h"
-
-using cc::ContentLayer;
-using cc::PictureLayer;
-
-namespace sky_viewer_cc {
-
-WebContentLayerImpl::WebContentLayerImpl(blink::WebContentLayerClient* client)
- : client_(client) {
- if (WebLayerImpl::UsingPictureLayer())
- layer_ = make_scoped_ptr(new WebLayerImpl(PictureLayer::Create(this)));
- else
- layer_ = make_scoped_ptr(new WebLayerImpl(ContentLayer::Create(this)));
- layer_->layer()->SetIsDrawable(true);
-}
-
-WebContentLayerImpl::~WebContentLayerImpl() {
- if (WebLayerImpl::UsingPictureLayer())
- static_cast<PictureLayer*>(layer_->layer())->ClearClient();
- else
- static_cast<ContentLayer*>(layer_->layer())->ClearClient();
-}
-
-blink::WebLayer* WebContentLayerImpl::layer() {
- return layer_.get();
-}
-
-void WebContentLayerImpl::setDoubleSided(bool double_sided) {
- layer_->layer()->SetDoubleSided(double_sided);
-}
-
-void WebContentLayerImpl::setDrawCheckerboardForMissingTiles(bool enable) {
- layer_->layer()->SetDrawCheckerboardForMissingTiles(enable);
-}
-
-void WebContentLayerImpl::PaintContents(
- SkCanvas* canvas,
- const gfx::Rect& clip,
- ContentLayerClient::GraphicsContextStatus graphics_context_status) {
- if (!client_)
- return;
-
- blink::WebFloatRect web_opaque;
- bool can_use_lcd_text = false;
- client_->paintContents(
- canvas, clip, can_use_lcd_text, web_opaque,
- graphics_context_status == ContentLayerClient::GRAPHICS_CONTEXT_ENABLED
- ? blink::WebContentLayerClient::GraphicsContextEnabled
- : blink::WebContentLayerClient::GraphicsContextDisabled);
-}
-
-bool WebContentLayerImpl::FillsBoundsCompletely() const {
- return false;
-}
-
-} // namespace sky_viewer_cc
« no previous file with comments | « sky/viewer/cc/web_content_layer_impl.h ('k') | sky/viewer/cc/web_external_bitmap_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698