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

Unified Diff: cc/resources/resource_provider.cc

Issue 12665005: cc: Use highp precision for texture coords if available and needed (Closed) Base URL: http://git.chromium.org/chromium/src.git@highp2
Patch Set: rebase after all dependencies landed Created 7 years, 9 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 | « cc/resources/resource_provider.h ('k') | cc/resources/resource_provider_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/resource_provider.cc
diff --git a/cc/resources/resource_provider.cc b/cc/resources/resource_provider.cc
index e2b01e42f0d8bc4b9f66e219b4d76c600b951277..b58f8e70317df1037980b36f3a56e3ea1ea6716e 100644
--- a/cc/resources/resource_provider.cc
+++ b/cc/resources/resource_provider.cc
@@ -133,10 +133,11 @@ ResourceProvider::Child::Child() {}
ResourceProvider::Child::~Child() {}
scoped_ptr<ResourceProvider> ResourceProvider::Create(
- OutputSurface* output_surface) {
+ OutputSurface* output_surface,
+ int highp_threshold_min) {
scoped_ptr<ResourceProvider> resource_provider(
new ResourceProvider(output_surface));
- if (!resource_provider->Initialize())
+ if (!resource_provider->Initialize(highp_threshold_min))
return scoped_ptr<ResourceProvider>();
return resource_provider.Pass();
}
@@ -598,7 +599,7 @@ ResourceProvider::ResourceProvider(OutputSurface* output_surface)
max_texture_size_(0),
best_texture_format_(0) {}
-bool ResourceProvider::Initialize() {
+bool ResourceProvider::Initialize(int highp_threshold_min) {
DCHECK(thread_checker_.CalledOnValidThread());
WebGraphicsContext3D* context3d = output_surface_->context3d();
if (!context3d) {
@@ -631,8 +632,8 @@ bool ResourceProvider::Initialize() {
use_bgra = true;
}
- texture_copier_ =
- AcceleratedTextureCopier::Create(context3d, use_bind_uniform);
+ texture_copier_ = AcceleratedTextureCopier::Create(
+ context3d, use_bind_uniform, highp_threshold_min);
texture_uploader_ =
TextureUploader::Create(context3d, use_map_sub, use_shallow_flush_);
« no previous file with comments | « cc/resources/resource_provider.h ('k') | cc/resources/resource_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698