WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
43070
[chromium] Let PlatformContextSkia draw to a GLES2Canvas in addition to an SkCanvas
https://bugs.webkit.org/show_bug.cgi?id=43070
Summary
[chromium] Let PlatformContextSkia draw to a GLES2Canvas in addition to an Sk...
James Robinson
Reported
2010-07-27 12:52:32 PDT
[chromium] Let PlatformContextSkia draw to a GLES2Canvas in addition to an SkCanvas
Attachments
Patch
(12.37 KB, patch)
2010-07-27 12:55 PDT
,
James Robinson
no flags
Details
Formatted Diff
Diff
Patch
(12.14 KB, patch)
2010-07-27 13:45 PDT
,
James Robinson
fishd
: review+
fishd
: commit-queue-
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
James Robinson
Comment 1
2010-07-27 12:55:25 PDT
Created
attachment 62729
[details]
Patch
WebKit Review Bot
Comment 2
2010-07-27 12:56:10 PDT
Attachment 62729
[details]
did not pass style-queue: Failed to run "['WebKitTools/Scripts/check-webkit-style']" exit_code: 1 WebCore/platform/graphics/skia/PlatformContextSkia.cpp:780: uint32_t is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4] Total errors found: 1 in 5 files If any of these errors are false positives, please file a bug against check-webkit-style.
Stephen White
Comment 3
2010-07-27 13:21:45 PDT
Comment on
attachment 62729
[details]
Patch WebCore/platform/graphics/skia/PlatformContextSkia.cpp:706 + m_canvas->getDevice()->width(), m_canvas->getDevice()->height()}; width and height already computed (above). WebCore/platform/graphics/skia/PlatformContextSkia.cpp:733 + // Last drawn in software; upload everything we've drawn WebKit style doesn't say whether comments should be full sentences ending in periods or not, but you should probably pick one... WebCore/platform/graphics/skia/PlatformContextSkia.cpp:737 + // the hardware stuff. ... or the other. :) WebCore/platform/graphics/skia/PlatformContextSkia.cpp:749 + int height = m_canvas->getDevice()->height(); width & height superfluous here. WebCore/platform/graphics/skia/PlatformContextSkia.h:50 + #endif Not your fault, but we should probably move PlatformContextSkia into the WebCore namespace at some point. WebCore/platform/graphics/skia/PlatformContextSkia.h:197 + void forceToSoftware() const; forceToSoftware() is kind of awkwardly-named. Suggest updateBuffer() or syncBuffers() or syncCanvas() or syncSoftwareCanvas() or ...
James Robinson
Comment 4
2010-07-27 13:45:14 PDT
Created
attachment 62739
[details]
Patch
James Robinson
Comment 5
2010-07-27 13:46:03 PDT
Went for full sentences (or something approximating them) and syncSoftwareCanvas(). Please take another look :)
WebKit Review Bot
Comment 6
2010-07-27 13:47:56 PDT
Attachment 62739
[details]
did not pass style-queue: Failed to run "['WebKitTools/Scripts/check-webkit-style']" exit_code: 1 WebCore/platform/graphics/skia/PlatformContextSkia.cpp:775: uint32_t is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4] Total errors found: 1 in 5 files If any of these errors are false positives, please file a bug against check-webkit-style.
Darin Fisher (:fishd, Google)
Comment 7
2010-07-27 14:16:21 PDT
Comment on
attachment 62739
[details]
Patch WebCore/platform/graphics/skia/PlatformContextSkia.cpp:679 + void PlatformContextSkia::setGLES2Context(WebCore::GLES2Context* context, const WebCore::IntSize& size) This code should really be within the WebCore namespace :) WebCore/platform/graphics/skia/PlatformContextSkia.cpp:212 + , m_GPUCanvas(0) style-nit: m_gpuCanvas <- acronym at the start of a term should be lowercase. WebCore/platform/graphics/skia/PlatformContextSkia.cpp:687 + if (m_useGPU) { nit: consider returning early if !m_useGPU to reduce indentation of the interesting part of this function. of course, if you don't like this style for the shorter methods and prefer consistency, then ignore this nit. WebCore/platform/graphics/skia/PlatformContextSkia.cpp:689 + // Depending on the blend mode we need to one of a few things: nit: "need to _do_ one..." WebCore/platform/graphics/skia/PlatformContextSkia.cpp:744 + if (m_backingStoreState == Hardware) { nit: no brackets around single line statements WebCore/platform/graphics/skia/PlatformContextSkia.cpp:762 + // FIXME: Keep a texture around for this rather than constantly creating/destroying one. nit: "destroying one" <- one space instead of two WebCore/platform/graphics/skia/PlatformContextSkia.cpp:775 + WTF::OwnArrayPtr<uint32_t> buf(new uint32_t[width]); ordinarily people drop the WTF:: prefix for OwnArrayPtr. the header file has a using WTF::OwnArrayPtr. R=me
James Robinson
Comment 8
2010-07-27 14:35:42 PDT
Thanks for the review. I think we will move the code that manages the two backing stores to some common location and refactor it to not be skia-specific at some point in the future, but for now this is expedient. Fixed the nits locally, will land by hand.
James Robinson
Comment 9
2010-07-27 14:38:04 PDT
Committed
r64161
: <
http://trac.webkit.org/changeset/64161
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug