| Index: gpu/command_buffer/service/texture_definition.cc
|
| diff --git a/gpu/command_buffer/service/texture_definition.cc b/gpu/command_buffer/service/texture_definition.cc
|
| index ed3e8b62023ee636c6febfd12a9a90e3ac4e4460..9c26e4ed762ad927fc4af268bacc337f76e516a8 100644
|
| --- a/gpu/command_buffer/service/texture_definition.cc
|
| +++ b/gpu/command_buffer/service/texture_definition.cc
|
| @@ -317,7 +317,8 @@ TextureDefinition::TextureDefinition()
|
| wrap_s_(0),
|
| wrap_t_(0),
|
| usage_(0),
|
| - immutable_(true) {
|
| + immutable_(true),
|
| + is_es3_enabled_(false) {
|
| }
|
|
|
| TextureDefinition::TextureDefinition(
|
| @@ -333,7 +334,8 @@ TextureDefinition::TextureDefinition(
|
| wrap_t_(texture->wrap_t()),
|
| usage_(texture->usage()),
|
| immutable_(texture->IsImmutable()),
|
| - defined_(texture->IsDefined()) {
|
| + defined_(texture->IsDefined()),
|
| + is_es3_enabled_(texture->IsES3Enabled()) {
|
| DCHECK(!image_buffer_.get() || defined_);
|
| if (!image_buffer_.get() && defined_) {
|
| image_buffer_ = NativeImageBuffer::Create(texture->service_id());
|
| @@ -361,7 +363,7 @@ Texture* TextureDefinition::CreateTexture() const {
|
| GLuint texture_id;
|
| glGenTextures(1, &texture_id);
|
|
|
| - Texture* texture(new Texture(texture_id));
|
| + Texture* texture(new Texture(texture_id, is_es3_enabled_));
|
| UpdateTextureInternal(texture);
|
|
|
| return texture;
|
| @@ -402,10 +404,10 @@ void TextureDefinition::UpdateTextureInternal(Texture* texture) const {
|
|
|
| texture->target_ = target_;
|
| texture->SetImmutable(immutable_);
|
| - texture->min_filter_ = min_filter_;
|
| - texture->mag_filter_ = mag_filter_;
|
| - texture->wrap_s_ = wrap_s_;
|
| - texture->wrap_t_ = wrap_t_;
|
| + texture->sampler_state_.min_filter = min_filter_;
|
| + texture->sampler_state_.mag_filter = mag_filter_;
|
| + texture->sampler_state_.wrap_s = wrap_s_;
|
| + texture->sampler_state_.wrap_t = wrap_t_;
|
| texture->usage_ = usage_;
|
| }
|
|
|
| @@ -435,10 +437,10 @@ void TextureDefinition::UpdateTexture(Texture* texture) const {
|
|
|
| bool TextureDefinition::Matches(const Texture* texture) const {
|
| DCHECK(target_ == texture->target());
|
| - if (texture->min_filter_ != min_filter_ ||
|
| - texture->mag_filter_ != mag_filter_ ||
|
| - texture->wrap_s_ != wrap_s_ ||
|
| - texture->wrap_t_ != wrap_t_ ||
|
| + if (texture->sampler_state_.min_filter != min_filter_ ||
|
| + texture->sampler_state_.mag_filter != mag_filter_ ||
|
| + texture->sampler_state_.wrap_s != wrap_s_ ||
|
| + texture->sampler_state_.wrap_t != wrap_t_ ||
|
| texture->SafeToRenderFrom() != SafeToRenderFrom()) {
|
| return false;
|
| }
|
|
|