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

Unified Diff: trunk/src/ppapi/proxy/compositor_resource.cc

Issue 342323006: Revert 278728 "[PPAPI] Add browser tests for compositor API" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 6 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 | « trunk/src/ppapi/proxy/compositor_resource.h ('k') | trunk/src/ppapi/tests/test_compositor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/ppapi/proxy/compositor_resource.cc
===================================================================
--- trunk/src/ppapi/proxy/compositor_resource.cc (revision 278764)
+++ trunk/src/ppapi/proxy/compositor_resource.cc (working copy)
@@ -6,7 +6,6 @@
#include "base/logging.h"
#include "ppapi/proxy/ppapi_messages.h"
-#include "ppapi/thunk/enter.h"
namespace ppapi {
namespace proxy {
@@ -19,25 +18,8 @@
SendCreate(RENDERER, PpapiHostMsg_Compositor_Create());
}
-bool CompositorResource::IsInProgress() const {
- ProxyLock::AssertAcquiredDebugOnly();
- return TrackedCallback::IsPending(commit_callback_);
-}
-
-int32_t CompositorResource::GenerateResourceId() const {
- ProxyLock::AssertAcquiredDebugOnly();
- return ++last_resource_id_;
-}
-
CompositorResource::~CompositorResource() {
- ResetLayersInternal(true);
-
- // Abort all release callbacks.
- for (ReleaseCallbackMap::iterator it = release_callback_map_.begin();
- it != release_callback_map_.end(); ++it) {
- if (!it->second.is_null())
- it->second.Run(PP_ERROR_ABORTED, 0, false);
- }
+ ResetLayersInternal();
}
thunk::PPB_Compositor_API* CompositorResource::AsPPB_Compositor_API() {
@@ -92,8 +74,7 @@
int32_t CompositorResource::ResetLayers() {
if (IsInProgress())
return PP_ERROR_INPROGRESS;
-
- ResetLayersInternal(false);
+ ResetLayersInternal();
return PP_OK;
}
@@ -131,16 +112,16 @@
ReleaseCallbackMap::iterator it = release_callback_map_.find(id);
DCHECK(it != release_callback_map_.end()) <<
"Can not found release_callback_ by id(" << id << ")!";
- it->second.Run(PP_OK, sync_point, is_lost);
+ it->second.Run(sync_point, is_lost);
release_callback_map_.erase(it);
}
-void CompositorResource::ResetLayersInternal(bool is_aborted) {
+void CompositorResource::ResetLayersInternal() {
for (LayerList::iterator it = layers_.begin();
it != layers_.end(); ++it) {
ReleaseCallback release_callback = (*it)->release_callback();
if (!release_callback.is_null()) {
- release_callback.Run(is_aborted ? PP_ERROR_ABORTED : PP_OK, 0, false);
+ release_callback.Run(0, false);
(*it)->ResetReleaseCallback();
}
(*it)->Invalidate();
« no previous file with comments | « trunk/src/ppapi/proxy/compositor_resource.h ('k') | trunk/src/ppapi/tests/test_compositor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698