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

Unified Diff: src/views/animated/SkBorderView.cpp

Issue 1745813002: remove unused view files (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 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 | « src/views/SkStackViewLayout.cpp ('k') | src/views/animated/SkImageView.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/views/animated/SkBorderView.cpp
diff --git a/src/views/animated/SkBorderView.cpp b/src/views/animated/SkBorderView.cpp
deleted file mode 100644
index 88bff696c98c284ea809db7c650f6514787dbf97..0000000000000000000000000000000000000000
--- a/src/views/animated/SkBorderView.cpp
+++ /dev/null
@@ -1,96 +0,0 @@
-
-/*
- * Copyright 2011 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-#include "SkBorderView.h"
-#include "SkAnimator.h"
-#include "SkWidgetViews.h"
-#include "SkSystemEventTypes.h"
-#include "SkTime.h"
-#include "SkStackViewLayout.h"
-
-SkBorderView::SkBorderView() : fLeft(SkIntToScalar(0)),
- fRight(SkIntToScalar(0)),
- fTop(SkIntToScalar(0)),
- fBottom(SkIntToScalar(0))
-{
- fAnim.setHostEventSink(this);
- init_skin_anim(kBorder_SkinEnum, &fAnim);
-}
-
-SkBorderView::~SkBorderView()
-{
-
-}
-
-void SkBorderView::setSkin(const char skin[])
-{
- init_skin_anim(skin, &fAnim);
-}
-
-/* virtual */ void SkBorderView::onInflate(const SkDOM& dom, const SkDOM::Node* node)
-{
- this->INHERITED::onInflate(dom, node);
-}
-
-/*virtual*/ void SkBorderView::onSizeChange()
-{
- this->INHERITED::onSizeChange();
- SkEvent evt("user");
- evt.setString("id", "setDim");
- evt.setScalar("dimX", this->width());
- evt.setScalar("dimY", this->height());
- fAnim.doUserEvent(evt);
-}
-
-/*virtual*/ void SkBorderView::onDraw(SkCanvas* canvas)
-{
- SkPaint paint;
- SkAnimator::DifferenceType diff = fAnim.draw(canvas, &paint, SkTime::GetMSecs());
-
- if (diff == SkAnimator::kDifferent)
- this->inval(nullptr);
- else if (diff == SkAnimator::kPartiallyDifferent)
- {
- SkRect bounds;
- fAnim.getInvalBounds(&bounds);
- this->inval(&bounds);
- }
-}
-
-/*virtual*/ bool SkBorderView::onEvent(const SkEvent& evt)
-{
- if (evt.isType(SK_EventType_Inval))
- {
- this->inval(nullptr);
- return true;
- }
- if (evt.isType("recommendDim"))
- {
- evt.findScalar("leftMargin", &fLeft);
- evt.findScalar("rightMargin", &fRight);
- evt.findScalar("topMargin", &fTop);
- evt.findScalar("bottomMargin", &fBottom);
-
- //setup_views.cpp uses SkView::Layout instead of SkStackViewLayout
- //but that gives me an error
- SkStackViewLayout* layout;
- fMargin.set(fLeft, fTop, fRight, fBottom);
- if (this->getLayout())
- {
- layout = (SkStackViewLayout*)this->getLayout();
- layout->setMargin(fMargin);
- }
- else
- {
- layout = new SkStackViewLayout;
- layout->setMargin(fMargin);
- this->setLayout(layout)->unref();
- }
- this->invokeLayout();
- }
- return this->INHERITED::onEvent(evt);
-}
« no previous file with comments | « src/views/SkStackViewLayout.cpp ('k') | src/views/animated/SkImageView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698