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

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

Issue 977853002: Reland of Revert of gpu: introduce glCopySubTextureCHROMIUM (patchset #1 id:1 of https://codereview… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Apply image optimization to CopySubTexture. move glValidateProgram Created 5 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 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 <list> 7 #include <list>
8 8
9 #include "base/memory/linked_ptr.h" 9 #include "base/memory/linked_ptr.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 15 matching lines...) Expand all
26 class GLImageSync : public gfx::GLImage { 26 class GLImageSync : public gfx::GLImage {
27 public: 27 public:
28 explicit GLImageSync(const scoped_refptr<NativeImageBuffer>& buffer, 28 explicit GLImageSync(const scoped_refptr<NativeImageBuffer>& buffer,
29 const gfx::Size& size); 29 const gfx::Size& size);
30 30
31 // Implement GLImage. 31 // Implement GLImage.
32 void Destroy(bool have_context) override; 32 void Destroy(bool have_context) override;
33 gfx::Size GetSize() override; 33 gfx::Size GetSize() override;
34 bool BindTexImage(unsigned target) override; 34 bool BindTexImage(unsigned target) override;
35 void ReleaseTexImage(unsigned target) override; 35 void ReleaseTexImage(unsigned target) override;
36 bool CopyTexImage(unsigned target) override; 36 bool CopyTexSubImage(unsigned target, int xoffset, int yoffset) override;
37 void WillUseTexImage() override; 37 void WillUseTexImage() override;
38 void WillModifyTexImage() override; 38 void WillModifyTexImage() override;
39 void DidModifyTexImage() override; 39 void DidModifyTexImage() override;
40 void DidUseTexImage() override; 40 void DidUseTexImage() override;
41 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, 41 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget,
42 int z_order, 42 int z_order,
43 gfx::OverlayTransform transform, 43 gfx::OverlayTransform transform,
44 const gfx::Rect& bounds_rect, 44 const gfx::Rect& bounds_rect,
45 const gfx::RectF& crop_rect) override; 45 const gfx::RectF& crop_rect) override;
46 46
(...skipping 28 matching lines...) Expand all
75 75
76 bool GLImageSync::BindTexImage(unsigned target) { 76 bool GLImageSync::BindTexImage(unsigned target) {
77 NOTREACHED(); 77 NOTREACHED();
78 return false; 78 return false;
79 } 79 }
80 80
81 void GLImageSync::ReleaseTexImage(unsigned target) { 81 void GLImageSync::ReleaseTexImage(unsigned target) {
82 NOTREACHED(); 82 NOTREACHED();
83 } 83 }
84 84
85 bool GLImageSync::CopyTexImage(unsigned target) { 85 bool GLImageSync::CopyTexSubImage(unsigned target, int xoffset, int yoffset) {
86 return false; 86 return false;
87 } 87 }
88 88
89 void GLImageSync::WillUseTexImage() { 89 void GLImageSync::WillUseTexImage() {
90 } 90 }
91 91
92 void GLImageSync::DidUseTexImage() { 92 void GLImageSync::DidUseTexImage() {
93 } 93 }
94 94
95 void GLImageSync::WillModifyTexImage() { 95 void GLImageSync::WillModifyTexImage() {
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 417
418 return true; 418 return true;
419 } 419 }
420 420
421 bool TextureDefinition::SafeToRenderFrom() const { 421 bool TextureDefinition::SafeToRenderFrom() const {
422 return level_info_.cleared; 422 return level_info_.cleared;
423 } 423 }
424 424
425 } // namespace gles2 425 } // namespace gles2
426 } // namespace gpu 426 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698