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

Unified Diff: cc/CanvasLayerTextureUpdater.cpp

Issue 11122003: [cc] Rename all cc/ filenames to Chromium style (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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/CanvasLayerTextureUpdater.h ('k') | cc/ContentLayerChromium.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/CanvasLayerTextureUpdater.cpp
diff --git a/cc/CanvasLayerTextureUpdater.cpp b/cc/CanvasLayerTextureUpdater.cpp
deleted file mode 100644
index eae5d16a6b00457360ab642e005f7af1e760f030..0000000000000000000000000000000000000000
--- a/cc/CanvasLayerTextureUpdater.cpp
+++ /dev/null
@@ -1,70 +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 "config.h"
-
-#if USE(ACCELERATED_COMPOSITING)
-
-#include "CanvasLayerTextureUpdater.h"
-
-#include "CCRenderingStats.h"
-#include "FloatRect.h"
-#include "LayerPainterChromium.h"
-#include "SkCanvas.h"
-#include "SkPaint.h"
-#include "SkRect.h"
-#include "SkiaUtils.h"
-#include "TraceEvent.h"
-#include <wtf/CurrentTime.h>
-
-namespace cc {
-
-CanvasLayerTextureUpdater::CanvasLayerTextureUpdater(PassOwnPtr<LayerPainterChromium> painter)
- : m_painter(painter)
-{
-}
-
-CanvasLayerTextureUpdater::~CanvasLayerTextureUpdater()
-{
-}
-
-void CanvasLayerTextureUpdater::paintContents(SkCanvas* canvas, const IntRect& contentRect, float contentsWidthScale, float contentsHeightScale, IntRect& resultingOpaqueRect, CCRenderingStats& stats)
-{
- TRACE_EVENT0("cc", "CanvasLayerTextureUpdater::paintContents");
- canvas->save();
- canvas->translate(CCFloatToSkScalar(-contentRect.x()), CCFloatToSkScalar(-contentRect.y()));
-
- IntRect layerRect = contentRect;
-
- if (contentsWidthScale != 1 || contentsHeightScale != 1) {
- canvas->scale(CCFloatToSkScalar(contentsWidthScale), CCFloatToSkScalar(contentsHeightScale));
-
- FloatRect rect = contentRect;
- rect.scale(1 / contentsWidthScale, 1 / contentsHeightScale);
- layerRect = enclosingIntRect(rect);
- }
-
- SkPaint paint;
- paint.setAntiAlias(false);
- paint.setXfermodeMode(SkXfermode::kClear_Mode);
- SkRect layerSkRect = SkRect::MakeXYWH(layerRect.x(), layerRect.y(), layerRect.width(), layerRect.height());
- canvas->drawRect(layerSkRect, paint);
- canvas->clipRect(layerSkRect);
-
- FloatRect opaqueLayerRect;
- double paintBeginTime = monotonicallyIncreasingTime();
- m_painter->paint(canvas, layerRect, opaqueLayerRect);
- stats.totalPaintTimeInSeconds += monotonicallyIncreasingTime() - paintBeginTime;
- canvas->restore();
-
- FloatRect opaqueContentRect = opaqueLayerRect;
- opaqueContentRect.scale(contentsWidthScale, contentsHeightScale);
- resultingOpaqueRect = enclosedIntRect(opaqueContentRect);
-
- m_contentRect = contentRect;
-}
-
-} // namespace cc
-#endif // USE(ACCELERATED_COMPOSITING)
« no previous file with comments | « cc/CanvasLayerTextureUpdater.h ('k') | cc/ContentLayerChromium.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698