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

Unified Diff: content/renderer/pepper/pepper_plugin_instance_impl.cc

Issue 1963633003: Revert of Pepper: Add a nullptr check. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « content/renderer/pepper/pepper_plugin_instance_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/pepper_plugin_instance_impl.cc
diff --git a/content/renderer/pepper/pepper_plugin_instance_impl.cc b/content/renderer/pepper/pepper_plugin_instance_impl.cc
index 14c337e58e93aec4aa933091c6a505cfbdd7105b..5b2757e8f5e3aa49b5675bbcf35d3f2a4006e5cb 100644
--- a/content/renderer/pepper/pepper_plugin_instance_impl.cc
+++ b/content/renderer/pepper/pepper_plugin_instance_impl.cc
@@ -778,13 +778,12 @@
void PepperPluginInstanceImpl::CommitTextureMailbox(
const cc::TextureMailbox& texture_mailbox) {
if (committed_texture_.IsValid() && !IsTextureInUse(committed_texture_)) {
- committed_texture_graphics_3d_->ReturnFrontBuffer(
+ bound_graphics_3d_->ReturnFrontBuffer(
committed_texture_.mailbox(), committed_texture_consumed_sync_token_,
false);
}
committed_texture_ = texture_mailbox;
- committed_texture_graphics_3d_ = bound_graphics_3d_;
committed_texture_consumed_sync_token_ = gpu::SyncToken();
if (!texture_layer_) {
@@ -805,8 +804,7 @@
std::unique_ptr<cc::SingleReleaseCallback> callback(
cc::SingleReleaseCallback::Create(base::Bind(
&PepperPluginInstanceImpl::FinishedConsumingCommittedTexture,
- weak_factory_.GetWeakPtr(), committed_texture_,
- committed_texture_graphics_3d_)));
+ weak_factory_.GetWeakPtr(), committed_texture_)));
IncrementTextureReferenceCount(committed_texture_);
texture_layer_->SetTextureMailbox(committed_texture_, std::move(callback));
@@ -814,7 +812,6 @@
void PepperPluginInstanceImpl::FinishedConsumingCommittedTexture(
const cc::TextureMailbox& texture_mailbox,
- scoped_refptr<PPB_Graphics3D_Impl> graphics_3d,
const gpu::SyncToken& sync_token,
bool is_lost) {
bool removed = DecrementTextureReferenceCount(texture_mailbox);
@@ -827,8 +824,8 @@
}
if (removed && !is_committed_texture) {
- graphics_3d->ReturnFrontBuffer(texture_mailbox.mailbox(), sync_token,
- is_lost);
+ bound_graphics_3d_->ReturnFrontBuffer(texture_mailbox.mailbox(), sync_token,
+ is_lost);
}
}
« no previous file with comments | « content/renderer/pepper/pepper_plugin_instance_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698