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

Side by Side Diff: gpu/command_buffer/service/texture_definition.cc

Issue 2449993005: Remove GLImage::Destroy(). (Closed)
Patch Set: One more Destroy() call on Mac. Created 4 years, 1 month 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "gpu/command_buffer/service/texture_definition.h" 5 #include "gpu/command_buffer/service/texture_definition.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <list> 9 #include <list>
10 10
(...skipping 17 matching lines...) Expand all
28 namespace gles2 { 28 namespace gles2 {
29 29
30 namespace { 30 namespace {
31 31
32 class GLImageSync : public gl::GLImage { 32 class GLImageSync : public gl::GLImage {
33 public: 33 public:
34 explicit GLImageSync(const scoped_refptr<NativeImageBuffer>& buffer, 34 explicit GLImageSync(const scoped_refptr<NativeImageBuffer>& buffer,
35 const gfx::Size& size); 35 const gfx::Size& size);
36 36
37 // Implement GLImage. 37 // Implement GLImage.
38 void Destroy(bool have_context) override;
39 gfx::Size GetSize() override; 38 gfx::Size GetSize() override;
40 unsigned GetInternalFormat() override; 39 unsigned GetInternalFormat() override;
41 bool BindTexImage(unsigned target) override; 40 bool BindTexImage(unsigned target) override;
42 void ReleaseTexImage(unsigned target) override; 41 void ReleaseTexImage(unsigned target) override;
43 bool CopyTexImage(unsigned target) override; 42 bool CopyTexImage(unsigned target) override;
44 bool CopyTexSubImage(unsigned target, 43 bool CopyTexSubImage(unsigned target,
45 const gfx::Point& offset, 44 const gfx::Point& offset,
46 const gfx::Rect& rect) override; 45 const gfx::Rect& rect) override;
47 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, 46 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget,
48 int z_order, 47 int z_order,
(...skipping 20 matching lines...) Expand all
69 : buffer_(buffer), size_(size) { 68 : buffer_(buffer), size_(size) {
70 if (buffer.get()) 69 if (buffer.get())
71 buffer->AddClient(this); 70 buffer->AddClient(this);
72 } 71 }
73 72
74 GLImageSync::~GLImageSync() { 73 GLImageSync::~GLImageSync() {
75 if (buffer_.get()) 74 if (buffer_.get())
76 buffer_->RemoveClient(this); 75 buffer_->RemoveClient(this);
77 } 76 }
78 77
79 void GLImageSync::Destroy(bool have_context) {
80 }
81
82 gfx::Size GLImageSync::GetSize() { 78 gfx::Size GLImageSync::GetSize() {
83 return size_; 79 return size_;
84 } 80 }
85 81
86 unsigned GLImageSync::GetInternalFormat() { 82 unsigned GLImageSync::GetInternalFormat() {
87 return GL_RGBA; 83 return GL_RGBA;
88 } 84 }
89 85
90 bool GLImageSync::BindTexImage(unsigned target) { 86 bool GLImageSync::BindTexImage(unsigned target) {
91 NOTREACHED(); 87 NOTREACHED();
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 return true; 461 return true;
466 } 462 }
467 463
468 bool TextureDefinition::SafeToRenderFrom() const { 464 bool TextureDefinition::SafeToRenderFrom() const {
469 return level_info_.cleared_rect.Contains( 465 return level_info_.cleared_rect.Contains(
470 gfx::Rect(level_info_.width, level_info_.height)); 466 gfx::Rect(level_info_.width, level_info_.height));
471 } 467 }
472 468
473 } // namespace gles2 469 } // namespace gles2
474 } // namespace gpu 470 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/image_manager.cc ('k') | gpu/command_buffer/service/texture_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698