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

Side by Side Diff: cc/trees/layer_tree_host_impl.cc

Issue 177953004: Enable SurfaceTexture based zero-copy texture uploading on Android platform Base URL: http://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 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
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 "cc/trees/layer_tree_host_impl.h" 5 #include "cc/trees/layer_tree_host_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 // preserve caching behavior (and limit memory waste when priorities change). 104 // preserve caching behavior (and limit memory waste when priorities change).
105 return GetMaxTransferBufferUsageBytes(context_provider); 105 return GetMaxTransferBufferUsageBytes(context_provider);
106 } 106 }
107 107
108 unsigned GetMapImageTextureTarget(cc::ContextProvider* context_provider) { 108 unsigned GetMapImageTextureTarget(cc::ContextProvider* context_provider) {
109 if (!context_provider) 109 if (!context_provider)
110 return GL_TEXTURE_2D; 110 return GL_TEXTURE_2D;
111 111
112 // TODO(reveman): Determine if GL_TEXTURE_EXTERNAL_OES works well on 112 // TODO(reveman): Determine if GL_TEXTURE_EXTERNAL_OES works well on
113 // Android before we enable this. crbug.com/322780 113 // Android before we enable this. crbug.com/322780
114 #if !defined(OS_ANDROID) 114 // #if !defined(OS_ANDROID)
reveman 2014/02/26 08:02:34 Someone needs to take ownership of crbug.com/32278
115 if (context_provider->ContextCapabilities().gpu.egl_image_external) 115 if (context_provider->ContextCapabilities().gpu.egl_image_external)
116 return GL_TEXTURE_EXTERNAL_OES; 116 return GL_TEXTURE_EXTERNAL_OES;
117 if (context_provider->ContextCapabilities().gpu.texture_rectangle) 117 if (context_provider->ContextCapabilities().gpu.texture_rectangle)
118 return GL_TEXTURE_RECTANGLE_ARB; 118 return GL_TEXTURE_RECTANGLE_ARB;
119 #endif 119 // #endif
120 120
121 return GL_TEXTURE_2D; 121 return GL_TEXTURE_2D;
122 } 122 }
123 123
124 } // namespace 124 } // namespace
125 125
126 namespace cc { 126 namespace cc {
127 127
128 class LayerTreeHostImplTimeSourceAdapter : public TimeSourceClient { 128 class LayerTreeHostImplTimeSourceAdapter : public TimeSourceClient {
129 public: 129 public:
(...skipping 2865 matching lines...) Expand 10 before | Expand all | Expand 10 after
2995 swap_promise_monitor_.erase(monitor); 2995 swap_promise_monitor_.erase(monitor);
2996 } 2996 }
2997 2997
2998 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() { 2998 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() {
2999 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin(); 2999 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin();
3000 for (; it != swap_promise_monitor_.end(); it++) 3000 for (; it != swap_promise_monitor_.end(); it++)
3001 (*it)->OnSetNeedsRedrawOnImpl(); 3001 (*it)->OnSetNeedsRedrawOnImpl();
3002 } 3002 }
3003 3003
3004 } // namespace cc 3004 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698