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

Side by Side Diff: content/renderer/pepper/pepper_compositor_host.cc

Issue 345443005: [PPAPI] Fix the CommitLayers() will never be completed issue (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/pepper/pepper_compositor_host.h" 5 #include "content/renderer/pepper/pepper_compositor_host.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/shared_memory.h" 8 #include "base/memory/shared_memory.h"
9 #include "cc/layers/layer.h" 9 #include "cc/layers/layer.h"
10 #include "cc/layers/solid_color_layer.h" 10 #include "cc/layers/solid_color_layer.h"
11 #include "cc/layers/texture_layer.h" 11 #include "cc/layers/texture_layer.h"
12 #include "cc/resources/texture_mailbox.h" 12 #include "cc/resources/texture_mailbox.h"
13 #include "cc/trees/layer_tree_host.h"
13 #include "content/public/renderer/renderer_ppapi_host.h" 14 #include "content/public/renderer/renderer_ppapi_host.h"
14 #include "content/renderer/pepper/gfx_conversion.h" 15 #include "content/renderer/pepper/gfx_conversion.h"
15 #include "content/renderer/pepper/host_globals.h" 16 #include "content/renderer/pepper/host_globals.h"
16 #include "content/renderer/pepper/pepper_plugin_instance_impl.h" 17 #include "content/renderer/pepper/pepper_plugin_instance_impl.h"
17 #include "content/renderer/pepper/ppb_image_data_impl.h" 18 #include "content/renderer/pepper/ppb_image_data_impl.h"
18 #include "ppapi/c/pp_errors.h" 19 #include "ppapi/c/pp_errors.h"
19 #include "ppapi/host/dispatch_host_message.h" 20 #include "ppapi/host/dispatch_host_message.h"
20 #include "ppapi/host/ppapi_host.h" 21 #include "ppapi/host/ppapi_host.h"
21 #include "ppapi/proxy/ppapi_messages.h" 22 #include "ppapi/proxy/ppapi_messages.h"
22 #include "ppapi/thunk/enter.h" 23 #include "ppapi/thunk/enter.h"
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 } 360 }
360 361
361 UpdateLayer(cc_layer, old_layer, pp_layer, image_shms[i].Pass()); 362 UpdateLayer(cc_layer, old_layer, pp_layer, image_shms[i].Pass());
362 363
363 if (old_layer) 364 if (old_layer)
364 *old_layer = *pp_layer; 365 *old_layer = *pp_layer;
365 else 366 else
366 layers_.push_back(LayerData(cc_layer, *pp_layer)); 367 layers_.push_back(LayerData(cc_layer, *pp_layer));
367 } 368 }
368 369
370 // We need force to commit for each CommitLayers(), so the
371 // ViewInitiatedPaint() will be always called, even if all layers are not
372 // changed from previous CommitLayers() call.
373 if (layer_->layer_tree_host())
bbudge 2014/06/18 15:58:24 The comment is hard to understand. Is this what yo
Peng 2014/06/18 16:05:43 Yes. Thanks you. Done
374 layer_->layer_tree_host()->SetNeedsCommit();
375
369 return PP_OK_COMPLETIONPENDING; 376 return PP_OK_COMPLETIONPENDING;
370 } 377 }
371 378
372 } // namespace content 379 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698