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

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

Issue 415283002: ui: Add ScheduleOverlayPlane API to GLImage. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add gfx::AcceleratedWidget argument to GLImage::ScheduleOverlayPlane Created 6 years, 4 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 | Annotate | Revision Log
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 19 matching lines...) Expand all
30 const gfx::Size& size); 30 const gfx::Size& size);
31 31
32 // Implement GLImage. 32 // Implement GLImage.
33 virtual void Destroy() OVERRIDE; 33 virtual void Destroy() OVERRIDE;
34 virtual gfx::Size GetSize() OVERRIDE; 34 virtual gfx::Size GetSize() OVERRIDE;
35 virtual bool BindTexImage(unsigned target) OVERRIDE; 35 virtual bool BindTexImage(unsigned target) OVERRIDE;
36 virtual void ReleaseTexImage(unsigned target) OVERRIDE; 36 virtual void ReleaseTexImage(unsigned target) OVERRIDE;
37 virtual void WillUseTexImage() OVERRIDE; 37 virtual void WillUseTexImage() OVERRIDE;
38 virtual void WillModifyTexImage() OVERRIDE; 38 virtual void WillModifyTexImage() OVERRIDE;
39 virtual void DidModifyTexImage() OVERRIDE; 39 virtual void DidModifyTexImage() OVERRIDE;
40
41 virtual void DidUseTexImage() OVERRIDE; 40 virtual void DidUseTexImage() OVERRIDE;
41 virtual bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget,
42 int z_order,
43 gfx::OverlayTransform transform,
44 const gfx::Rect& bounds_rect,
45 const gfx::RectF& crop_rect) OVERRIDE;
42 virtual void SetReleaseAfterUse() OVERRIDE; 46 virtual void SetReleaseAfterUse() OVERRIDE;
43 47
44 protected: 48 protected:
45 virtual ~GLImageSync(); 49 virtual ~GLImageSync();
46 50
47 private: 51 private:
48 scoped_refptr<NativeImageBuffer> buffer_; 52 scoped_refptr<NativeImageBuffer> buffer_;
49 gfx::Size size_; 53 gfx::Size size_;
50 54
51 DISALLOW_COPY_AND_ASSIGN(GLImageSync); 55 DISALLOW_COPY_AND_ASSIGN(GLImageSync);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 void GLImageSync::WillModifyTexImage() { 95 void GLImageSync::WillModifyTexImage() {
92 if (buffer_) 96 if (buffer_)
93 buffer_->WillWrite(this); 97 buffer_->WillWrite(this);
94 } 98 }
95 99
96 void GLImageSync::DidModifyTexImage() { 100 void GLImageSync::DidModifyTexImage() {
97 if (buffer_) 101 if (buffer_)
98 buffer_->DidWrite(this); 102 buffer_->DidWrite(this);
99 } 103 }
100 104
105 bool GLImageSync::ScheduleOverlayPlane(gfx::AcceleratedWidget widget,
106 int z_order,
107 gfx::OverlayTransform transform,
108 const gfx::Rect& bounds_rect,
109 const gfx::RectF& crop_rect) {
110 NOTREACHED();
111 return false;
112 }
113
101 void GLImageSync::SetReleaseAfterUse() { 114 void GLImageSync::SetReleaseAfterUse() {
102 NOTREACHED(); 115 NOTREACHED();
103 } 116 }
104 117
105 #if !defined(OS_MACOSX) 118 #if !defined(OS_MACOSX)
106 class NativeImageBufferEGL : public NativeImageBuffer { 119 class NativeImageBufferEGL : public NativeImageBuffer {
107 public: 120 public:
108 static scoped_refptr<NativeImageBufferEGL> Create(GLuint texture_id); 121 static scoped_refptr<NativeImageBufferEGL> Create(GLuint texture_id);
109 122
110 private: 123 private:
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 486
474 // All structural changes should have orphaned the texture. 487 // All structural changes should have orphaned the texture.
475 if (image_buffer_ && !texture->GetLevelImage(texture->target(), 0)) 488 if (image_buffer_ && !texture->GetLevelImage(texture->target(), 0))
476 return false; 489 return false;
477 490
478 return true; 491 return true;
479 } 492 }
480 493
481 } // namespace gles2 494 } // namespace gles2
482 } // namespace gpu 495 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698