summaryrefslogtreecommitdiffstats
path: root/cc/output/program_binding.h
diff options
context:
space:
mode:
authorbrianderson@chromium.org <brianderson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-01 23:03:11 +0000
committerbrianderson@chromium.org <brianderson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-01 23:03:11 +0000
commit075d8aae89b630b505f97f437e665cf1968eb4c0 (patch)
treeeb66ede0e1cb085f42500924e9e9fc8c564ffca5 /cc/output/program_binding.h
parent58430f338d50e9df8ca7066652b347b1ef7ff52d (diff)
downloadchromium_src-075d8aae89b630b505f97f437e665cf1968eb4c0.zip
chromium_src-075d8aae89b630b505f97f437e665cf1968eb4c0.tar.gz
chromium_src-075d8aae89b630b505f97f437e665cf1968eb4c0.tar.bz2
cc: Use highp precision for texture coords if available and needed
This fixes an earlier version of this patch that had a bug in FragmentShaderRGBATexAlphaMask. High precision is only used when the source is greater than N pixels in any direction to prevent performance regressions. N is determined based on the actual precision of mediump reported by the driver. BUG=183581 BUG=173747 Review URL: https://chromiumcodereview.appspot.com/12665005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@191692 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/output/program_binding.h')
-rw-r--r--cc/output/program_binding.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/cc/output/program_binding.h b/cc/output/program_binding.h
index 0e5aa9e..ee9d284 100644
--- a/cc/output/program_binding.h
+++ b/cc/output/program_binding.h
@@ -8,6 +8,7 @@
#include <string>
#include "base/logging.h"
+#include "cc/output/shader.h"
namespace WebKit { class WebGraphicsContext3D; }
@@ -49,10 +50,12 @@ class ProgramBindingBase {
template <class VertexShader, class FragmentShader>
class ProgramBinding : public ProgramBindingBase {
public:
- explicit ProgramBinding(WebKit::WebGraphicsContext3D* context) {
- ProgramBindingBase::Init(context,
- vertex_shader_.GetShaderString(),
- fragment_shader_.GetShaderString());
+ explicit ProgramBinding(WebKit::WebGraphicsContext3D* context,
+ TexCoordPrecision precision) {
+ ProgramBindingBase::Init(
+ context,
+ vertex_shader_.GetShaderString(),
+ fragment_shader_.GetShaderString(precision));
}
void Initialize(WebKit::WebGraphicsContext3D* context,