[webkit-reviews] review denied: [Bug 54710] [chromium] Create a LayerChromium layerTreeAsText. Add HUD to LayerRendererChromium that draws compositor FPS and, optionally, the layer tree. : [Attachment 83751] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Mar 2 16:10:37 PST 2011


James Robinson <jamesr at chromium.org> has denied Nat Duca <nduca at chromium.org>'s
request for review:
Bug 54710: [chromium] Create a LayerChromium layerTreeAsText. Add HUD to
LayerRendererChromium that draws compositor FPS and, optionally, the layer
tree.
https://bugs.webkit.org/show_bug.cgi?id=54710

Attachment 83751: Patch
https://bugs.webkit.org/attachment.cgi?id=83751&action=review

------- Additional Comments from James Robinson <jamesr at chromium.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=83751&action=review

Left some nitpicks.  I'm not sure how the debugging bits are going to get set -
will that go through Settings or some other process?

> Source/WebCore/platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:16
> +/*
> + * Copyright (C) 2010 Google Inc. All rights reserved.
> + *
> + * Redistribution and use in source and binary forms, with or without
> + * modification, are permitted provided that the following conditions are
> + * met:
> + *
> + *	  * Redistributions of source code must retain the above copyright
> + * notice, this list of conditions and the following disclaimer.
> + *	  * Redistributions in binary form must reproduce the above
> + * copyright notice, this list of conditions and the following disclaimer
> + * in the documentation and/or other materials provided with the
> + * distribution.
> + *	  * Neither the name of Google Inc. nor the names of its
> + * contributors may be used to endorse or promote products derived from
> + * this software without specific prior written permission.

it's 2011 now, and this is technically the wrong license header format (should
be 2-clause). Take a look at Source/WebCore/LICENSE-APPLE and replace the
"Apple Inc." in the first line with "Google Inc." to get the most correct
incantation.

> Source/WebCore/platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:79
> +	   hudSize.setWidth(std::min(2048,
m_layerRenderer->rootVisibleRect().width()));
> +	   hudSize.setHeight(std::min(2048,
m_layerRenderer->rootVisibleRect().height()));

nit: webkit style is to have a using declaration at the top of the .cpp and
just use min()

> Source/WebCore/platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:87
> +    // render pixels into the texture

nit: WebKit comments start with a capital letter and end with a period.

> Source/WebCore/platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:90
> +#if PLATFORM(SKIA)

this block gets a lot simpler with enne's PlatformCanvas thingy

> Source/WebCore/platform/graphics/chromium/cc/CCHeadsUpDisplay.h:47
> +    CCHeadsUpDisplay(LayerRendererChromium* owner);

nit: explicit

> Source/WebCore/platform/graphics/chromium/cc/CCHeadsUpDisplay.h:70
> +    double m_presentTimeHistory[2]; // Units are in seconds.

nit: include the unit in the type name so it's clearer without having to look
at the header.

> Source/WebCore/platform/graphics/chromium/cc/CCHeadsUpDisplay.h:73
> +    bool m_showFPSCounter : 1;
> +    bool m_showPlatformLayerTree : 1;

no real need to bitpack these, so just leave out the : 1

> Source/WebKit/chromium/public/WebSettings.h:101
> +    virtual void setShowFPSCounter(bool) = 0;
> +    virtual bool showFPSCounter() const = 0;
> +    virtual void setShowPlatformLayerTree(bool) = 0;
> +    virtual bool showPlatformLayerTree() const = 0;

I'm not sure who/what sets these guys, but if you only plan to manipulate these
from within WebViewImpl, then you only need to put the bits on WebSettingsImpl
and not WebSettings.  WebSettings is supposed to match WebCore::Settings
directly - if you have chromium-specific stuff it's better add those on
WebSettingsImpl since they don't map to Settings.  In WebViewImpl the
m_webSettings object is of type OwnPtr<WebSettingsImpl>.


More information about the webkit-reviews mailing list