cc: Remove the software compositing bool from PrepareTextureMailbox
A quick followup after https://codereview.chromium.org/2267993002/ that
deletes the now-unused parameter.
Since clients determine if they should give cc a GPU or software
mailbox based on the GL context, we no longer need this bool parameter
in PrepareTextureMailbox. Also we don't need the RendererCapabilities
field anymore.
In changing one Canvas2DLayerBridge test to lose the GL context then
call PrepareTextureMailbox, I uncovered that this would cause DCHECKs
in the method to fail since isAccelerated() returns false on the first
call when the context is lost (but does not return false if
PrepareTextureMailbox happens with a non-lost context at least once
beforehand). So I left a call to prepareSurfaceForPaintingIfNeeded() to
work around the issue with a TODO. It seems like isAccelerated() should
just go away or something but I'm not sure.
[email protected], [email protected], [email protected]
TBR=pfeldman
BUG=606056
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel
Review-Url: https://codereview.chromium.org/2270533002
Cr-Commit-Position: refs/heads/master@{#413854}
diff --git a/cc/layers/texture_layer_unittest.cc b/cc/layers/texture_layer_unittest.cc
index 94540554..f03e04b 100644
--- a/cc/layers/texture_layer_unittest.cc
+++ b/cc/layers/texture_layer_unittest.cc
@@ -103,8 +103,7 @@
bool PrepareTextureMailbox(
TextureMailbox* mailbox,
- std::unique_ptr<SingleReleaseCallback>* release_callback,
- bool use_shared_memory) override {
+ std::unique_ptr<SingleReleaseCallback>* release_callback) override {
if (!mailbox_changed_)
return false;
@@ -1052,8 +1051,7 @@
// TextureLayerClient implementation.
bool PrepareTextureMailbox(
TextureMailbox* texture_mailbox,
- std::unique_ptr<SingleReleaseCallback>* release_callback,
- bool use_shared_memory) override {
+ std::unique_ptr<SingleReleaseCallback>* release_callback) override {
if (layer_tree_host()->source_frame_number() == 1) {
// Once this has been committed, the mailbox will be released.
*texture_mailbox = TextureMailbox();
@@ -1131,8 +1129,7 @@
// TextureLayerClient implementation.
bool PrepareTextureMailbox(
TextureMailbox* mailbox,
- std::unique_ptr<SingleReleaseCallback>* release_callback,
- bool use_shared_memory) override {
+ std::unique_ptr<SingleReleaseCallback>* release_callback) override {
++prepare_called_;
if (!mailbox_changed_)
return false;
@@ -1251,8 +1248,7 @@
// TextureLayerClient implementation.
bool PrepareTextureMailbox(
TextureMailbox* mailbox,
- std::unique_ptr<SingleReleaseCallback>* release_callback,
- bool use_shared_memory) override {
+ std::unique_ptr<SingleReleaseCallback>* release_callback) override {
*mailbox = TextureMailbox(MailboxFromChar('1'), SyncTokenFromUInt(1),
GL_TEXTURE_2D);
*release_callback = SingleReleaseCallback::Create(