Bug 74351 - [chromium] Add inhibitDraw to CCScheduler and drop root impl to prevent background flash on tab restore
Summary: [chromium] Add inhibitDraw to CCScheduler and drop root impl to prevent backg...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nat Duca
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-12 15:01 PST by Nat Duca
Modified: 2011-12-14 20:38 PST (History)
4 users (show)

See Also:


Attachments
Patch (14.92 KB, patch)
2011-12-12 15:13 PST, Nat Duca
no flags Details | Formatted Diff | Diff
Patch for landing (17.33 KB, patch)
2011-12-14 16:11 PST, Nat Duca
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nat Duca 2011-12-12 15:01:43 PST
[chromium] Add inhibitDraw to CCScheduler and drop root impl to prevent background flash on tab restore
Comment 1 Nat Duca 2011-12-12 15:13:59 PST
Created attachment 118873 [details]
Patch
Comment 2 Adrienne Walker 2011-12-13 18:25:06 PST
Comment on attachment 118873 [details]
Patch

This all looks good to me.
Comment 3 James Robinson 2011-12-13 19:06:12 PST
Comment on attachment 118873 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=118873&action=review

R=me. have several naming nits for your consideration.

> Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp:224
>      if (CCThreadProxy::implThread()) {
> -        TRACE_EVENT("CCLayerTreeHost::setNeedsCommit", this, 0);
>          m_proxy->setNeedsCommit();
>      } else

nit: you can drop the { }s around the 'if' clause if you want to drop this trace since it's a 1-liner now

> Source/WebCore/platform/graphics/chromium/cc/CCScheduler.cpp:108
> +CCSchedulerStateMachine::Action CCScheduler::getNextAction()

I think WebKit style would lean towards calling this 'nextAction()'

> Source/WebCore/platform/graphics/chromium/cc/CCScheduler.h:41
> +    virtual bool inhibitDraw() const = 0;

this looks like a simple getter, but might be complicated on the implementation side in the future if we get fancy about checking for tiles that are visible. if we want to anticipate that i think we might want to give this a bigger name and make it non-const. up to you, though, for now since it's a bool getter this works.

then again, we're gonna call this a whole lot so the implementation had better be really fast

> Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.cpp:434
> +    return m_layerTreeHostImpl ? !m_layerTreeHostImpl->rootLayer() : true;

hmmmm, a bit yoda-like this ternary statement appears.  perhaps phrasing this function call terms of a positive (shouldDraw(), canDraw(), something like that) would some clarity to the method provide.
Comment 4 Nat Duca 2011-12-14 16:11:12 PST
Created attachment 119316 [details]
Patch for landing
Comment 5 WebKit Review Bot 2011-12-14 20:38:12 PST
Comment on attachment 119316 [details]
Patch for landing

Clearing flags on attachment: 119316

Committed r102876: <http://trac.webkit.org/changeset/102876>
Comment 6 WebKit Review Bot 2011-12-14 20:38:16 PST
All reviewed patches have been landed.  Closing bug.