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

Unified Diff: cc/CCRenderPass.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/CCRenderPass.h ('k') | cc/CCRenderPassDrawQuad.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/CCRenderPass.cpp
diff --git a/cc/CCRenderPass.cpp b/cc/CCRenderPass.cpp
deleted file mode 100644
index 513bd8bf7c35cc0da63e7b7e430e8e5700e649fe..0000000000000000000000000000000000000000
--- a/cc/CCRenderPass.cpp
+++ /dev/null
@@ -1,106 +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"
-
-#include "CCRenderPass.h"
-
-#include "CCLayerImpl.h"
-#include "CCMathUtil.h"
-#include "CCOcclusionTracker.h"
-#include "CCQuadCuller.h"
-#include "CCSharedQuadState.h"
-#include "CCSolidColorDrawQuad.h"
-
-using WebKit::WebTransformationMatrix;
-
-namespace cc {
-
-scoped_ptr<CCRenderPass> CCRenderPass::create(Id id, IntRect outputRect, const WebKit::WebTransformationMatrix& transformToRootTarget)
-{
- return make_scoped_ptr(new CCRenderPass(id, outputRect, transformToRootTarget));
-}
-
-CCRenderPass::CCRenderPass(Id id, IntRect outputRect, const WebKit::WebTransformationMatrix& transformToRootTarget)
- : m_id(id)
- , m_transformToRootTarget(transformToRootTarget)
- , m_outputRect(outputRect)
- , m_hasTransparentBackground(true)
- , m_hasOcclusionFromOutsideTargetSurface(false)
-{
- ASSERT(id.layerId > 0);
- ASSERT(id.index >= 0);
-}
-
-CCRenderPass::~CCRenderPass()
-{
-}
-
-scoped_ptr<CCRenderPass> CCRenderPass::copy(Id newId) const
-{
- ASSERT(newId != m_id);
-
- scoped_ptr<CCRenderPass> copyPass(create(newId, m_outputRect, m_transformToRootTarget));
- copyPass->setDamageRect(m_damageRect);
- copyPass->setHasTransparentBackground(m_hasTransparentBackground);
- copyPass->setHasOcclusionFromOutsideTargetSurface(m_hasOcclusionFromOutsideTargetSurface);
- copyPass->setFilters(m_filters);
- copyPass->setBackgroundFilters(m_backgroundFilters);
- return copyPass.Pass();
-}
-
-void CCRenderPass::appendQuadsForLayer(CCLayerImpl* layer, CCOcclusionTrackerImpl* occlusionTracker, CCAppendQuadsData& appendQuadsData)
-{
- const bool forSurface = false;
- CCQuadCuller quadCuller(m_quadList, m_sharedQuadStateList, layer, occlusionTracker, layer->hasDebugBorders(), forSurface);
-
- layer->appendQuads(quadCuller, appendQuadsData);
-}
-
-void CCRenderPass::appendQuadsForRenderSurfaceLayer(CCLayerImpl* layer, const CCRenderPass* contributingRenderPass, CCOcclusionTrackerImpl* occlusionTracker, CCAppendQuadsData& appendQuadsData)
-{
- const bool forSurface = true;
- CCQuadCuller quadCuller(m_quadList, m_sharedQuadStateList, layer, occlusionTracker, layer->hasDebugBorders(), forSurface);
-
- bool isReplica = false;
- layer->renderSurface()->appendQuads(quadCuller, appendQuadsData, isReplica, contributingRenderPass->id());
-
- // Add replica after the surface so that it appears below the surface.
- if (layer->hasReplica()) {
- isReplica = true;
- layer->renderSurface()->appendQuads(quadCuller, appendQuadsData, isReplica, contributingRenderPass->id());
- }
-}
-
-void CCRenderPass::appendQuadsToFillScreen(CCLayerImpl* rootLayer, SkColor screenBackgroundColor, const CCOcclusionTrackerImpl& occlusionTracker)
-{
- if (!rootLayer || !screenBackgroundColor)
- return;
-
- Region fillRegion = occlusionTracker.computeVisibleRegionInScreen();
- if (fillRegion.isEmpty())
- return;
-
- bool forSurface = false;
- CCQuadCuller quadCuller(m_quadList, m_sharedQuadStateList, rootLayer, &occlusionTracker, rootLayer->hasDebugBorders(), forSurface);
-
- // Manually create the quad state for the gutter quads, as the root layer
- // doesn't have any bounds and so can't generate this itself.
- // FIXME: Make the gutter quads generated by the solid color layer (make it smarter about generating quads to fill unoccluded areas).
- IntRect rootTargetRect = rootLayer->renderSurface()->contentRect();
- float opacity = 1;
- bool opaque = true;
- CCSharedQuadState* sharedQuadState = quadCuller.useSharedQuadState(CCSharedQuadState::create(rootLayer->drawTransform(), rootTargetRect, rootTargetRect, opacity, opaque));
- ASSERT(rootLayer->screenSpaceTransform().isInvertible());
- WebTransformationMatrix transformToLayerSpace = rootLayer->screenSpaceTransform().inverse();
- Vector<WebCore::IntRect> fillRects = fillRegion.rects();
- for (size_t i = 0; i < fillRects.size(); ++i) {
- // The root layer transform is composed of translations and scales only, no perspective, so mapping is sufficient.
- IntRect layerRect = CCMathUtil::mapClippedRect(transformToLayerSpace, cc::IntRect(fillRects[i]));
- // Skip the quad culler and just append the quads directly to avoid occlusion checks.
- m_quadList.append(CCSolidColorDrawQuad::create(sharedQuadState, layerRect, screenBackgroundColor).PassAs<CCDrawQuad>());
- }
-}
-
-} // namespace cc
« no previous file with comments | « cc/CCRenderPass.h ('k') | cc/CCRenderPassDrawQuad.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698