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

Unified Diff: trunk/src/ppapi/proxy/compositor_layer_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_layer_resource.h ('k') | trunk/src/ppapi/proxy/compositor_resource.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/ppapi/proxy/compositor_layer_resource.cc
===================================================================
--- trunk/src/ppapi/proxy/compositor_layer_resource.cc (revision 278764)
+++ trunk/src/ppapi/proxy/compositor_layer_resource.cc (working copy)
@@ -32,17 +32,11 @@
const ScopedPPResource& context,
uint32_t texture,
const scoped_refptr<TrackedCallback>& release_callback,
- int32_t result,
uint32_t sync_point,
bool is_lost) {
if (!TrackedCallback::IsPending(release_callback))
return;
- if (result != PP_OK) {
- release_callback->Run(result);
- return;
- }
-
do {
if (!sync_point)
break;
@@ -65,12 +59,11 @@
const ScopedPPResource& layer,
const ScopedPPResource& image,
const scoped_refptr<TrackedCallback>& release_callback,
- int32_t result,
uint32_t sync_point,
bool is_lost) {
if (!TrackedCallback::IsPending(release_callback))
return;
- release_callback->Run(result);
+ release_callback->Run(PP_OK);
}
} // namespace
@@ -112,6 +105,7 @@
if (!size)
return PP_ERROR_BADARGUMENT;
+
data_.color->red = clamp(red);
data_.color->green = clamp(green);
data_.color->blue = clamp(blue);
@@ -213,11 +207,6 @@
data_.image->source_rect.point = PP_MakeFloatPoint(0.0f, 0.0f);
data_.image->source_rect.size = source_size_;
- // If the PP_Resource of this layer is released by the plugin, the
- // release_callback will be aborted immediately, but the texture or image
- // in this layer may still being used by chromium compositor. So we have to
- // use ScopedPPResource to keep this resource alive until the texture or image
- // is released by the chromium compositor.
release_callback_ = base::Bind(
&OnImageReleased,
ScopedPPResource(pp_resource()), // Keep layer alive.
@@ -344,7 +333,7 @@
int32_t CompositorLayerResource::CheckForSetTextureAndImage(
LayerType type,
const scoped_refptr<TrackedCallback>& release_callback) {
- if (!compositor_)
+ if (!compositor_)
return PP_ERROR_BADRESOURCE;
if (compositor_->IsInProgress())
« no previous file with comments | « trunk/src/ppapi/proxy/compositor_layer_resource.h ('k') | trunk/src/ppapi/proxy/compositor_resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698