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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 375303002: cc: Refactor ResourceProvider. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove helper class move api impl to callee. Created 6 years, 5 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
Index: cc/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index de1e8ffcacd26e2befe65d392552ba699e0a7b75..88faab46ca8f1c60c8a467fdaee06870b1bd8336 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -62,11 +62,14 @@
#include "cc/trees/occlusion_tracker.h"
#include "cc/trees/single_thread_proxy.h"
#include "cc/trees/tree_synchronizer.h"
+#include "gpu/command_buffer/client/gles2_interface.h"
#include "gpu/GLES2/gl2extchromium.h"
#include "ui/gfx/frame_time.h"
#include "ui/gfx/size_conversions.h"
#include "ui/gfx/vector2d_conversions.h"
+using gpu::gles2::GLES2Interface;
+
namespace {
void DidVisibilityChange(cc::LayerTreeHostImpl* id, bool visible) {
@@ -1352,8 +1355,9 @@ void LayerTreeHostImpl::ReclaimResources(const CompositorFrameAck* ack) {
// If we're not visible, we likely released resources, so we want to
// aggressively flush here to make sure those DeleteTextures make it to the
// GPU process to free up the memory.
- if (resource_provider_ && !visible_)
- resource_provider_->ShallowFlushIfSupported();
+ if (output_surface_ && !visible_) {
danakj 2014/07/10 17:01:44 you'll have to check that context_provider() is no
sohanjg 2014/07/11 16:43:32 Done.
+ output_surface_->context_provider()->ContextGL()->ShallowFlushCHROMIUM();
+ }
}
void LayerTreeHostImpl::OnCanDrawStateChangedForTree() {

Powered by Google App Engine
This is Rietveld 408576698