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

Side by Side Diff: ui/gl/gl_image.h

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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef UI_GL_GL_IMAGE_H_ 5 #ifndef UI_GL_GL_IMAGE_H_
6 #define UI_GL_GL_IMAGE_H_ 6 #define UI_GL_GL_IMAGE_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "ui/gfx/geometry/rect.h" 9 #include "ui/gfx/geometry/rect.h"
10 #include "ui/gfx/geometry/rect_f.h" 10 #include "ui/gfx/geometry/rect_f.h"
(...skipping 15 matching lines...) Expand all
26 26
27 // Get the size of the image. 27 // Get the size of the image.
28 virtual gfx::Size GetSize() = 0; 28 virtual gfx::Size GetSize() = 0;
29 29
30 // Bind image to texture currently bound to |target|. 30 // Bind image to texture currently bound to |target|.
31 virtual bool BindTexImage(unsigned target) = 0; 31 virtual bool BindTexImage(unsigned target) = 0;
32 32
33 // Release image from texture currently bound to |target|. 33 // Release image from texture currently bound to |target|.
34 virtual void ReleaseTexImage(unsigned target) = 0; 34 virtual void ReleaseTexImage(unsigned target) = 0;
35 35
36 // Copy image to texture currently bound to |target|. 36 // Copy subimage to texture currently bound to |target|.
37 virtual bool CopyTexImage(unsigned target) = 0; 37 virtual bool CopyTexSubImage(unsigned target, int xoffset, int yoffset) = 0;
reveman 2015/03/04 20:56:46 We don't really need xoffset and yoffset for this
dshwang 2015/03/04 21:02:15 Indeed. However, implementation can handle offsets
38 38
39 // Called before the texture is used for drawing. 39 // Called before the texture is used for drawing.
40 virtual void WillUseTexImage() = 0; 40 virtual void WillUseTexImage() = 0;
41 41
42 // Called after the texture has been used for drawing. 42 // Called after the texture has been used for drawing.
43 virtual void DidUseTexImage() = 0; 43 virtual void DidUseTexImage() = 0;
44 44
45 // Called before the texture image data will be modified. 45 // Called before the texture image data will be modified.
46 virtual void WillModifyTexImage() = 0; 46 virtual void WillModifyTexImage() = 0;
47 47
(...skipping 12 matching lines...) Expand all
60 60
61 private: 61 private:
62 friend class base::RefCounted<GLImage>; 62 friend class base::RefCounted<GLImage>;
63 63
64 DISALLOW_COPY_AND_ASSIGN(GLImage); 64 DISALLOW_COPY_AND_ASSIGN(GLImage);
65 }; 65 };
66 66
67 } // namespace gfx 67 } // namespace gfx
68 68
69 #endif // UI_GL_GL_IMAGE_H_ 69 #endif // UI_GL_GL_IMAGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698