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

Unified Diff: gpu/command_buffer/service/texture_definition.cc

Issue 681713002: Update from chromium https://crrev.com/301315 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 2 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 | « gpu/command_buffer/service/texture_definition.h ('k') | gpu/command_buffer/service/texture_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 abde56a35129c9e4d867ecd028bb1246a833a838..b0cafe2d1cbbb0884f83cf956fcb92f8ca89bc69 100644
--- a/gpu/command_buffer/service/texture_definition.cc
+++ b/gpu/command_buffer/service/texture_definition.cc
@@ -278,13 +278,23 @@ TextureDefinition::LevelInfo::LevelInfo(GLenum target,
TextureDefinition::LevelInfo::~LevelInfo() {}
+TextureDefinition::TextureDefinition()
+ : version_(0),
+ target_(0),
+ min_filter_(0),
+ mag_filter_(0),
+ wrap_s_(0),
+ wrap_t_(0),
+ usage_(0),
+ immutable_(true) {
+}
+
TextureDefinition::TextureDefinition(
- GLenum target,
Texture* texture,
unsigned int version,
const scoped_refptr<NativeImageBuffer>& image_buffer)
: version_(version),
- target_(target),
+ target_(texture->target()),
image_buffer_(image_buffer.get()
? image_buffer
: NativeImageBuffer::Create(texture->service_id())),
@@ -306,7 +316,7 @@ TextureDefinition::TextureDefinition(
new GLImageSync(image_buffer_,
gfx::Size(first_face.level_infos[0].width,
first_face.level_infos[0].height)));
- texture->SetLevelImage(NULL, target, 0, gl_image.get());
+ texture->SetLevelImage(NULL, target_, 0, gl_image.get());
// TODO: all levels
level_infos_.clear();
« no previous file with comments | « gpu/command_buffer/service/texture_definition.h ('k') | gpu/command_buffer/service/texture_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698