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

Side by Side Diff: src/gpu/gl/GrGLIRect.h

Issue 13910009: Use blitframebuffer to implement copySurface. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 8 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
« no previous file with comments | « src/gpu/GrDrawTarget.cpp ('k') | src/gpu/gl/GrGpuGL.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 8
9 9
10 #ifndef GrGLIRect_DEFINED 10 #ifndef GrGLIRect_DEFINED
(...skipping 18 matching lines...) Expand all
29 29
30 void pushToGLScissor(const GrGLInterface* gl) const { 30 void pushToGLScissor(const GrGLInterface* gl) const {
31 GR_GL_CALL(gl, Scissor(fLeft, fBottom, fWidth, fHeight)); 31 GR_GL_CALL(gl, Scissor(fLeft, fBottom, fWidth, fHeight));
32 } 32 }
33 33
34 void setFromGLViewport(const GrGLInterface* gl) { 34 void setFromGLViewport(const GrGLInterface* gl) {
35 GR_STATIC_ASSERT(sizeof(GrGLIRect) == 4*sizeof(GrGLint)); 35 GR_STATIC_ASSERT(sizeof(GrGLIRect) == 4*sizeof(GrGLint));
36 GR_GL_GetIntegerv(gl, GR_GL_VIEWPORT, (GrGLint*) this); 36 GR_GL_GetIntegerv(gl, GR_GL_VIEWPORT, (GrGLint*) this);
37 } 37 }
38 38
39 // sometimes we have a GrIRect from the client that we 39 // sometimes we have a SkIRect from the client that we
40 // want to simultaneously make relative to GL's viewport 40 // want to simultaneously make relative to GL's viewport
41 // and (optionally) convert from top-down to bottom-up. 41 // and (optionally) convert from top-down to bottom-up.
42 void setRelativeTo(const GrGLIRect& glRect, 42 void setRelativeTo(const GrGLIRect& glRect,
43 int leftOffset, 43 int leftOffset,
44 int topOffset, 44 int topOffset,
45 int width, 45 int width,
46 int height, 46 int height,
47 GrSurfaceOrigin origin) { 47 GrSurfaceOrigin origin) {
48 fLeft = glRect.fLeft + leftOffset; 48 fLeft = glRect.fLeft + leftOffset;
49 fWidth = width; 49 fWidth = width;
(...skipping 20 matching lines...) Expand all
70 void invalidate() {fLeft = fWidth = fBottom = fHeight = -1;} 70 void invalidate() {fLeft = fWidth = fBottom = fHeight = -1;}
71 71
72 bool operator ==(const GrGLIRect& glRect) const { 72 bool operator ==(const GrGLIRect& glRect) const {
73 return 0 == memcmp(this, &glRect, sizeof(GrGLIRect)); 73 return 0 == memcmp(this, &glRect, sizeof(GrGLIRect));
74 } 74 }
75 75
76 bool operator !=(const GrGLIRect& glRect) const {return !(*this == glRect);} 76 bool operator !=(const GrGLIRect& glRect) const {return !(*this == glRect);}
77 }; 77 };
78 78
79 #endif 79 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrDrawTarget.cpp ('k') | src/gpu/gl/GrGpuGL.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698